/* Dragon Draft Frontend Styles - Card-Based Design */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;600;700&family=Inter:wght@300;400;600&display=swap');

:root{
  --bg: #0f172a;              /* dark slate background */
  --card-bg: #1e293b;         /* dark card background */
  --card-border: #dc2626;     /* red border */
  --text-primary: #f8fafc;    /* light text */
  --text-muted: #cbd5e1;      /* muted light text */
  --brand: #dc2626;           /* red primary */
  --brand-2: #991b1b;         /* dark red secondary */
  --success: #059669;         /* green */
  --warning: #f59e0b;         /* orange */
  --danger: #ef4444;          /* red */
  --grid-gap: 1.5rem;
  --radius: 12px;
  --shadow: 0 4px 6px rgba(220, 38, 38, 0.3), 0 2px 4px rgba(220, 38, 38, 0.2);
  --shadow-lg: 0 10px 25px rgba(220, 38, 38, 0.4), 0 6px 12px rgba(220, 38, 38, 0.3);
  --glow: 0 0 20px rgba(220, 38, 38, 0.5), 0 0 40px rgba(220, 38, 38, 0.3);
}

*{box-sizing:border-box}

.dragondraft-predictions-page,
.dragondraft-leaderboard-page,
.dragondraft-results-page {
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    line-height: 1.6;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 2rem 0;
}

/* Container and Layout */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px;
}

/* Card-Based Design System */
.dragondraft-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: var(--grid-gap);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.dragondraft-card:hover {
    box-shadow: var(--shadow-lg), var(--glow);
    transform: translateY(-2px);
}

.dragondraft-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dragondraft-card-header.primary {
    background: var(--brand);
    color: white;
    border-bottom: none;
}

.dragondraft-card-header.secondary {
    background: var(--brand-2);
    color: white;
    border-bottom: none;
}

.dragondraft-card-header.success {
    background: var(--success);
    color: white;
    border-bottom: none;
}

.dragondraft-card-header.warning {
    background: var(--warning);
    color: white;
    border-bottom: none;
}

.dragondraft-card-header.danger {
    background: var(--danger);
    color: white;
    border-bottom: none;
}

.dragondraft-card-content {
    padding: 1.25rem;
}

.top3-card-icon {
    font-size: 1.125rem;
}

/* Analytics Cards Grid */
.top3-analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--grid-gap);
    margin-bottom: 2rem;
}

/* Progress Bars */
.top3-progress-bar {
    background: #f1f5f9;
    border-radius: 9999px;
    height: 8px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.top3-progress-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.3s ease;
}

.top3-progress-fill.primary { background: var(--brand); }
.top3-progress-fill.secondary { background: var(--brand-2); }
.top3-progress-fill.success { background: var(--success); }
.top3-progress-fill.warning { background: var(--warning); }
.top3-progress-fill.danger { background: var(--danger); }

/* Percentage Display */
.top3-percentage {
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--brand);
}

/* List Items */
.top3-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.top3-list-item:last-child {
    border-bottom: none;
}

.top3-list-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    background: var(--brand);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.75rem;
}

/* Badges and Tags */
.top3-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.top3-badge.primary {
    background: #dbeafe;
    color: var(--brand);
}

.top3-badge.success {
    background: #d1fae5;
    color: var(--success);
}

.top3-badge.warning {
    background: #fef3c7;
    color: var(--warning);
}

.top3-badge.danger {
    background: #fee2e2;
    color: var(--danger);
}

.top3-fixture-card:hover {
    box-shadow: 0 15px 40px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05);
    transform: translateY(-2px);
}

/* Header Gradients - Broadcast Style */
.fixture-header {
    background: linear-gradient(90deg, rgba(0,255,163,.15), rgba(107,229,255,.15));
    border: 1px solid rgba(255,255,255,.14);
    color: var(--ink);
    padding: 16px 20px;
    font-family: Rajdhani, Inter;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
}

.fixture-header.locked {
    background: linear-gradient(90deg, rgba(255,90,90,.15), rgba(255,204,0,.15));
    border-color: rgba(255,90,90,.25);
}

.fixture-header.completed {
    background: linear-gradient(90deg, rgba(101,255,143,.15), rgba(0,255,163,.15));
    border-color: rgba(101,255,143,.25);
}

/* Form Styling - Broadcast Theme */
.top3-prediction-form {
    padding: 16px 20px;
    background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
}

.form-group {
    margin-bottom: var(--grid-gap);
}

.form-label {
    display: block;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 8px;
    font-size: 13px;
    font-family: Rajdhani, Inter;
    text-transform: uppercase;
    letter-spacing: .6px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #0c1120;
    color: var(--ink);
}

.form-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(0,255,163,.1);
}

.form-input:invalid {
    border-color: var(--danger);
}

/* Player Selection - Broadcast Theme */
.player-search-container {
    position: relative;
}

.player-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--panel);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    box-shadow: var(--shadow);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 4px;
}

.player-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,.06);
    transition: background-color 0.15s ease;
    color: var(--ink);
}

.player-item:hover {
    background: linear-gradient(90deg, rgba(0,255,163,.08), rgba(0,0,0,0));
}

.player-item:last-child {
    border-bottom: none;
}

.selected-player-info {
    margin-top: 0.5rem;
}

.selected-player-info span {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Player Cards */
.player-card {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 2px solid #e5e7eb;
    transition: border-color 0.2s ease;
}

.player-card.selected {
    border-color: #2563eb;
    background: #eff6ff;
}

/* Buttons - Broadcast Style */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    font-family: Rajdhani, Inter;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,.08);
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: .6px;
}

.btn-primary {
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    color: white;
    border-color: var(--brand);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    box-shadow: var(--glow);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(220, 38, 38, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: rgba(220, 38, 38, 0.2);
    border-color: var(--brand);
    box-shadow: var(--shadow);
}

.btn-success {
    background: linear-gradient(90deg, var(--success), #047857);
    color: white;
    border-color: var(--success);
}

.btn-danger {
    background: linear-gradient(90deg, var(--danger), #ff9f1a);
    color: white;
    border-color: var(--danger);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* Status Badges - Broadcast Style */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font: 700 13px Rajdhani;
    letter-spacing: .6px;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,.12);
}

.status-upcoming {
    background: linear-gradient(90deg, rgba(101,255,143,.15), rgba(0,255,163,.15));
    color: var(--ok);
    border-color: rgba(101,255,143,.25);
}

.status-locked {
    background: linear-gradient(90deg, rgba(255,90,90,.15), rgba(255,204,0,.15));
    color: var(--danger);
    border-color: rgba(255,90,90,.25);
}

.status-final {
    background: linear-gradient(90deg, rgba(107,229,255,.15), rgba(0,255,163,.15));
    color: var(--brand-2);
    border-color: rgba(107,229,255,.25);
}

/* Leaderboard - Broadcast Style */
.leaderboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    background: transparent;
    padding: 10px;
}

.leaderboard-table th {
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, #0e1424, #0c1020);
    z-index: 1;
    padding: 10px;
    text-align: left;
    font: 700 13px Rajdhani;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: #d7deea;
    border: none;
}

.leaderboard-table td {
    padding: 12px 10px;
    border-top: 1px solid rgba(255,255,255,.06);
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.leaderboard-table tbody tr {
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
}

.leaderboard-table tbody tr td:first-child {
    border-left: 1px solid rgba(255,255,255,.06);
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.leaderboard-table tbody tr td:last-child {
    border-right: 1px solid rgba(255,255,255,.06);
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.leaderboard-table tr:hover {
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.04));
}

.leaderboard-table tr.podium {
    background: linear-gradient(90deg, rgba(255,204,0,.15), rgba(0,255,163,.15));
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 12px;
    font-family: Rajdhani;
    border: 1px solid rgba(255,255,255,.08);
}

.rank-1 {
    background: linear-gradient(135deg, var(--warn), #ff9f1a);
    color: var(--bg);
    box-shadow: 0 0 18px rgba(255,204,0,.45);
}

.rank-2 {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    color: white;
}

.rank-3 {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
}

/* Weekly Leaderboard - Enhanced Styling with Light Background */
.top3-weekly-container {
    background: var(--bg);
    padding: 2rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.top3-weekly-navigation {
    margin-bottom: 2rem;
}

.week-selector-container {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.week-selector-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #1f2937;
    font-weight: 600;
    margin-bottom: 1rem;
}

#week-selector {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.75rem;
    color: #1f2937;
    font-size: 1rem;
    width: 100%;
    max-width: 400px;
}

.top3-weekly-champions {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.champions-header {
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.champions-title {
    color: #1f2937;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.week-dates {
    color: #6b7280;
    font-size: 0.95rem;
    margin: 0.5rem 0 0 0;
}

.week-dates .fixture-count {
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Podium Styling */
.top3-podium {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.podium-position {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.podium-position:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.podium-position.gold {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #fbbf24;
}

.podium-position.silver {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    border-color: #9ca3af;
}

.podium-position.bronze {
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
    border-color: #f97316;
}

.podium-position .medal {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.podium-position .player-info {
    color: #1f2937;
}

.podium-position .player-name {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Rajdhani', sans-serif;
    margin-bottom: 0.5rem;
    color: #111827;
}

.podium-position .player-points {
    font-size: 1.5rem;
    font-weight: 700;
    color: #dc2626;
    margin-bottom: 0.25rem;
}

.podium-position .player-games {
    font-size: 0.875rem;
    color: #6b7280;
}

.top3-weekly-full-leaderboard h3 {
    color: #1f2937;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    margin: 2rem 0 1rem 0;
}

/* Override dark leaderboard styling for weekly */
.top3-weekly-full-leaderboard .leaderboard-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.top3-weekly-full-leaderboard .leaderboard-table th {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
    color: white;
    padding: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
    border: none;
    position: relative;
}

.top3-weekly-full-leaderboard .leaderboard-table tbody tr {
    background: white;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}

.top3-weekly-full-leaderboard .leaderboard-table tbody tr:hover {
    background: #f8fafc;
}

.top3-weekly-full-leaderboard .leaderboard-table tbody tr.top-three {
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.05), rgba(220, 38, 38, 0.02));
}

.top3-weekly-full-leaderboard .leaderboard-table td {
    padding: 0.75rem 1rem;
    color: #374151;
    border-top: none;
    border-bottom: none;
    border-left: none;
    border-right: none;
}

.top3-weekly-full-leaderboard .leaderboard-table tbody tr td:first-child {
    border-left: none;
    border-radius: 0;
}

.top3-weekly-full-leaderboard .leaderboard-table tbody tr td:last-child {
    border-right: none;
    border-radius: 0;
}

.rank-cell {
    font-weight: 600;
    color: var(--brand);
}

.player-cell {
    font-weight: 600;
}

.points-cell {
    font-weight: 700;
    color: var(--brand);
}

.medal-small {
    margin-right: 0.5rem;
}

.no-data-message,
.no-weeks-message {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    color: #6b7280;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.no-data-message h3,
.no-weeks-message h3 {
    color: #1f2937;
    margin-bottom: 1rem;
    font-family: 'Rajdhani', sans-serif;
}

/* Results Display */
.results-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.result-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-comparison {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.stat-item {
    text-align: center;
    padding: 0.5rem;
    border-radius: 6px;
    background: #f8fafc;
}

.stat-exact {
    background: #dcfce7;
    color: #166534;
}

.stat-near {
    background: #fef3c7;
    color: #92400e;
}

.stat-miss {
    background: #fee2e2;
    color: #991b1b;
}

/* Notifications */
.top3-notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    max-width: 24rem;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Hub Layout Styles */
.top3-hub-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* All Games Container */
.top3-all-games-container {
    width: 100%;
    max-width: 100%;
}

.games-selector {
    width: 100%;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
}

/* Game Cards */
.game-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.game-card:hover {
    box-shadow: var(--shadow-lg), var(--glow);
    transform: translateY(-2px);
}

.game-card-header {
    padding: 1rem;
    border-bottom: 1px solid var(--card-border);
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.game-matchup {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.team-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.team-section img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid var(--card-border);
    flex-shrink: 0;
}

.team-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vs-divider {
    font-weight: 700;
    color: var(--brand);
    font-size: 0.75rem;
    text-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
    flex-shrink: 0;
}

.game-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(220, 38, 38, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
}

.game-card-info {
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.game-card-info > div {
    margin-bottom: 0.5rem;
}

.game-card-info > div:last-child {
    margin-bottom: 0;
}

.view-entries-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    color: white;
    border: none;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-entries-btn:hover {
    box-shadow: var(--glow);
    transform: translateY(-1px);
}

.top3-hub-nav {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    margin-bottom: 2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.top3-hub-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    min-width: max-content;
}

.top3-hub-nav li {
    flex: 0 0 auto;
}

.top3-hub-nav a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.top3-hub-nav a:hover,
.top3-hub-nav a.active {
    color: var(--text-primary);
    border-bottom-color: var(--brand);
    background: rgba(220, 38, 38, 0.1);
}

.top3-hub-content {
    min-height: 400px;
}

/* Game Cards in Hub */
.top3-fixture-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.2s ease;
}

.top3-fixture-card:hover {
    box-shadow: var(--shadow-lg), var(--glow);
    transform: translateY(-2px);
}

.top3-fixture-header {
    padding: 1rem;
    border-bottom: 1px solid var(--card-border);
}

.top3-fixture-content {
    padding: 1rem;
}

.top3-fixture-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 1rem;
}

.top3-team-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.top3-team-badge {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 1px solid var(--card-border);
    flex-shrink: 0;
}

.top3-team-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top3-vs-separator {
    font-weight: 700;
    color: var(--brand);
    font-size: 0.75rem;
    text-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
    flex-shrink: 0;
}

.top3-fixture-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.top3-fixture-date {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.top3-fixture-entries {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.top3-fixture-actions {
    margin-top: 1rem;
}

.top3-view-entries-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.top3-view-entries-btn:hover {
    box-shadow: var(--glow);
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .top3-hub-container {
        padding: 0 0.5rem;
    }
    
    .top3-hub-nav {
        margin: 0 -0.5rem 1.5rem -0.5rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .top3-hub-nav a {
        padding: 0.875rem 1rem;
        font-size: 0.75rem;
    }
    
    /* Mobile Games Grid */
    .games-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0;
        margin: 0;
    }
    
    .game-card {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }
    
    .game-matchup {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .team-section {
        justify-content: center;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .team-section img {
        width: 28px;
        height: 28px;
    }
    
    .team-name {
        font-size: 0.8rem;
        text-align: center;
        white-space: normal;
        word-wrap: break-word;
    }
    
    .vs-divider {
        order: -1;
        margin-bottom: 0.5rem;
        font-size: 0.8rem;
    }
    
    .game-card-header {
        padding: 0.875rem;
    }
    
    .game-card-info {
        padding: 0.875rem;
        text-align: center;
    }
    
    .view-entries-btn {
        padding: 0.75rem;
        font-size: 0.8rem;
    }
    
    .top3-fixture-teams {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .top3-team-info {
        justify-content: center;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .top3-team-badge {
        width: 28px;
        height: 28px;
    }
    
    .top3-team-name {
        font-size: 0.8rem;
        text-align: center;
    }
    
    .top3-vs-separator {
        order: -1;
        margin-bottom: 0.5rem;
    }
    
    .top3-fixture-meta {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
    }
    
    .fixture-header {
        padding: 1rem;
    }
    
    .top3-prediction-form {
        padding: 1rem;
    }
    
    .stat-comparison {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .leaderboard-table {
        font-size: 0.875rem;
    }
    
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 0.75rem 0.5rem;
    }
    
    /* Analytics grid mobile */
    .top3-analytics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    .fixture-header h3 {
        font-size: 1.25rem;
    }
    
    .top3-notification {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
    
    .top3-hub-container {
        padding: 0 0.25rem;
    }
    
    .top3-hub-nav a {
        padding: 0.75rem 0.75rem;
        font-size: 0.7rem;
    }
    
    /* Small Mobile Game Cards */
    .games-grid {
        gap: 0.75rem;
        padding: 0;
    }
    
    .game-card {
        margin-bottom: 0;
    }
    
    .game-card-header {
        padding: 0.75rem;
    }
    
    .game-card-info {
        padding: 0.75rem;
        font-size: 0.8rem;
    }
    
    .team-name {
        font-size: 0.75rem;
    }
    
    .team-section img {
        width: 24px;
        height: 24px;
    }
    
    .vs-divider {
        font-size: 0.75rem;
    }
    
    .game-status {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
    
    .view-entries-btn {
        padding: 0.625rem 0.875rem;
        font-size: 0.75rem;
    }
    
    .games-selector-title {
        font-size: 1.25rem !important;
        margin-bottom: 16px !important;
    }
    
    .top3-fixture-card {
        margin-bottom: 0.75rem;
    }
    
    .top3-fixture-header,
    .top3-fixture-content {
        padding: 0.75rem;
    }
    
    .top3-team-name {
        font-size: 0.75rem;
    }
    
    .top3-fixture-date,
    .top3-fixture-entries {
        font-size: 0.8rem;
    }
    
    .top3-view-entries-btn {
        padding: 0.625rem 0.875rem;
        font-size: 0.8rem;
    }
}

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

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f4f6;
    border-top: 2px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

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

/* Mobile Full Width Override */
@media (max-width: 768px) {
    .top3-all-games-container,
    .games-selector,
    .games-grid,
    .game-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .top3-hub-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 0.5rem !important;
    }
}

@media (max-width: 480px) {
    .top3-hub-container {
        padding: 0 0.25rem !important;
    }
    
    .games-grid {
        padding: 0 !important;
        margin: 0 !important;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.font-bold {
    font-weight: bold;
}

.font-medium {
    font-weight: 500;
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.p-4 {
    padding: 1rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Grid System */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .md\:col-span-2 {
        grid-column: span 2 / span 2;
    }
}

/* Branded Header Styles */
.top3-branded-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    padding: 24px;
    text-align: center;
}

.top3-branded-header img {
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin-bottom: 16px;
    width: 80px;
    height: 80px;
}

.top3-branded-header h1 {
    color: #f8fafc;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 2.2rem;
    letter-spacing: 0.5px;
    margin: 0;
}

.top3-branded-header p {
    color: #cbd5e1;
    font-size: 1.1rem;
    margin: 8px 0 0;
    opacity: 0.9;
}

/* Compact Branded Header */
.top3-branded-header-compact {
    align-items: center;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 16px;
}

.top3-branded-header-compact img {
    border-radius: 6px;
    width: 40px;
    height: 40px;
}

.top3-branded-header-compact h2 {
    color: #f8fafc;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0;
}

.top3-branded-header-compact p {
    color: #cbd5e1;
    font-size: 0.9rem;
    margin: 2px 0 0;
    opacity: 0.9;
}

/* Logo Watermark */
.top3-logo-watermark {
    opacity: 0.1;
    pointer-events: none;
    position: absolute;
    right: 15px;
    top: 10px;
    z-index: 1;
}

.top3-logo-watermark img {
    border-radius: 6px;
    height: 40px;
    width: 40px;
}



/* Responsive Logo Adjustments */
@media (max-width: 768px) {
    .top3-branded-header img {
        width: 60px;
        height: 60px;
    }
    
    .top3-branded-header h1 {
        font-size: 1.8rem;
    }
    
    .top3-branded-header-compact {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .top3-logo-watermark {
        display: none; /* Hide watermark on mobile for cleaner look */
    }
}
