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

:root {
    --bg: #0d0d0d;
    --bg2: #161616;
    --bg3: #1f1f1f;
    --border: #2a2a2a;
    --text: #e5e5e5;
    --text2: #888;
    --accent: #4ade80;
    --accent2: #818cf8;
}

html {
    font-size: 15px;
}

body {
    font-family: 'Space Grotesk', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
}

/* layout */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.logo-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.logo-icon {
    width: 24px;
    height: 24px;
}

/* nav */
.nav {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 8px 14px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text2);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

.nav-btn:hover {
    color: var(--text);
    border-color: var(--text2);
}

.nav-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

/* main */
.main {
    flex: 1;
}

.section-header {
    margin-bottom: 28px;
}

.section-header h2 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.section-header p {
    color: var(--text2);
    font-size: 0.95rem;
}

/* feature cards */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 32px;
}

.feature-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, transform 0.15s;
    cursor: pointer;
}

.feature-card::after {
    content: '→';
    margin-left: auto;
    font-size: 1.2rem;
    color: var(--text2);
    transition: color 0.15s, transform 0.15s;
}

.feature-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.feature-card:hover::after {
    color: var(--accent);
    transform: translateX(4px);
}

.feature-card .feature-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text);
}

.feature-card .feature-info p {
    font-size: 0.85rem;
    color: var(--text2);
    margin: 0;
}

@media (max-width: 768px) {
    .feature-cards {
        grid-template-columns: 1fr;
    }
}

/* version cards */
.version-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.version-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px;
    position: relative;
    transition: border-color 0.15s;
    display: flex;
    flex-direction: column;
}

.version-card:hover {
    border-color: var(--accent);
}

.card-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
}

.version-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent);
}



.version-desc {
    color: var(--text2);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.6;
    flex: 1;
}

.play-btn {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    border: none;
    border-radius: 6px;
    color: #000;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.15s;
    margin-top: auto;
}

.play-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.3);
}

.play-btn:active {
    transform: translateY(0);
}

/* footer */
.footer {
    text-align: center;
    padding: 32px 0;
    color: var(--text2);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.footer-discord {
    color: var(--text2);
    transition: color 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
}

.footer-discord:hover {
    color: #5865F2;
    transform: scale(1.1);
}

/* clients grid */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.client-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    transition: border-color 0.15s;
    display: flex;
    flex-direction: column;
}

.client-card:hover {
    border-color: var(--accent);
}

.client-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.client-name-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.client-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 600;
}

.client-ver-tag {
    font-size: 0.8rem;
    color: var(--text);
    opacity: 0.7;
}

.client-version {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    padding: 4px 10px;
    background: var(--bg3);
    border-radius: 4px;
}

.client-desc {
    color: var(--text2);
    font-size: 0.85rem;
    margin-bottom: 14px;
    line-height: 1.5;
}

.client-btn {
    width: 100%;
    padding: 10px;
    background: var(--accent);
    border: none;
    border-radius: 6px;
    color: #000;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.15s;
}

.client-btn:hover {
    opacity: 0.85;
}

.client-btns {
    display: flex;
    gap: 8px;
    margin-top: auto;
    margin-bottom: 12px;
}

.client-btns .client-btn {
    flex: 1;
}

.client-btn-wasm {
    background: var(--accent);
}

.client-downloads {
    display: flex;
    gap: 8px;
    border-top: 1px solid var(--border);
    padding-top: 10px;
}

.client-dl-link {
    flex: 1;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text2);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.15s;
}

.client-dl-link:hover {
    color: var(--text);
    background: var(--bg3);
    border-color: var(--border);
}

/* version filter */
.version-filter {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 10px 20px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text2);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.filter-btn:hover {
    color: var(--text);
    border-color: var(--text2);
}

.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

/* texture grid */
.texture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
}

.texture-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.15s;
    display: flex;
    flex-direction: column;
}

.texture-card:hover {
    border-color: var(--accent);
}

.texture-preview {
    height: 160px;
    background: var(--bg3);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.texture-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.texture-info {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.texture-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.texture-res {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 6px;
    background: var(--bg3);
    border-radius: 3px;
    color: var(--accent);
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
}

.texture-desc {
    color: var(--text2);
    font-size: 0.8rem;
    margin-bottom: 12px;
    line-height: 1.4;
    flex: 1;
}

.texture-dl {
    width: 100%;
    padding: 8px;
    background: var(--accent);
    border: none;
    border-radius: 5px;
    color: #000;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    margin-top: auto;
}

.texture-dl:hover {
    opacity: 0.85;
}

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

.server-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.15s;
}

.server-card:hover {
    border-color: var(--accent);
    background: var(--bg3);
}

.server-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.server-icon {
    font-size: 1.8rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg3);
    border-radius: 6px;
    flex-shrink: 0;
}

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

.server-name {
    font-weight: 600;
    font-size: 1.15rem;
    line-height: 1.2;
    margin-bottom: 1px;
}

.server-desc {
    color: var(--text2);
    font-size: 1rem;
    line-height: 1.3;
}

.server-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.server-tag {
    font-size: 0.75rem;
    padding: 3px 8px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text2);
}

.server-versions {
    font-size: 0.85rem;
    color: #a78bfa;
    padding-left: 12px;
    border-left: 2px solid var(--border);
}

.server-players {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-weight: 600;
    font-size: 0.85rem;
}

.online-dot {
    width: 10px;
    height: 10px;
    background: #666;
    border-radius: 50%;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 8px var(--accent);
    }

    50% {
        opacity: 0.6;
        box-shadow: 0 0 4px var(--accent);
    }
}

.server-ip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent);
    text-align: right;
    flex-shrink: 0;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.server-ping-embed {
    width: 100%;
    max-width: 100%;
    border-radius: 4px;
    overflow: hidden;
}

/* changelog */
.changelog {
    margin-top: 48px;
}

.changelog-timeline {
    position: relative;
    padding-left: 28px;
}

.changelog-timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border);
}

.changelog-entry {
    position: relative;
    margin-bottom: 24px;
}

.changelog-entry:last-child {
    margin-bottom: 0;
}

.changelog-entry::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent);
    box-sizing: border-box;
    transition: background 0.2s, box-shadow 0.2s;
}

.changelog-entry:hover::before {
    background: var(--accent);
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.4);
}

.changelog-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--accent);
    margin-bottom: 6px;
    font-weight: 500;
    letter-spacing: -0.3px;
}

.changelog-body {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 18px;
    transition: border-color 0.15s;
}

.changelog-entry:hover .changelog-body {
    border-color: var(--accent);
}

.changelog-body h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.changelog-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.changelog-body li {
    position: relative;
    padding-left: 16px;
    color: var(--text2);
    font-size: 0.85rem;
    line-height: 1.7;
}

.changelog-body li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
    font-size: 1rem;
}

@media (max-width: 600px) {
    .changelog-timeline {
        padding-left: 24px;
    }

    .changelog-entry::before {
        left: -24px;
        width: 10px;
        height: 10px;
    }

    .changelog-body {
        padding: 12px 14px;
    }
}

/* footer */
.footer {
    text-align: center;
    padding: 24px 0;
    margin-top: 40px;
    border-top: 1px solid var(--border);
    color: var(--text2);
    font-size: 0.8rem;
}

/* toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    padding: 12px 24px;
    background: var(--accent);
    border-radius: 6px;
    color: #000;
    font-weight: 500;
    font-size: 0.9rem;
    opacity: 0;
    transition: all 0.2s;
    z-index: 999;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* responsive */
@media (max-width: 600px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav {
        width: 100%;
    }

    .nav-btn {
        flex: 1;
        text-align: center;
        padding: 10px 8px;
        font-size: 0.8rem;
    }

    .section-header h2 {
        font-size: 1.3rem;
    }

    .version-num {
        font-size: 1.8rem;
    }



    .server-card {
        flex-direction: column;
        text-align: center;
    }

    .server-meta {
        justify-content: center;
    }
}

/* packs callout */
.packs-callout {
    margin-top: 24px;
    padding: 16px 20px;
    background: var(--bg2);
    border: 1px dashed var(--border);
    border-radius: 8px;
    text-align: center;
}

.callout-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--text2);
    font-size: 0.9rem;
}

.callout-icon {
    font-size: 1.2rem;
}

.link-btn {
    background: none;
    border: none;
    color: var(--accent2);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.link-btn:hover {
    color: var(--accent);
}



/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: pointer;
}

.lightbox.show {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.show .lightbox-content {
    transform: scale(1);
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    color: var(--text);
    font-size: 1.1rem;
    margin-top: 16px;
    font-weight: 500;
}

.texture-preview {
    cursor: pointer;
}

.texture-preview:hover img {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

.fa-crown {
    margin-right: 8px;
    color: gold;
}