/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #123f34;
    --primary-dark: #091f1a;
    --primary-light: #2f7d66;
    --secondary-color: #c7902b;
    --accent-color: #efc977;
    --danger-color: #d32f2f;
    --danger-dark: #9a0007;
    --danger-light: #ff6659;
    --text-dark: #14211d;
    --text-light: #64716c;
    --bg-light: #edf2ef;
    --bg-white: #ffffff;
    --border-color: rgba(20, 33, 29, 0.12);
    --shadow: 0 12px 30px rgba(7, 23, 18, 0.08);
    --shadow-lg: 0 24px 54px rgba(7, 23, 18, 0.14);
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background:
        radial-gradient(circle at top left, rgba(47, 125, 102, 0.08), transparent 28%),
        radial-gradient(circle at top right, rgba(239, 201, 119, 0.12), transparent 24%),
        var(--bg-light);
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.page-header {
    background:
        radial-gradient(circle at top left, rgba(239, 201, 119, 0.16), transparent 28%),
        linear-gradient(135deg, #102d27 0%, #0a181d 100%);
    color: #f5f9f6;
    padding: 72px 0 64px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.page-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.15), transparent 45%);
    opacity: 0.35;
    pointer-events: none;
}

.page-header .container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 900px;
}

.page-eyebrow {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15rem;
    color: rgba(255,255,255,0.75);
}

.page-header h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin: 0;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.page-description {
    font-size: 1.08rem;
    color: rgba(255,255,255,0.86);
    max-width: 700px;
    line-height: 1.75;
}

.page-header .page-actions {
    margin-top: 10px;
}

.page-header .page-actions .btn-secondary {
    background-color: rgba(255, 255, 255, 0.08);
    color: white;
    border-color: rgba(255,255,255,0.5);
    backdrop-filter: blur(10px);
}

.page-header .page-actions .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.16);
}

@media (max-width: 768px) {
    .page-header {
        text-align: center;
    }
    .page-header .container {
        align-items: center;
    }
    .page-description {
        text-align: center;
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    background-image: url(../background.jpg);
    background-size: cover;
    background-size: cover;
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content {
    background: #00000075;
    padding: 1rem;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.about a {
    text-decoration: none;
}

.tagline {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.description {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 1.5rem auto;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.9rem 1.5rem;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: all 0.25s ease;
    cursor: pointer;
    border: 1px solid transparent;
    font-size: 1rem;
    box-shadow: var(--shadow);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color) 0%, #c98a2a 100%);
    color: #14211d;
    border-color: rgba(20, 33, 29, 0.08);
}

.btn-primary:hover {
    filter: brightness(1.03);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: var(--bg-white);
    color: var(--primary-dark);
    border-color: rgba(18, 63, 52, 0.18);
    box-shadow: var(--shadow);
}

.btn-secondary:hover {
    background-color: rgba(18, 63, 52, 0.06);
    border-color: rgba(18, 63, 52, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.section-eyebrow {
    display: inline-block;
    margin: 0 auto 0.9rem;
    padding: 0.38rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(18, 63, 52, 0.14);
    background: rgba(255, 255, 255, 0.72);
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(7, 23, 18, 0.06);
}

.section-eyebrow:hover {
    background: rgba(18, 63, 52, 0.08);
    border-color: rgba(18, 63, 52, 0.2);
    transform: translateY(-1px);
}

.section-eyebrow::after {
    content: ' #';
    opacity: 0.6;
}

/* About Section */
.about {
    padding: 4rem 0;
    background-color: var(--bg-white);
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

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

.about-card {
    text-align: center;
    padding: 2rem;
    background-color: var(--bg-light);
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

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

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

.about-card p {
    color: var(--text-light);
}

/* Social Section */
.social {
    padding: 4rem 0;
    background-color: var(--bg-light);
}

.social h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.social-intro {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.social-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.social-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background-color: var(--bg-white);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.social-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.social-icon {
    flex-shrink: 0;
}

.social-card.facebook:hover {
    border-left: 4px solid #1877f2;
}

.social-card.discord:hover {
    border-left: 4px solid #5865f2;
}

.social-card.instagram:hover {
    border-left: 4px solid #e4405f;
}

.social-card.facebook svg { color: #1877f2; }
.social-card.discord svg { color: #5865f2; }
.social-card.instagram svg { color: #e4405f; }

.social-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
}

.social-info p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Rankings Section */
.rankings-section {
    padding: 3rem 0;
    background-color: var(--bg-white);
    min-height: 70vh;
}

.rankings-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.rankings-intro {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.rankings-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 1rem;
}

.tab-btn:hover {
    background-color: var(--primary-light);
    color: white;
}

.tab-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-dark);
}

.rankings-table-container {
    margin-top: 2rem;
}

.rankings-table-container h3 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.table-responsive {
    overflow-x: auto;
    background-color: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.rankings-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.rankings-table thead {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.rankings-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.rankings-table th.medal-col,
.rankings-table td.medal {
    width: 64px;
    text-align: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.rankings-table td.medal {
    font-size: 1.4rem;
}

.rankings-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.18s, transform 0.12s, box-shadow 0.12s;
    will-change: transform;
}

.rankings-table tbody tr:hover {
    background-color: var(--bg-light);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.rankings-table tbody tr:last-child {
    border-bottom: none;
}

.rankings-table td {
    padding: 1rem;
}

.rankings-table .rank {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.rankings-table .name {
    font-weight: 600;
    color: var(--text-dark);
}

.rankings-table .rating {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.no-data {
    text-align: center;
    padding: 4rem 2rem;
    background-color: var(--bg-light);
    border-radius: 8px;
    margin-top: 2rem;
}

.no-data p {
    font-size: 1.2rem;
    color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content h2 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1.2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .about h2,
    .social h2,
    .rankings-section h2 {
        font-size: 2rem;
    }

    .social-links {
        grid-template-columns: 1fr;
    }

    .rankings-controls {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }
}
