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

:root {
    --hv-blue: #00205B;
    --hv-red: #C8102E;
    --hv-white: #FFFFFF;
    --hv-light: #F0F4F8;
    --hv-dark: #0A1628;
    --hv-blue-light: #1a3a7a;
    --hv-gold: #D4A843;
    --shadow: 0 2px 12px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.18);
    --radius: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--hv-light);
    color: #1a1a2e;
    line-height: 1.6;
}

/* Hero */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--hv-dark) 0%, var(--hv-blue) 50%, var(--hv-blue-light) 100%);
    padding: 60px 20px 40px;
    text-align: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: url('https://r2.thesportsdb.com/images/media/team/banner/0zjgdw1656774130.jpg') center/cover;
    opacity: 0.15;
}

.hero-content { position: relative; z-index: 1; }

.badge {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
    animation: fadeInDown 0.6s ease;
}

.hero h1 {
    color: var(--hv-white);
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 4px;
    margin: 12px 0 4px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.subtitle {
    color: var(--hv-gold);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Tabs */
.tabs {
    display: flex;
    justify-content: center;
    gap: 2px;
    background: var(--hv-blue);
    padding: 0 8px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    overflow-x: auto;
}

.tab {
    padding: 14px 18px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.tab:hover { color: var(--hv-white); background: rgba(255,255,255,0.05); }
.tab.active { color: var(--hv-white); border-bottom-color: var(--hv-red); }

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px 16px;
}

.tab-content { display: none; animation: fadeIn 0.3s ease; }
.tab-content.active { display: block; }

.section-title {
    color: var(--hv-blue);
    font-size: 1.5rem;
    margin-bottom: 20px;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.info-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.info-card:hover { transform: translateY(-4px); }
.info-icon { font-size: 2rem; margin-bottom: 8px; }
.info-card h3 { color: var(--hv-blue); font-size: 1.1rem; margin-bottom: 4px; }
.info-card p { color: #666; font-size: 0.9rem; }

/* About */
.about-section {
    background: white;
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 32px;
    box-shadow: var(--shadow);
}

.about-section h2 { color: var(--hv-blue); margin-bottom: 12px; font-size: 1.4rem; }
.about-section p { color: #444; line-height: 1.8; }

/* Match cards */
.latest-result, .roster-summary { margin-bottom: 32px; }
.latest-result h2, .roster-summary h2 { color: var(--hv-blue); margin-bottom: 16px; font-size: 1.4rem; }

.match-card-featured {
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    text-align: center;
}

.match-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 12px;
}

.match-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.match-team img { width: 56px; height: 56px; object-fit: contain; }
.match-team-name { font-weight: 700; font-size: 1rem; color: var(--hv-blue); }

.match-score {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--hv-dark);
    letter-spacing: 4px;
    min-width: 100px;
}

.match-meta { color: #666; font-size: 0.9rem; margin-top: 8px; }
.match-win { border-left: 4px solid #22c55e; }
.match-loss { border-left: 4px solid var(--hv-red); }

/* Stats row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.stat-item {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-number { font-size: 2rem; font-weight: 900; color: var(--hv-blue); }
.stat-label { font-size: 0.85rem; color: #666; margin-top: 4px; }

/* ── SHL Standings Table ─────────────────────────────────────────────── */

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.95rem;
}

.standings-table thead {
    background: var(--hv-blue);
    color: white;
}

.standings-table th {
    padding: 12px 10px;
    font-weight: 700;
    text-align: center;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.standings-table th.team-col { text-align: left; padding-left: 16px; }
.standings-table th.pts-col { background: rgba(255,255,255,0.1); }

.standings-table td {
    padding: 11px 10px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.standings-table td.team-col {
    text-align: left;
    padding-left: 16px;
    font-weight: 600;
}

.standings-table td.pts-col {
    font-weight: 900;
    font-size: 1.05rem;
    color: var(--hv-blue);
}

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

.standings-table tr.is-hv71 {
    background: linear-gradient(90deg, rgba(0,32,91,0.08), rgba(200,16,46,0.05));
    font-weight: 700;
}

.standings-table tr.is-hv71 td { border-bottom-color: var(--hv-blue); }
.standings-table tr.is-hv71 td.team-col { color: var(--hv-blue); }

.standings-table tr.playoff-line td { border-bottom: 2px solid #22c55e; }
.standings-table tr.playin-line td { border-bottom: 2px solid var(--hv-gold); }
.standings-table tr.relegation-line td { border-bottom: 2px solid var(--hv-red); }

.table-legend {
    margin-top: 12px;
    font-size: 0.8rem;
    color: #888;
    text-align: center;
}

.pos-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.85rem;
}

.pos-playoff { background: #dcfce7; color: #166534; }
.pos-playin { background: #fef9c3; color: #854d0e; }
.pos-relegation { background: #fee2e2; color: #991b1b; }

/* ── Voting / Polls ─────────────────────────────────────────────────── */

.voting-intro {
    color: #666;
    margin-bottom: 24px;
    font-size: 1rem;
}

.polls-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.poll-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.poll-question {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--hv-blue);
    margin-bottom: 16px;
}

.poll-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.poll-option {
    position: relative;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.poll-option:hover { border-color: var(--hv-blue); background: #f0f4ff; }

.poll-option.voted {
    cursor: default;
    border-color: #e2e8f0;
}

.poll-option.voted:hover { background: transparent; }

.poll-option .bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(0,32,91,0.1), rgba(0,32,91,0.05));
    transition: width 0.6s ease;
    border-radius: 6px;
}

.poll-option.winner .bar {
    background: linear-gradient(90deg, rgba(0,32,91,0.2), rgba(0,32,91,0.08));
}

.poll-option-name {
    position: relative;
    z-index: 1;
    font-weight: 600;
    color: #333;
}

.poll-option-stats {
    position: relative;
    z-index: 1;
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
    white-space: nowrap;
}

.poll-total {
    text-align: center;
    margin-top: 12px;
    font-size: 0.85rem;
    color: #999;
}

/* Roster */
.roster-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid var(--hv-blue);
    background: white;
    color: var(--hv-blue);
    border-radius: 24px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.filter-btn:hover, .filter-btn.active { background: var(--hv-blue); color: white; }

.roster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.player-card {
    background: white;
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid var(--hv-blue);
}

.player-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.player-card.pos-G { border-left-color: var(--hv-gold); }
.player-card.pos-D { border-left-color: var(--hv-blue); }
.player-card.pos-F { border-left-color: var(--hv-red); }

.player-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 900;
    flex-shrink: 0;
}

.player-avatar.pos-G { background: #fef3c7; color: #92400e; }
.player-avatar.pos-D { background: #dbeafe; color: var(--hv-blue); }
.player-avatar.pos-F { background: #fce7f3; color: #9d174d; }

.player-info { flex: 1; min-width: 0; }

.player-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--hv-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-details { font-size: 0.82rem; color: #666; margin-top: 2px; }
.player-flag { font-size: 1.2rem; }

/* Results list */
.matches-list { display: flex; flex-direction: column; gap: 12px; }

.match-card {
    background: white;
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    transition: transform 0.15s;
}

.match-card:hover { transform: translateY(-2px); }
.match-card .home { text-align: right; font-weight: 600; }
.match-card .away { text-align: left; font-weight: 600; }

.match-card .score {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--hv-dark);
    text-align: center;
    min-width: 60px;
}

.match-date { font-size: 0.8rem; color: #999; display: block; }
.is-hv71-text { color: var(--hv-blue); }

/* Social */
.social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--hv-blue);
    color: white;
    text-decoration: none;
    border-radius: 24px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.social-link:hover { background: var(--hv-blue-light); }

/* Loading & misc */
.loading { text-align: center; padding: 40px; color: #999; font-size: 1.1rem; }
.no-data { text-align: center; padding: 40px; color: #999; }

footer {
    text-align: center;
    padding: 32px 16px;
    color: #999;
    font-size: 0.85rem;
    border-top: 1px solid #e0e0e0;
    margin-top: 40px;
}

footer a { color: var(--hv-blue); }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

/* Responsive */
@media (max-width: 600px) {
    .hero h1 { font-size: 2.2rem; }
    .badge { width: 80px; height: 80px; }
    .hero { padding: 40px 16px 28px; }
    .tabs { gap: 0; }
    .tab { padding: 12px 10px; font-size: 0.8rem; }
    .match-teams { gap: 12px; }
    .match-score { font-size: 1.8rem; }
    .match-team img { width: 40px; height: 40px; }
    .roster-grid { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: 1fr 1fr; }
    .social-links { flex-wrap: wrap; }
    .match-card { grid-template-columns: 1fr; text-align: center; gap: 8px; }
    .match-card .home, .match-card .away { text-align: center; }
    .standings-table { font-size: 0.82rem; }
    .standings-table th, .standings-table td { padding: 8px 6px; }
}
