/* MontaTime - iOS Native Design */
/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    /* iOS Colors */
    --ios-blue: #007AFF;
    --ios-green: #34C759;
    --ios-orange: #FF9500;
    --ios-red: #FF3B30;
    --ios-purple: #AF52DE;
    --ios-pink: #FF2D92;
    --ios-yellow: #FFCC00;
    
    /* iOS Grays */
    --ios-gray: #8E8E93;
    --ios-gray2: #AEAEB2;
    --ios-gray3: #C7C7CC;
    --ios-gray4: #D1D1D6;
    --ios-gray5: #E5E5EA;
    --ios-gray6: #F2F2F7;
    
    /* iOS Backgrounds */
    --ios-bg-primary: #FFFFFF;
    --ios-bg-secondary: #F2F2F7;
    --ios-bg-tertiary: #FFFFFF;
    
    /* iOS Text */
    --ios-text-primary: #000000;
    --ios-text-secondary: #3C3C43;
    --ios-text-tertiary: #3C3C4399;
    --ios-text-quaternary: #3C3C4366;
    
    /* iOS System */
    --ios-border-radius: 10px;
    --ios-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --ios-shadow-large: 0 4px 16px rgba(0, 0, 0, 0.1);
    
    /* Sport Themes */
    --theme-primary: #007AFF;
    --theme-secondary: #F2F2F7;
    --theme-accent: #007AFF;
    --theme-gradient: linear-gradient(135deg, #007AFF 0%, #5AC8FA 100%);
    --theme-text: #000000;
    --theme-text-light: #FFFFFF;
}

/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
    background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 100%);
    color: var(--ios-text-primary);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    user-select: none;
    -webkit-user-select: none;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100vh;
}

/* iOS App Container */
.ios-app {
    min-height: 100vh;
    width: 100%;
    margin: 0;
    background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    transition: background 0.3s ease;
}

/* Removed status bar - not needed for PWA */

/* iOS Header */
.ios-header {
    background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 100%) !important;
    padding: 24px 20px;
    border-bottom: none;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.ios-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.app-logo {
    flex-shrink: 0;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.app-info {
    flex: 1;
    text-align: left;
}

.app-title {
    font-size: 24px;
    font-weight: 700;
    color: #FFFFFF !important;
    margin: 0 0 4px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
}

.app-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 400;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.header-stats {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 12px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 50px;
}

.stat-number {
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    line-height: 1;
}

.stat-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* iOS Content */
.ios-content {
    flex: 1;
    padding: 20px;
    padding-bottom: 100px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

/* iOS Sections - Horizontal Slide */
.ios-content {
    position: relative;
    overflow: hidden;
}

.ios-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
}

.ios-section.active {
    position: relative;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.ios-section.prev {
    transform: translateX(-50px);
    opacity: 0;
}

.ios-section.next {
    transform: translateX(50px);
    opacity: 0;
}

/* iOS Cards */
.ios-card {
    background: #FFFFFF !important;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateZ(0);
}

.ios-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.card-header {
    padding: 20px 20px 16px;
    border-bottom: 0.5px solid var(--ios-gray5);
}

.card-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--ios-text-primary);
    margin-bottom: 8px;
}

.card-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: var(--ios-text-secondary);
}

/* iOS Form */
.ios-form {
    padding: 20px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.ios-label {
    display: block;
    font-size: 17px;
    font-weight: 600;
    color: var(--ios-text-primary);
    margin-bottom: 8px;
}

/* iOS Input */
.ios-input-group {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ios-input {
    flex: 1;
    height: 44px;
    padding: 0 16px;
    border: none;
    border-radius: var(--ios-border-radius);
    background: var(--ios-bg-secondary);
    font-size: 17px;
    color: var(--ios-text-primary);
    font-weight: 400;
    transition: all 0.2s ease;
}

.ios-input:focus {
    outline: none;
    background: var(--ios-bg-primary);
    box-shadow: 0 0 0 2px var(--ios-blue);
}

.ios-input::placeholder {
    color: var(--ios-text-quaternary);
}

/* iOS Select */
.ios-select {
    position: relative;
    width: 100%;
}

.ios-select select {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: none;
    border-radius: var(--ios-border-radius);
    background: var(--ios-bg-secondary);
    font-size: 17px;
    color: var(--ios-text-primary);
    font-weight: 400;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* iOS Buttons */
.ios-button-group {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ios-button {
    height: 50px;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    will-change: transform;
}

.ios-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ios-button:active {
    transform: scale(0.96);
    transition: transform 0.1s ease;
}

.ios-button-primary {
    background: #007AFF !important;
    color: white !important;
}

.ios-button-primary:disabled {
    background: var(--ios-gray4);
    color: var(--ios-text-quaternary);
    cursor: not-allowed;
}

.ios-button-secondary {
    background: var(--ios-gray6);
    color: var(--ios-text-primary);
}

.ios-button-destructive {
    background: var(--ios-red);
    color: white;
}

.ios-button-outline {
    background: transparent;
    color: var(--ios-blue);
    border: 1px solid var(--ios-blue);
}

.button-icon {
    font-size: 20px;
    font-weight: 300;
}

/* iOS Badges */
.ios-badge {
    background: var(--ios-blue);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.ios-badge-secondary {
    background: var(--ios-gray4);
    color: var(--ios-text-primary);
}

/* Players Section */
.players-section {
    padding: 20px;
    border-top: 0.5px solid var(--ios-gray5);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--ios-text-primary);
}

/* iOS List */
.ios-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.player-item {
    background: #F2F2F7 !important;
    padding: 12px 16px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 17px;
    font-weight: 500;
    color: #000000 !important;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateZ(0);
    margin-bottom: 8px;
}

.player-item:hover {
    background: #E5E5EA !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.player-item:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

.player-remove {
    background: var(--ios-red);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.player-remove:active {
    transform: scale(0.9);
}

/* Teams Container */
.teams-container {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.team-card {
    background: var(--ios-bg-secondary);
    border-radius: var(--ios-border-radius);
    padding: 16px;
    border: 1px solid var(--ios-gray5);
}

.team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 0.5px solid var(--ios-gray5);
}

.team-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--ios-text-primary);
}

.team-count {
    background: var(--ios-green);
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.team-players {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
}

.team-player {
    background: var(--ios-bg-primary);
    padding: 8px 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    color: var(--ios-text-primary);
    border: 0.5px solid var(--ios-gray5);
}

/* History */
.history-container {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.history-item {
    background: var(--ios-bg-secondary);
    border-radius: var(--ios-border-radius);
    padding: 16px;
    margin-bottom: 12px;
    border: 0.5px solid var(--ios-gray5);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.history-date {
    font-size: 15px;
    color: var(--ios-text-secondary);
    font-weight: 500;
}

.history-sport {
    background: var(--ios-orange);
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.history-teams {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

.history-team {
    background: var(--ios-bg-primary);
    padding: 8px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
    border: 0.5px solid var(--ios-gray5);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--ios-text-secondary);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--ios-text-primary);
}

.empty-state p {
    font-size: 15px;
    color: var(--ios-text-secondary);
    line-height: 1.4;
}

/* iOS Tab Bar */
.ios-tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 83px;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    border-top: 0.5px solid rgba(255, 255, 255, 0.3);
    display: flex;
    padding: 8px 16px 34px 16px; /* Safe area + padding */
    z-index: 1000;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1);
}

.tab-item {
    flex: 1;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s ease;
    padding: 8px 4px;
    min-height: 49px;
    border-radius: 8px;
    margin: 0 2px;
}

.tab-item:hover {
    background: rgba(102, 126, 234, 0.1);
}

.tab-item.active {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea !important;
}

.tab-item:not(.active) {
    color: #666666 !important;
}

.tab-icon {
    font-size: 20px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.tab-item.active .tab-icon {
    transform: scale(1.1);
}

.tab-label {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    transition: color 0.2s ease;
}

.tab-item.active .tab-label {
    color: #667eea;
    font-weight: 600;
}

/* Safe Area */
.safe-area-bottom {
    height: 34px;
    background: var(--ios-bg-primary);
}

/* iOS Toast */
.ios-toast-container {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    max-width: 90%;
}

.ios-toast {
    background: var(--ios-text-primary);
    color: white;
    padding: 12px 16px;
    border-radius: var(--ios-border-radius);
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    box-shadow: var(--ios-shadow-large);
    animation: iosToastSlide 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ios-toast.success {
    background: var(--ios-green);
}

.ios-toast.error {
    background: var(--ios-red);
}

@keyframes iosToastSlide {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 414px) {
    .ios-app {
        max-width: 100%;
    }
    
    .ios-content {
        padding: 16px;
    }
    
    .ios-card {
        margin-bottom: 16px;
    }
    
    .card-header {
        padding: 16px;
    }
    
    .ios-form {
        padding: 16px;
    }
    
    .ios-button-group {
        padding: 16px;
    }
}

/* Landscape */
@media (orientation: landscape) and (max-height: 500px) {
    .ios-header {
        padding: 12px 20px;
    }
    
    .app-title {
        font-size: 24px;
    }
    
    .app-subtitle {
        font-size: 15px;
    }
    
    .ios-content {
        padding: 16px;
        padding-bottom: 80px;
    }
}

/* Touch improvements */
@media (hover: none) and (pointer: coarse) {
    .ios-button:hover {
        transform: none;
    }
    
    .ios-button:active {
        transform: scale(0.98);
    }
    
    .player-item:hover {
        background: var(--ios-bg-secondary);
    }
    
    .player-item:active {
        background: var(--ios-gray5);
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--ios-blue);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: iosSpin 1s linear infinite;
}

@keyframes iosSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Sport Themes */
.theme-futebol {
    --theme-primary: #00C851;
    --theme-secondary: #E8F5E8;
    --theme-accent: #00C851;
    --theme-gradient: linear-gradient(135deg, #00C851 0%, #4CAF50 100%);
    --theme-text: #1B5E20;
    --theme-text-light: #FFFFFF;
}

.theme-volei {
    --theme-primary: #FF6B35;
    --theme-secondary: #FFF3E0;
    --theme-accent: #FF6B35;
    --theme-gradient: linear-gradient(135deg, #FF6B35 0%, #FF9800 100%);
    --theme-text: #E65100;
    --theme-text-light: #FFFFFF;
}

.theme-basquete {
    --theme-primary: #FF5722;
    --theme-secondary: #FBE9E7;
    --theme-accent: #FF5722;
    --theme-gradient: linear-gradient(135deg, #FF5722 0%, #F44336 100%);
    --theme-text: #BF360C;
    --theme-text-light: #FFFFFF;
}

.theme-futsal {
    --theme-primary: #2196F3;
    --theme-secondary: #E3F2FD;
    --theme-accent: #2196F3;
    --theme-gradient: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    --theme-text: #0D47A1;
    --theme-text-light: #FFFFFF;
}

.theme-handebol {
    --theme-primary: #9C27B0;
    --theme-secondary: #F3E5F5;
    --theme-accent: #9C27B0;
    --theme-gradient: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%);
    --theme-text: #4A148C;
    --theme-text-light: #FFFFFF;
}

.theme-outro {
    --theme-primary: #607D8B;
    --theme-secondary: #ECEFF1;
    --theme-accent: #607D8B;
    --theme-gradient: linear-gradient(135deg, #607D8B 0%, #455A64 100%);
    --theme-text: #263238;
    --theme-text-light: #FFFFFF;
}

/* Apply theme to app container */
.ios-app.theme-futebol {
    background: linear-gradient(135deg, #00C851 0%, #4CAF50 100%) !important;
}

.ios-app.theme-volei {
    background: linear-gradient(135deg, #FF6B35 0%, #FF9800 100%) !important;
}

.ios-app.theme-basquete {
    background: linear-gradient(135deg, #FF5722 0%, #F44336 100%) !important;
}

.ios-app.theme-futsal {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%) !important;
}

.ios-app.theme-handebol {
    background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%) !important;
}

.ios-app.theme-outro {
    background: linear-gradient(135deg, #607D8B 0%, #455A64 100%) !important;
}

/* Theme-aware elements */
.theme-futebol .ios-button-primary {
    background: #00C851 !important;
    color: #FFFFFF !important;
}

.theme-volei .ios-button-primary {
    background: #FF6B35 !important;
    color: #FFFFFF !important;
}

.theme-basquete .ios-button-primary {
    background: #FF5722 !important;
    color: #FFFFFF !important;
}

.theme-futsal .ios-button-primary {
    background: #2196F3 !important;
    color: #FFFFFF !important;
}

.theme-handebol .ios-button-primary {
    background: #9C27B0 !important;
    color: #FFFFFF !important;
}

.theme-outro .ios-button-primary {
    background: #607D8B !important;
    color: #FFFFFF !important;
}

.theme-futebol .ios-badge {
    background: #00C851 !important;
    color: #FFFFFF !important;
}

.theme-volei .ios-badge {
    background: #FF6B35 !important;
    color: #FFFFFF !important;
}

.theme-basquete .ios-badge {
    background: #FF5722 !important;
    color: #FFFFFF !important;
}

.theme-futsal .ios-badge {
    background: #2196F3 !important;
    color: #FFFFFF !important;
}

.theme-handebol .ios-badge {
    background: #9C27B0 !important;
    color: #FFFFFF !important;
}

.theme-outro .ios-badge {
    background: #607D8B !important;
    color: #FFFFFF !important;
}

.theme-futebol .tab-item.active {
    color: #00C851 !important;
}

.theme-volei .tab-item.active {
    color: #FF6B35 !important;
}

.theme-basquete .tab-item.active {
    color: #FF5722 !important;
}

.theme-futsal .tab-item.active {
    color: #2196F3 !important;
}

.theme-handebol .tab-item.active {
    color: #9C27B0 !important;
}

.theme-outro .tab-item.active {
    color: #607D8B !important;
}

.theme-futebol .app-title,
.theme-volei .app-title,
.theme-basquete .app-title,
.theme-futsal .app-title,
.theme-handebol .app-title,
.theme-outro .app-title {
    color: #FFFFFF !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.theme-futebol .app-subtitle,
.theme-volei .app-subtitle,
.theme-basquete .app-subtitle,
.theme-futsal .app-subtitle,
.theme-handebol .app-subtitle,
.theme-outro .app-subtitle {
    color: #FFFFFF !important;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Modal Styles */
.ios-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.ios-modal {
    background: white;
    border-radius: 12px;
    max-width: 400px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.ios-modal-header {
    padding: 20px 20px 10px;
    border-bottom: 1px solid #E5E5EA;
}

.ios-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #000000;
}

.ios-modal-content {
    padding: 20px;
}

.ios-modal-content p {
    margin: 0 0 20px;
    color: #666666;
    font-size: 14px;
    line-height: 1.4;
}

.ios-modal-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ios-modal-buttons .ios-button {
    flex: 1;
    min-width: 100px;
}

.ios-input-group {
    margin-bottom: 20px;
}

.ios-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #000000;
    font-size: 14px;
}

.ios-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #E5E5EA;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    color: #000000;
    box-sizing: border-box;
}

.ios-input:focus {
    outline: none;
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* Reserves Styles */
.reserves-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid #FFD700;
}

.reserves-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #E5E5EA;
}

.reserves-name {
    font-weight: 600;
    font-size: 16px;
    color: #B8860B;
}

.reserves-count {
    font-size: 14px;
    color: #666666;
    background: #FFF8DC;
    padding: 4px 8px;
    border-radius: 6px;
}

.reserves-players {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.reserve-player {
    background: #FFF8DC;
    color: #B8860B;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #FFD700;
}

/* Player Rating Styles */
.player-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.player-name {
    font-weight: 500;
    color: #000000;
}

.player-rating {
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #F2F2F7;
    transition: background 0.2s ease;
}

.player-rating:hover {
    background: #E5E5EA;
}

/* Team Score Styles */
.team-score {
    background: #F2F2F7;
    color: #666666;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

/* History Reserves Styles */
.history-reserves {
    margin-top: 8px;
    padding: 8px;
    background: #FFF8DC;
    border-radius: 6px;
    border: 1px solid #FFD700;
    font-size: 14px;
    color: #B8860B;
}

/* Reserve Changes Styles */
.reserve-changes {
    margin-top: 12px;
    padding: 12px;
    background: #F8F9FA;
    border-radius: 8px;
    border: 1px solid #E5E5EA;
}

.reserve-changes-header {
    margin-bottom: 8px;
}

.changes-title {
    font-size: 12px;
    font-weight: 600;
    color: #666666;
}

.reserve-changes-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.change-entry, .change-exit {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.change-arrow {
    font-weight: 600;
    min-width: 80px;
}

.change-players {
    color: #333333;
}

.change-entry .change-arrow {
    color: #28A745;
}

.change-exit .change-arrow {
    color: #DC3545;
}

/* History Team Styles */
.history-team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.history-team-score {
    background: #F2F2F7;
    color: #666666;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.history-team-players {
    font-size: 13px;
    color: #333333;
    line-height: 1.4;
}

.history-player, .history-reserve-player {
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 2px;
}

.history-reserves-header {
    margin-bottom: 6px;
}

.history-reserves-players {
    font-size: 13px;
    color: #B8860B;
    line-height: 1.4;
}

/* Timer Styles */
.timer-container {
    padding: 20px;
    text-align: center;
}

.timer-display {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.timer-display:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.timer-display.editing {
    background: rgba(139, 92, 246, 0.1);
    border: 2px solid #8B5CF6;
}

.timer-time {
    font-size: 4rem;
    font-weight: 700;
    color: #8B5CF6;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    line-height: 1;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.timer-status {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timer-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.timer-controls .ios-button {
    min-width: 100px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
}

.timer-settings {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.timer-settings .form-group {
    margin-bottom: 0;
}

.timer-settings .ios-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
}

.timer-settings .ios-input {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #8B5CF6;
}

/* Score Styles */
.score-container {
    padding: 20px;
}

.score-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.score-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.team-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.team-score {
    font-size: 3rem;
    font-weight: 700;
    color: #8B5CF6;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.score-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: #8B5CF6;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    margin: 0 5px;
}

.score-btn:hover {
    background: #7C3AED;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
}

.score-btn:active {
    transform: scale(0.95);
}

.score-separator {
    font-size: 1.5rem;
    font-weight: 700;
    color: #8B5CF6;
    margin: 0 20px;
}

.scorer-section {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.scorer-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.scorer-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.scorer-btn {
    background: rgba(139, 92, 246, 0.1);
    border: 2px solid #8B5CF6;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #8B5CF6;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.scorer-btn:hover {
    background: #8B5CF6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.scorer-btn:active {
    transform: translateY(0);
}

/* Players Display */
.players-display {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.team-players {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.team-players-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
    padding: 8px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 8px;
}

.players-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.player-scorer {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid #8B5CF6;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #8B5CF6;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
}

.player-scorer:hover {
    background: #8B5CF6;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.player-scorer:active {
    transform: translateY(0);
}

.player-scorer.has-goals {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10B981;
    color: #10B981;
}

.player-scorer.has-goals:hover {
    background: #10B981;
    color: white;
}

.player-goals {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #EF4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Scorers Section */
.scorers-section {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.scorers-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.scorers-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scorer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(139, 92, 246, 0.05);
    border-radius: 8px;
    padding: 10px 15px;
    border-left: 4px solid #8B5CF6;
}

.scorer-name {
    font-weight: 600;
    color: #333;
}

.scorer-goals {
    background: #8B5CF6;
    color: white;
    border-radius: 12px;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Goals Table Styles */
.goals-table-section {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.goals-table-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.goals-table {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.goals-table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    background: #8B5CF6;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 12px 8px;
    text-align: center;
}

.goals-table-body {
    max-height: 200px;
    overflow-y: auto;
}

.goal-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 10px 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    align-items: center;
    text-align: center;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.goal-row:hover {
    background: rgba(139, 92, 246, 0.05);
}

.goal-row:last-child {
    border-bottom: none;
}

.goal-player {
    font-weight: 600;
    color: #333;
    text-align: left;
}

.goal-team {
    font-weight: 500;
    color: #8B5CF6;
}

.goal-time {
    font-weight: 500;
    color: #666;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

.goal-action {
    display: flex;
    justify-content: center;
}

.goal-remove-btn {
    background: #EF4444;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.goal-remove-btn:hover {
    background: #DC2626;
    transform: scale(1.05);
}

.goal-remove-btn:active {
    transform: scale(0.95);
}

.empty-goals {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
    background: rgba(139, 92, 246, 0.05);
}

/* LED Scoreboard Styles */
.scoreboard-container {
    padding: 15px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.led-scoreboard {
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border: 3px solid #000;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.led-scoreboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(255, 255, 0, 0.1) 0%, 
        transparent 50%, 
        rgba(255, 255, 0, 0.1) 100%);
    pointer-events: none;
}

.scoreboard-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.home-section, .visitors-section {
    flex: 1;
    min-width: 0;
}

.time-section {
    flex: 1.2;
    margin: 0 10px;
    min-width: 0;
}

.team-label {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.led-display {
    background: #000;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 15px 20px;
    font-family: 'Courier New', 'SF Mono', Monaco, monospace;
    font-weight: 700;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.led-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 0, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.score-display {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: #ffff00;
    font-family: 'Courier New', 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
    font-weight: 900;
    text-shadow: 
        0 0 5px #ffff00,
        0 0 8px #ffff00;
    min-width: 60px;
    max-width: 100px;
    letter-spacing: 2px;
}

.time-display {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    color: #ffff00;
    font-family: 'Courier New', 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
    font-weight: 900;
    text-shadow: 
        0 0 5px #ffff00,
        0 0 8px #ffff00;
    min-width: 80px;
    max-width: 120px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 2px;
}

.period-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.period-label {
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.period-value {
    color: #ffff00;
    font-size: 1rem;
    font-weight: 700;
    text-shadow: 0 0 5px #ffff00;
}

/* LED Scoreboard Layout */
.led-scoreboard {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 120px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* Scoreboard Controls */
.scoreboard-controls {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.team-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.team-control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.team-control-group .team-name {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.control-buttons {
    display: flex;
    gap: 10px;
}

.led-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(145deg, #8B5CF6, #7C3AED);
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 
        0 4px 12px rgba(139, 92, 246, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.led-btn:hover {
    background: linear-gradient(145deg, #7C3AED, #6D28D9);
    transform: scale(1.05);
    box-shadow: 
        0 6px 16px rgba(139, 92, 246, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.led-btn:active {
    transform: scale(0.95);
    box-shadow: 
        0 2px 8px rgba(139, 92, 246, 0.3),
        inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* LED States */
.timer-running .time-display {
    color: #00ff00;
    text-shadow: 
        0 0 10px #00ff00,
        0 0 20px #00ff00,
        0 0 30px #00ff00;
}

.timer-paused .time-display {
    color: #ffaa00;
    text-shadow: 
        0 0 10px #ffaa00,
        0 0 20px #ffaa00,
        0 0 30px #ffaa00;
}

.timer-overtime .time-display {
    color: #ff0000;
    text-shadow: 
        0 0 10px #ff0000,
        0 0 20px #ff0000,
        0 0 30px #ff0000;
    animation: led-pulse 1s infinite;
}

@keyframes led-pulse {
    0%, 100% { 
        opacity: 1;
        text-shadow: 
            0 0 10px #ff0000,
            0 0 20px #ff0000,
            0 0 30px #ff0000;
    }
    50% { 
        opacity: 0.7;
        text-shadow: 
            0 0 5px #ff0000,
            0 0 10px #ff0000,
            0 0 15px #ff0000;
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .scoreboard-container {
        padding: 10px;
    }
    
    .led-scoreboard {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .time-section {
        margin: 0 5px;
    }
    
    .team-label {
        font-size: 0.8rem;
    }
    
    .scoreboard-controls {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .team-controls {
        gap: 10px;
    }
    
    .led-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

/* Landscape Mode - Fullscreen Scoreboard */
@media (orientation: landscape) and (max-height: 500px) {
    /* Hide header and tab bar */
    .ios-header,
    .ios-tab-bar,
    .safe-area-bottom {
        display: none !important;
    }
    
    /* Fullscreen layout - remove all margins and padding */
    * {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    html, body {
        width: 100vw !important;
        height: 100vh !important;
        overflow: hidden !important;
    }
    
    .ios-app {
        width: 100vw !important;
        height: 100vh !important;
        padding: 0 !important;
        margin: 0 !important;
        background: #000 !important;
    }
    
    .ios-content {
        width: 100vw !important;
        height: 100vh !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Only show timer section */
    .ios-section {
        display: none !important;
    }
    
    .ios-section.active {
        display: flex !important;
        width: 100vw !important;
        height: 100vh !important;
        padding: 0 !important;
        margin: 0 !important;
        justify-content: center;
        align-items: center;
    }
    
    /* Fullscreen card */
    .ios-card {
        width: 100vw !important;
        height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        background: #000 !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    /* Scoreboard container fullscreen */
    .scoreboard-container {
        width: 100vw !important;
        height: 100vh !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: #000 !important;
    }
    
    /* LED scoreboard - full width */
    .led-scoreboard {
        width: 95vw !important;
        height: 60vh !important;
        padding: 20px !important;
        margin: 0 !important;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    /* Score sections - equal width */
    .home-section, .visitors-section {
        flex: 1;
        min-width: 0;
    }
    
    .time-section {
        flex: 2;
        margin: 0 5px;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    /* Larger displays with proper sizing */
    .score-display {
        font-size: clamp(3rem, 8vw, 5rem) !important;
        font-family: 'Courier New', 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace !important;
        font-weight: 900 !important;
        text-shadow: 
            0 0 8px #ffff00,
            0 0 12px #ffff00 !important;
        min-width: 80px !important;
        max-width: 120px !important;
        letter-spacing: 3px !important;
    }
    
    .time-display {
        font-size: clamp(3rem, 10vw, 6rem) !important;
        font-family: 'Courier New', 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace !important;
        font-weight: 900 !important;
        text-shadow: 
            0 0 8px #ffff00,
            0 0 12px #ffff00 !important;
        min-width: 200px !important;
        max-width: 300px !important;
        width: 100% !important;
        letter-spacing: 3px !important;
    }
    
    .team-label {
        font-size: clamp(0.8rem, 2vw, 1rem) !important;
        margin-bottom: 10px !important;
    }
    
    .period-label {
        font-size: clamp(0.7rem, 1.5vw, 0.9rem) !important;
    }
    
    .period-value {
        font-size: clamp(0.8rem, 2vw, 1rem) !important;
    }
    
    /* Timer controls - smaller and centered */
    .timer-controls-integrated {
        gap: 20px !important;
        margin-top: 20px !important;
        padding: 0 !important;
    }
    
    .timer-btn {
        width: 60px !important;
        height: 60px !important;
        font-size: 1.5rem !important;
    }
    
    /* Hide scoreboard controls and players in landscape */
    .scoreboard-controls,
    .players-display,
    .goals-table-section {
        display: none !important;
    }
}

/* Timer Controls Integrated */
.timer-controls-integrated {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    padding: 10px 0;
}

.timer-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #333;
    background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
    color: #ffff00;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.timer-btn:hover {
    transform: scale(1.1);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.timer-btn:active {
    transform: scale(0.95);
}

.timer-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.timer-btn-play {
    border-color: #00ff00;
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
}

.timer-btn-play:hover:not(:disabled) {
    box-shadow: 
        0 6px 12px rgba(0, 255, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.timer-btn-pause {
    border-color: #ffaa00;
    color: #ffaa00;
    text-shadow: 0 0 10px #ffaa00;
}

.timer-btn-pause:hover:not(:disabled) {
    box-shadow: 
        0 6px 12px rgba(255, 170, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.timer-btn-reset {
    border-color: #ff4444;
    color: #ff4444;
    text-shadow: 0 0 10px #ff4444;
}

.timer-btn-reset:hover:not(:disabled) {
    box-shadow: 
        0 6px 12px rgba(255, 68, 68, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

/* Timer States */
.timer-running .timer-time {
    color: #10B981;
}

.timer-paused .timer-time {
    color: #F59E0B;
}

.timer-overtime .timer-time {
    color: #EF4444;
    animation: pulse 1s infinite;
}

/* LED Timer Clickable */
.time-display {
    cursor: pointer;
    transition: all 0.2s ease;
}

.time-display:hover {
    transform: scale(1.05);
    text-shadow: 
        0 0 15px #ffff00,
        0 0 25px #ffff00,
        0 0 35px #ffff00;
}

.time-display.editing {
    animation: led-pulse 0.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}