/* ============================================
   TOURNAMENT PAGE STYLES
   Consolidated from Tournament.razor inline styles
   and tournament-stages-consolidated.css header section
   Common styles moved to common.css
   ============================================ */

/* ============================================
   TOURNAMENT HEADER
   ============================================ */

/* Visual base styles shared via .animated-gradient-header in common.css */

.tournament-header-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.tournament-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.tournament-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.tournament-name {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.tournament-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    font-size: 0.95rem;
    color: white;
    opacity: 0.95;
}

.tournament-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: white;
}

.tournament-meta .meta-item strong {
    font-weight: 700;
}

.tournament-description {
    margin: 0.75rem 0 0 0;
    font-size: 1rem;
    line-height: 1.6;
    color: white;
    opacity: 0.95;
    max-width: 800px;
}

.status-badge {
    padding: 0.375rem 0.875rem;
    border-radius: 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    display: inline-block;
}

.status-badge.draft {
    background: rgba(107, 114, 128, 0.9);
    color: white;
}

.status-badge.registration {
    background: rgba(59, 130, 246, 0.9);
    color: white;
}

.status-badge.in-progress {
    background: rgba(245, 158, 11, 0.9);
    color: white;
}

.status-badge.completed {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

.status-badge.cancelled {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .tournament-header-section {
        padding: 0.75rem 1rem;
        margin-bottom: 1rem;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(55, 48, 163, 0.25);
    }

    .tournament-header-content {
        gap: 0.5rem;
    }

    .tournament-info {
        align-items: flex-start;
        flex-direction: row;
        gap: 0;
    }

    .tournament-icon {
        display: none;
    }

    .tournament-name {
        font-size: 1.0625rem;
        margin-bottom: 0.125rem;
        text-shadow: none;
    }

    .tournament-meta {
        font-size: 0.8rem;
        gap: 0.375rem;
    }

    .tournament-description {
        display: none;
    }

    .stats-badges {
        display: none;
    }

    .registration-deadline-banner {
        display: none;
    }

    .tournament-progress-card {
        display: none;
    }
}

@media (max-width: 480px) {
    .tournament-name {
        font-size: 0.9375rem;
    }

    .tournament-meta {
        font-size: 0.75rem;
        gap: 0.25rem;
    }

    .tournament-meta .meta-item ~ .meta-item {
        display: none;
    }

    .tournament-meta .meta-separator {
        display: none;
    }
}

/* ============================================
   TOURNAMENT HEADER (Legacy styles)
   ============================================ */

.tournament-header {
    margin-bottom: 32px;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.header-title h1 {
    font-size: 24px;
    color: #2d3748;
    margin: 0;
    font-weight: 700;
}

@media (min-width: 576px) {
    .header-title h1 {
        font-size: 30px;
    }
}

@media (min-width: 768px) {
    .header-title h1 {
        font-size: 36px;
    }
}

/* ============================================
   BADGES
   ============================================ */

.badge {
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-active, .badge-inprogress {
    background: #c6f6d5;
    color: #22543d;
}

.badge-registration {
    background: #bee3f8;
    color: #2c5282;
}

.badge-completed {
    background: #e2e8f0;
    color: #4a5568;
}

.badge-cancelled {
    background: #fed7d7;
    color: #742a2a;
}

.badge-scheduled {
    background: #e6fffa;
    color: #234e52;
}

.badge-postponed {
    background: #fef5e7;
    color: #744210;
}

.badge-default {
    background: #faf5ff;
    color: #553c9a;
}

/* ============================================
   TABS
   ============================================ */

.content-tabs {
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 32px;
}

.tab-button {
    padding: 12px 16px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: #718096;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

@media (min-width: 576px) {
    .tab-button {
        padding: 12px 24px;
        font-size: 16px;
    }
}

.tab-button:hover {
    color: #4299e1;
}

.tab-button.active {
    color: #4299e1;
    border-bottom-color: #4299e1;
}

.tab-content {
    min-height: 400px;
}

/* ============================================
   SECTIONS
   ============================================ */

.standings-section h2,
.schedule-section h2,
.teams-section h2,
.player-stats-section h2 {
    font-size: 28px;
    color: #2d3748;
    margin: 0 0 24px 0;
    font-weight: 600;
}

/* ============================================
   STANDINGS TABLE
   ============================================ */

.standings-table-container {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
}

.standings-table thead {
    background: #f7fafc;
}

.standings-table th {
    padding: 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #4a5568;
    text-transform: uppercase;
    border-bottom: 2px solid #e2e8f0;
}

.standings-table td {
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
    color: #2d3748;
}

.standings-table tbody tr:hover {
    background: #f7fafc;
}

.pos-col {
    width: 60px;
    text-align: center;
}

.team-col {
    min-width: 200px;
}

.stat-col {
    width: 80px;
    text-align: center;
}

/* ============================================
   STATS TABLE
   ============================================ */

.stats-table-container {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
}

.stats-table thead {
    background: #f7fafc;
}

.stats-table th {
    padding: 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #4a5568;
    text-transform: uppercase;
    border-bottom: 2px solid #e2e8f0;
}

.stats-table td {
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
    color: #2d3748;
}

.stats-table tbody tr:hover {
    background: #f7fafc;
}

.rank-col {
    width: 60px;
    text-align: center;
}

.player-col {
    min-width: 200px;
}

/* ============================================
   SCHEDULE & MATCHES
   ============================================ */

.round-section {
    margin-bottom: 40px;
}

.round-section h3 {
    font-size: 22px;
    color: #2d3748;
    margin-bottom: 16px;
    font-weight: 600;
}

.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.match-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #cbd5e0;
}

.match-card.completed {
    border-left-color: #48bb78;
}

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

.match-number {
    font-weight: 600;
    color: #2d3748;
}

.match-date, .match-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #718096;
    margin-bottom: 12px;
}

.match-date svg, .match-location svg {
    width: 14px;
    height: 14px;
}

.match-teams {
    margin: 16px 0;
}

.team-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border-radius: 6px;
}

.team-row.winner {
    background: #c6f6d5;
    font-weight: 600;
}

.team-name {
    flex: 1;
    color: #2d3748;
}

.team-score {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
    min-width: 40px;
    text-align: right;
}

.versus {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #a0aec0;
    padding: 4px 0;
}

/* ============================================
   TEAMS GRID
   ============================================ */

.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.team-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.team-header h3 {
    font-size: 20px;
    color: #2d3748;
    margin: 0;
    font-weight: 600;
}

.team-position {
    font-size: 14px;
    color: #718096;
}

.players-list {
    margin-bottom: 16px;
}

.players-list h4 {
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 8px;
    font-weight: 600;
}

.players-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.players-list li {
    padding: 4px 0;
    color: #4a5568;
    font-size: 14px;
}

.team-stats {
    display: flex;
    justify-content: space-between;
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 11px;
    color: #718096;
    text-transform: uppercase;
}

.stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .header-title h1 {
        font-size: 28px;
    }

    .content-tabs {
        overflow-x: auto;
    }

    .matches-grid,
    .teams-grid {
        grid-template-columns: 1fr;
    }

    .tournament-meta {
        gap: 12px;
    }
}

/* ============================================
   LIVE PULSE INDICATOR
   ============================================ */

.live-pulse-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.live-pulse-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: livePulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

.match-compact-row.live {
    border-left: 3px solid #ef4444;
    background: rgba(239, 68, 68, 0.04);
}

.match-compact-row.live:hover {
    background: rgba(239, 68, 68, 0.08);
}

/* Watch Live button on match detail page */
.live-watch-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #ef4444;
    color: #fff;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
}

.live-watch-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}

.live-watch-btn .live-pulse-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: livePulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}
