/* --- Variables & Design Tokens --- */
:root {
    --bg-dark: #0f1115;
    --bg-card: rgba(30, 34, 42, 0.6);
    --bg-card-hover: rgba(40, 45, 55, 0.8);
    --primary: #00c896;
    --primary-hover: #00e0a8;
    --accent: #9dd5d7;
    --text-main: #eff1f5;
    --text-muted: #a0a4b0;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-blur: 12px;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.3);
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* --- Layout --- */
.app-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    width: 280px;
    background: rgba(15, 17, 21, 0.95);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.logo-container {
    margin-bottom: 3rem;
    text-align: center;
}

.logo-container img {
    width: 120px;
    margin: 0 auto;
    filter: drop-shadow(0 0 15px rgba(0, 200, 150, 0.4));
    transition: transform 0.3s ease;
}

.logo-container img:hover {
    transform: scale(1.05) rotate(-2deg);
}

.nav-group {
    margin-bottom: 2rem;
}

.nav-group h3 {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-left: 0.5rem;
    cursor: default;
    /* Changed from pointer as menus should probably stay open or be accordion */
}

.nav-item {
    display: block;
    padding: 0.75rem 1rem;
    margin-bottom: 0.25rem;
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(0, 200, 150, 0.1);
    color: var(--primary);
}

.nav-item.active {
    background: rgba(0, 200, 150, 0.15);
    border-left: 3px solid var(--primary);
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    margin-left: 280px;
    /* Match sidebar width */
    padding: 3rem 4rem;
    width: calc(100% - 280px);
}

.content-header {
    margin-bottom: 3rem;
    animation: fadeInDown 0.6s ease-out;
}

.content-header h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* --- Cards & Glassmorphism --- */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0, 200, 150, 0.3);
    background: var(--bg-card-hover);
}

/* Grid for features */
.grid-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.feature h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.feature p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--primary);
    color: #1a1a1a;
    border-radius: 12px;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-align: center;
}

.btn:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(0, 200, 150, 0.4);
}

.btn-large {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

/* --- Components --- */
.info-box {
    background: rgba(68, 70, 80, 0.4);
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1.5rem;
    color: #ddd;
}

.server-ip-display {
    text-align: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.2);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    margin: 2rem 0;
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    color: var(--primary);
    position: relative;
    overflow: hidden;
}

.server-ip-display::after {
    content: 'Click to Copy';
    position: absolute;
    bottom: 5px;
    right: 10px;
    font-size: 0.7rem;
    opacity: 0.5;
    font-family: sans-serif;
}

/* --- Footer --- */
.footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}

.footer p {
    margin-bottom: 0.5rem;
}

/* --- Mobile Menu Toggle --- */
.menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1100;
    background: rgba(15, 17, 21, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
}

/* --- Animations --- */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive Design --- */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 5rem 1.5rem 2rem;
    }

    .menu-toggle {
        display: block;
    }

    .content-header h1 {
        font-size: 2rem;
    }
}

/* --- Spoilers / Accordions (New) --- */
/* --- Spoilers / Accordions (Premium Design) --- */
details {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

details[open] {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-color: rgba(0, 200, 150, 0.4);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

summary {
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text-main);
    position: relative;
    list-style: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.1rem;
    user-select: none;
}

summary::-webkit-details-marker {
    display: none;
}

summary:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--primary);
    padding-left: 1.8rem;
    /* Slight shift effect */
}

/* Custom Arrow Icon */
summary::after {
    content: '\f107';
    /* FontAwesome chevron-down */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--text-muted);
    font-size: 1rem;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55), color 0.3s ease;
}

details[open]>summary::after {
    transform: rotate(180deg);
    color: var(--primary);
}

summary:hover::after {
    color: var(--primary);
}

.spoiler-content {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.15);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Nested Mod Spoilers (Individual Items) --- */
details.mod-spoiler {
    background: rgba(255, 255, 255, 0.02) !important;
    /* Force reset */
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--text-muted);
    margin-top: 0.8rem;
    border-radius: 8px;
    box-shadow: none;
}

details.mod-spoiler[open] {
    border-color: var(--border-color);
    /* Keep subtle border */
    border-left-color: var(--primary);
    /* Highlight accent */
    background: rgba(255, 255, 255, 0.04) !important;
}

details.mod-spoiler summary {
    padding: 0.8rem 1.2rem;
    font-size: 1rem;
    font-family: var(--font-body);
    font-weight: 600;
}

details.mod-spoiler summary:hover {
    padding-left: 1.2rem;
    /* No shift for nested */
    color: var(--primary);
}

/* Smaller arrow for nested */
details.mod-spoiler summary::after {
    font-size: 0.9rem;
    content: '\f067';
    /* Plus icon */
}

details.mod-spoiler[open]>summary::after {
    content: '\f068';
    /* Minus icon */
    transform: rotate(0);
}

/* Mod Content Styles */
.mod-details {
    padding: 0.5rem 0.5rem 0 0.5rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.mod-details strong {
    color: var(--accent);
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mod-details p {
    margin-bottom: 1rem;
}

/* Styled Link Button */
.mod-details a {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 1rem;
    background: rgba(0, 200, 150, 0.1);
    color: var(--primary);
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 200, 150, 0.2);
}

.mod-details a:hover {
    background: var(--primary);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 200, 150, 0.2);
}

.mod-details a::after {
    content: '\f08e';
    /* External Link Icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 0.5rem;
    font-size: 0.8em;
}

/* --- Language Switcher --- */
.language-switcher {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    font-family: var(--font-heading);
}

.lang-btn:hover {
    border-color: var(--primary);
    color: var(--text-main);
}

.lang-btn.active {
    background: var(--primary);
    color: #1a1a1a;
    border-color: var(--primary);
}

/* --- Ad Banner --- */
.ad-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    animation: fadeInDown 0.8s ease-out;
}

.ad-text {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.8;
}

.ad-logo {
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.3)) grayscale(20%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    /* Optional, depending on if the image is square/rect */
}

.ad-logo:hover {
    transform: scale(1.05) translateY(-2px);
    filter: drop-shadow(0 5px 20px rgba(0, 200, 150, 0.2)) grayscale(0%);
    cursor: pointer;
}