:root {
    --primary-color: #f4a261;
    --primary-dark: #e76f51;
    --primary-light: #f6b93b;
    --secondary-color: #e76f51;
    --accent-color: #f6b93b;
    --bg-color: #fff8f5;
    --bg-card: #ffffff;
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --text-light: #b2bec3;
    --border-color: #ffe0d0;
    --success-color: #00b894;
    --warning-color: #fdcb6e;
    --danger-color: #d63031;
    --playing-color: #6366f1;
    --shadow: 0 2px 8px rgba(231, 111, 81, 0.1);
    --shadow-hover: 0 4px 16px rgba(231, 111, 81, 0.18);
    --radius: 12px;
    --radius-sm: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.5rem 1rem;
    box-shadow: var(--shadow);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.season-title {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.9;
}

.season-info {
    font-size: 0.95rem;
    opacity: 0.9;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
}

.nav-tabs {
    background: var(--bg-card);
    padding: 0 1rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-tab {
    padding: 1rem 2rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-tab:hover {
    color: var(--primary-color);
    background: rgba(244, 162, 97, 0.08);
}

.nav-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    width: 100%;
}

.ranking-cards {
    display: none;
}

.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a7a6d 100%);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    color: white;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

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

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.hero > div > p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

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

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.85;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.quick-link-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.quick-link-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.quick-link-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.quick-link-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.quick-link-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.info-section {
    margin-bottom: 2rem;
}

.info-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    position: relative;
    padding-left: 1rem;
}

.info-section h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.2rem;
    bottom: 0.2rem;
    width: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.rule-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.rule-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.rule-card h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.rule-card ul {
    list-style: none;
}

.rule-card li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    padding-left: 1.5rem;
}

.rule-card li:last-child {
    border-bottom: none;
}

.rule-card li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.phases-section {
    margin-bottom: 2rem;
}

.phases-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    position: relative;
    padding-left: 1rem;
}

.phases-section h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.2rem;
    bottom: 0.2rem;
    width: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.phases-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.phase-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.phase-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.phase-number {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
}

.phase-header h3 {
    font-size: 1.2rem;
}

.phase-content {
    padding: 1.5rem;
}

.phase-date {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.phase-desc {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.phase-note {
    color: var(--accent-color);
    font-weight: 500;
    font-size: 0.95rem;
}

.teams-preview {
    margin-bottom: 2rem;
}

.rules-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.rules-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    position: relative;
    padding-left: 1rem;
}

.rules-section h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.2rem;
    bottom: 0.2rem;
    width: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.rules-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.rules-intro {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.rules-list {
    margin-bottom: 1.5rem;
}

.rule-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
}

.rule-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.rule-text {
    flex: 1;
    color: var(--text-secondary);
    line-height: 1.7;
}

.rule-text strong {
    color: var(--primary-dark);
}

.rules-tiebreaker {
    background: var(--bg-color);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.rules-tiebreaker h3 {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.rules-tiebreaker p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.rules-tiebreaker ol {
    margin: 0;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.rules-tiebreaker ol li {
    margin-bottom: 0.4rem;
    line-height: 1.6;
}

.rules-note {
    background: linear-gradient(135deg, rgba(244, 162, 97, 0.1) 0%, rgba(231, 111, 81, 0.1) 100%);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    border-left: 4px solid var(--primary-color);
}

.rules-note p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.rules-note p:last-child {
    margin-bottom: 0;
}

.teams-preview h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    position: relative;
    padding-left: 1rem;
}

.teams-preview h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.2rem;
    bottom: 0.2rem;
    width: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

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

.team-badge {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 0.4rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.team-badge:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
}

.team-badge img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-bottom: 0.5rem;
    object-fit: contain;
}

.team-badge span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.footer {
    background: var(--text-primary);
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: auto;
}

.footer p {
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.footer p:last-child {
    font-size: 0.85rem;
    opacity: 0.6;
}

@media (max-width: 768px) {
    .header-content {
        justify-content: center;
        text-align: center;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .nav-tab {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .teams-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .quick-links {
        grid-template-columns: 1fr;
    }
}
