*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222222;
    --border-color: #2a2a2a;
    --border-light: #333333;
    --text-primary: #e8e8e8;
    --text-secondary: #999999;
    --text-muted: #666666;
    --accent: #4ade80;
    --accent-dim: #22c55e;
    --accent-bg: rgba(74, 222, 128, 0.08);
    --red: #FF5555;
    --yellow: #FFAA00;
    --blue: #5555FF;
    --purple: #a78bfa;
    --radius: 8px;
    --radius-lg: 12px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mono: 'JetBrains Mono', 'Fira Code', monospace;
    --nav-height: 70px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* ===== HERO WRAPPER ===== */
.hero-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at top, rgba(74, 222, 128, 0.08) 0%, transparent 60%);
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.hero-wrapper::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to top, var(--bg-primary), transparent);
    pointer-events: none;
    z-index: 1;
}

.hero-wrapper .container {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.top-nav {
    padding: 24px 0;
    position: static;
    background: transparent;
    border: none;
    backdrop-filter: none;
    height: auto;
}

.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 100px;
}

.back-link:hover {
    color: var(--accent);
    border-color: var(--accent-dim);
    background: var(--accent-bg);
    transform: translateX(-4px);
}

.hero-wrapper header {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 0 100px;
    position: relative;
}

.hero-wrapper header h1 {
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 16px;
    background: linear-gradient(to bottom, #fff, #999);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-wrapper header p {
    color: var(--text-secondary);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 32px;
}

.hero-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--accent-bg);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: 20px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    margin-top: 8px;
}

.hero-secondary-actions {
    display: flex;
    justify-content: center;
    margin-top: 16px;
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.rules-nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    transition: all 0.2s;
}

.rules-nav-link:hover {
    color: var(--accent);
    border-color: var(--accent-dim);
    background: var(--accent-bg);
    transform: translateY(-2px);
}

/* ===== TEAM SECTIONS ===== */
.team-sections {
    display: flex;
    flex-direction: column;
}

.team-group {
    scroll-margin-top: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 0;
}

.section-header-small {
    margin-bottom: 40px;
    text-align: left;
}

.section-header-small h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-header-small p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-bottom: 32px;
}

.team-grid:empty {
    display: none;
}

.team-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 32px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.team-card-header {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.05), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.team-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-dim);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5);
}

.team-card:hover::before {
    opacity: 1;
}

.team-card.empty {
    border-style: solid;
}

.team-card.empty .rank,
.team-card.empty h3 {
    opacity: 1;
}

.team-card.empty:hover {
    opacity: 1;
    filter: grayscale(0);
    border-style: solid;
}

.team-avatar {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-card:hover .team-avatar {
    transform: translateY(-5px) scale(1.05);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.3);
}

.team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.mc-head {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.team-info {
    flex-grow: 1;
}

.team-header-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.team-header-info h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.rank {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
}

.team-info {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

.rank.owner { background: rgba(255, 170, 0, 0.25); color: var(--yellow); border: 1px solid rgba(255, 170, 0, 0.5); }
.rank.admin { background: rgba(170, 0, 0, 0.25); color: #AA0000; border: 1px solid rgba(170, 0, 0, 0.5); }
.rank.sr-mod { background: rgba(255, 85, 85, 0.25); color: var(--red); border: 1px solid rgba(255, 85, 85, 0.5); }
.rank.mod { background: rgba(255, 85, 85, 0.25); color: var(--red); border: 1px solid rgba(255, 85, 85, 0.5); }
.rank.tr-mod { background: rgba(255, 85, 85, 0.25); color: var(--red); border: 1px solid rgba(255, 85, 85, 0.5); }
.rank.sr-content { background: rgba(85, 85, 255, 0.25); color: var(--blue); border: 1px solid rgba(85, 85, 255, 0.5); }
.rank.content { background: rgba(85, 85, 255, 0.25); color: var(--blue); border: 1px solid rgba(85, 85, 255, 0.5); }
.rank.tr-content { background: rgba(85, 85, 255, 0.25); color: var(--blue); border: 1px solid rgba(85, 85, 255, 0.5); }
.rank.dev { background: rgba(85, 85, 255, 0.15); color: var(--blue); border: 1px solid rgba(85, 85, 255, 0.3); }

.team-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
}

.team-info .focus {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    display: block;
}

.member-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.member-link {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: var(--mono);
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.member-link img {
    width: 16px;
    height: 16px;
    opacity: 0.9;
}

/* ===== FOOTER ===== */
footer {
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

footer .footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

footer .copyright {
    color: var(--text-muted);
    font-size: 14px;
}

footer .footer-legal {
    color: var(--text-muted);
    font-size: 12px;
    opacity: 0.6;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading-state {
    text-align: center;
    padding: 100px 0;
    color: var(--text-dim);
    font-size: 1.2rem;
}

.error-msg {
    text-align: center;
    padding: 50px;
    color: #ff5555;
    background: rgba(255, 85, 85, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 85, 85, 0.2);
}


/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 992px) {
    .team-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-wrapper header h1 {
        font-size: 40px;
    }

    .team-sections {
        gap: 60px;
        padding: 60px 0;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .section-header-small h2 {
        font-size: 2rem;
    }
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(20px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-bg);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.back-to-top svg {
    transition: transform 0.3s ease;
}

.back-to-top:hover svg {
    transform: translateY(-2px);
}


/* ===== CHANGELOG STYLES ===== */
.changelog-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.changelog-month-group {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
}

.changelog-month-group.active {
    border-color: var(--accent-dim);
    background: rgba(255, 255, 255, 0.03);
}

.changelog-month-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.changelog-month-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.changelog-month-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.changelog-month-header .toggle-icon {
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.changelog-month-group.active .toggle-icon {
    transform: rotate(180deg);
    color: var(--accent);
}

.changelog-month-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 24px;
    display: flex;
    flex-direction: column;
}

.changelog-month-group.active .changelog-month-content {
    padding-bottom: 24px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.changelog-entry {
    display: flex;
    gap: 20px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.changelog-entry:last-child {
    border-bottom: none;
}

.changelog-date {
    flex-shrink: 0;
    width: 80px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    font-family: var(--mono);
    padding-top: 4px;
}

.changelog-list {
    list-style: none;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.changelog-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.change-type {
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    margin-top: 3px;
}

.change-type.type-add { background: rgba(74, 222, 128, 0.15); color: var(--accent); border: 1px solid rgba(74, 222, 128, 0.3); }
.change-type.type-remove { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }
.change-type.type-update { background: rgba(255, 170, 0, 0.15); color: var(--yellow); border: 1px solid rgba(255, 170, 0, 0.3); }

.change-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
