/* ===================================
   Schedule Page Specific Styles
   =================================== */

.schedule-main {
    min-height: 100vh;
    padding-top: 72px;
}

/* ===================================
   Schedule Hero Section
   =================================== */

.schedule-hero {
    padding: var(--spacing-3xl) 0 var(--spacing-2xl);
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(0, 78, 137, 0.1) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.schedule-hero::before {
    content: '🏏';
    position: absolute;
    top: 50%;
    left: 50%;
    font-size: 400px;
    opacity: 0.02;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.tournament-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-xl);
    background: linear-gradient(135deg, var(--primary-color), var(--warning-color));
    border-radius: var(--radius-xl);
    margin-bottom: var(--spacing-xl);
    animation: fadeInDown 0.6s ease-out;
    box-shadow: var(--shadow-glow);
}

.badge-icon {
    font-size: 1.5rem;
    animation: rotate 3s ease-in-out infinite;
}

@keyframes rotate {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(15deg); }
}

.badge-text {
    font-weight: 800;
    font-size: 0.875rem;
    letter-spacing: 2px;
    color: white;
}

.page-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.page-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-2xl);
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.tournament-info-quick {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-xl);
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.info-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    transition: all var(--transition-base);
}

.info-item:hover {
    background: rgba(255, 107, 53, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.info-icon {
    font-size: 1.5rem;
}

.info-text {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* ===================================
   Filters Section
   =================================== */

.schedule-filters {
    padding: var(--spacing-xl) 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 72px;
    z-index: var(--z-sticky);
    backdrop-filter: blur(10px);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    justify-content: space-between;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.filter-btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.filter-btn:hover {
    background: rgba(255, 107, 53, 0.1);
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-glow);
}

.search-box {
    position: relative;
    min-width: 250px;
}

.search-icon {
    position: absolute;
    left: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md) var(--spacing-sm) calc(var(--spacing-md) * 3);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all var(--transition-base);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* ===================================
   Schedule Content
   =================================== */

.schedule-content {
    padding: var(--spacing-3xl) 0;
}

.schedule-section {
    margin-bottom: var(--spacing-3xl);
}

.schedule-section.hidden {
    display: none;
}

.section-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-2xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--border-color);
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.section-dates {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* ===================================
   Group Section
   =================================== */

.group-section {
    margin-bottom: var(--spacing-3xl);
}

.group-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(255, 107, 53, 0.1);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius-md);
}

/* ===================================
   Match Cards
   =================================== */

.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-xl);
}

.match-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
}

.match-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.match-card.featured {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.match-card.playoff {
    border-color: var(--warning-color);
}

.match-card.final-match {
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.05) 0%, rgba(0, 78, 137, 0.05) 100%);
    box-shadow: var(--shadow-glow);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
}

.match-number {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.match-type {
    padding: var(--spacing-xs) var(--spacing-md);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.match-type.featured-badge {
    background: var(--primary-color);
    color: white;
}

.match-type.championship {
    background: linear-gradient(135deg, var(--primary-color), var(--warning-color));
    color: white;
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.match-teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xl);
    gap: var(--spacing-lg);
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    flex: 1;
}

.team-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.2) 0%, rgba(0, 217, 255, 0.2) 100%);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.team-name {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text-primary);
    text-align: center;
}

.vs {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text-muted);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
}

.match-details {
    padding: 0 var(--spacing-lg) var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.detail-icon {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.final-note {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(255, 107, 53, 0.1);
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-style: italic;
}

.trophy-icon {
    font-size: 1.5rem;
}

.match-action {
    display: block;
    text-align: center;
    padding: var(--spacing-md);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all var(--transition-base);
    margin-top: auto;
}

.match-action:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

/* Live Match Button - Dark Brown Active State */
.match-action-live {
    background: linear-gradient(135deg, #5D4037, #3E2723);
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(93, 64, 55, 0.4);
}

.match-action-live:hover {
    background: linear-gradient(135deg, #4E342E, #3E2723);
    box-shadow: 0 6px 16px rgba(93, 64, 55, 0.6);
    transform: translateY(-2px);
}

/* Disabled Match Button - Greyed Out */
.match-action-disabled {
    background: #2D3748;
    color: #6B7280;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.6;
}

.match-action-disabled:hover {
    background: #2D3748;
    box-shadow: none;
    transform: none;
}

/* ===================================
   Knockout Bracket
   =================================== */

.knockout-bracket {
    margin-top: var(--spacing-2xl);
}

.knockout-round {
    margin-bottom: var(--spacing-3xl);
}

.round-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

.final-round .round-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-2xl);
}

.final-round .matches-grid {
    max-width: 700px;
    margin: 0 auto;
}

/* ===================================
   CTA Section
   =================================== */

.schedule-cta {
    padding: var(--spacing-3xl) 0;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(0, 78, 137, 0.1) 100%);
    text-align: center;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.cta-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    line-height: 1.7;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-lg) var(--spacing-2xl);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.125rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glow);
    transition: all var(--transition-base);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 768px) {
    .schedule-main {
        padding-top: 72px;
    }

    .schedule-hero {
        padding: var(--spacing-2xl) 0 var(--spacing-xl);
    }

    .tournament-info-quick {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .info-item {
        width: 100%;
        justify-content: center;
    }

    .schedule-filters {
        position: static;
    }

    .filter-bar {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .filter-group {
        width: 100%;
        justify-content: center;
    }

    .search-box {
        width: 100%;
        min-width: auto;
    }

    .matches-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .match-teams {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .vs {
        transform: rotate(90deg);
        margin: var(--spacing-sm) 0;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .group-title {
        font-size: 1.25rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .matches-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1400px) {
    .matches-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===================================
   Print Styles
   =================================== */

@media print {
    .header,
    .schedule-filters,
    .footer,
    .back-to-top,
    .match-action {
        display: none !important;
    }

    .match-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* ===================================
   Video Modal Styles
   =================================== */

.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1600px;
    height: 90vh;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

.video-modal.active .video-modal-content {
    transform: scale(1);
}

.video-modal-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    z-index: 10002;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.video-modal-close:hover {
    background: rgba(255, 107, 53, 0.9);
    transform: rotate(90deg) scale(1.1);
}

.video-container {
    width: 100%;
    height: 100%;
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .video-modal-content {
        width: 95%;
        height: 80vh;
    }

    .video-modal-close {
        width: 40px;
        height: 40px;
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .video-modal-content {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }
}
