:root {
    color-scheme: light;
    /* Color Palette - Light Theme (Mocha Premium - High Contrast) */
    --bg-main: #faf3e0;      /* Richer Caramel/OldLace background (NOT WHITE) */
    --bg-alt: #f0e2c1;       /* Deeper accent paper tone */
    --text-main: #1a0f0a;    /* Intense Espresso for perfect legibility */
    --text-muted: #4a3b34;   /* Dark bronze for secondary text */
    --nav-bg: rgba(250, 243, 224, 0.98);
    --crema-input: #ffffff;  /* Pure white for inputs to POP */
    --border-color: rgba(44, 24, 16, 0.15);
    --accent-glow: rgba(212, 163, 115, 0.3);
    --glass-bg: rgba(250, 243, 224, 0.7);
    --glass-border: rgba(44, 24, 16, 0.2);
    
    /* Branding Accents - Umapyoi Original (Caramel & Gold) */
    --p-pink: #d4a373;       /* Original Caramel */
    --p-pink-soft: #faedcd;  /* Soft Crema */
    --p-gold: #dda15e;       /* Bronze Accent */
    --p-pink-deep: #bc6c25;  /* Deep Mocha */
    --a-purple: #dda15e;     /* Legacy support for bronze */
    
    /* Design Tokens */
    --header-h: 85px;
    --header-h-scrolled: 75px;
    --radius-lg: 32px;
    --radius-md: 20px;
    --radius-sm: 14px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 4px 12px rgba(44, 24, 16, 0.08);
    --shadow-md: 0 10px 32px rgba(44, 24, 16, 0.12);
    --shadow-lg: 0 20px 60px rgba(44, 24, 16, 0.18);
}

/* Locking Overlay System */
.config-container { position: relative; }
.locked-section {
    position: relative;
    pointer-events: none;
    user-select: none;
    opacity: 0.6;
    filter: blur(2px) grayscale(0.5);
}
.lock-barrier {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(44, 24, 16, 0.05);
    cursor: not-allowed;
    border-radius: var(--radius-md);
}
.lock-message {
    background: var(--bg-main);
    padding: 2.5rem 3rem;
    border-radius: var(--radius-md);
    border: 3px solid var(--p-gold);
    box-shadow: var(--shadow-lg);
    text-align: center;
    max-width: 450px;
    animation: toastSlideIn 0.5s ease;
}

/* Visual Hierarchy States */
.guild-inactive {
    filter: grayscale(1) opacity(0.6);
    transition: var(--transition);
}
.guild-inactive:hover {
    filter: grayscale(0.5) opacity(0.85);
    transform: translateY(-4px) !important;
}
.guild-inactive .btn-ghost {
    filter: none !important; /* Keep Invite button colorful */
    opacity: 1 !important;
}

.guild-no-icon-minimal {
    background: var(--glass-bg) !important;
    border: 1px dashed var(--border-color) !important;
    box-shadow: none !important;
}
.guild-no-icon-minimal .card-banner {
    background: rgba(44, 24, 16, 0.03) !important;
}

/* Toast Unification - Fixed to Right */
.umapyoi-toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: none;
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg-main: #151312; /* Deep Espresso */
    --bg-alt: #1e1b1a; /* Soft Espresso */
    --text-main: #f8f8f8;
    --text-muted: #a69c97;
    --nav-bg: rgba(21, 19, 18, 0.95);
    --border-color: rgba(212, 163, 115, 0.2);
    --p-pink-soft: rgba(212, 163, 115, 0.15);
    --accent-glow: rgba(212, 163, 115, 0.4);
    --glass-bg: rgba(30, 27, 26, 0.6);
    --glass-border: rgba(212, 163, 115, 0.1);
    --shadow-md: 0 8px 40px rgba(0, 0, 0, 0.5);
}

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

option {
    background-color: var(--bg-main);
    color: var(--text-main);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', 'Quicksand', 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease;
}

/* Anti-flash: hide until theme is applied */
html:not(.theme-ready) body {
    opacity: 0;
}
html.theme-ready body {
    opacity: 1;
    transition: opacity 0.15s ease;
}

.module-page {
    padding-top: var(--header-h);
}

h1, h2, h3, h4 {
    font-family: 'Quicksand', 'Outfit', sans-serif;
    letter-spacing: -0.01em;
    font-weight: 700;
}

/* --- Global Animations --- */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
    50% { box-shadow: 0 0 40px var(--accent-glow); }
}

/* --- Layout Components --- */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.container-wide {
    max-width: 1700px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.container-fluid {
    width: 98%;
    max-width: none;
    margin: 0 auto;
    padding: 0 24px;
}

/* Glassmorphism */
.glass {
    background: var(--nav-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.glass:hover {
    transform: translateY(-5px);
    border-color: var(--p-pink);
    box-shadow: var(--shadow-lg);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 34px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-p {
    background: linear-gradient(135deg, var(--p-pink), var(--a-purple));
    color: white !important;
}

.btn-p::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--p-pink-deep), var(--a-purple));
    opacity: 0;
    z-index: -1;
    transition: var(--transition);
}

.btn-p:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 15px 30px var(--accent-glow);
}

.btn-p:hover::after {
    opacity: 1;
}

.btn-ghost {
    background: transparent;
    color: var(--text-main);
    border: 2px solid var(--border-color);
}

.btn-ghost:hover {
    background: var(--bg-alt);
    border-color: var(--p-pink);
    transform: translateY(-2px);
}

/* --- Navigation --- */
nav {
    height: var(--header-h);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

nav.scrolled {
    height: var(--header-h-scrolled);
    background: var(--nav-bg);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.7rem;
    font-weight: 850;
    font-family: 'Quicksand', 'Outfit', sans-serif;
    color: var(--text-main);
    text-decoration: none;
    z-index: 1001;
    user-select: none;
}

.logo span {
    color: var(--p-pink);
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 32px;
}

.nav-item {
    position: relative;
    padding: 10px 0;
}

.nav-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-family: 'Nunito', 'Quicksand', sans-serif;
    font-size: 0.95rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.85;
    user-select: none;
}

.nav-link:hover, .nav-link.active {
    color: var(--p-pink);
    opacity: 1;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--p-pink);
    border-radius: 2px;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
    z-index: 1100; /* Higher than drawer */
    transition: var(--transition);
    user-select: none;
}

.menu-toggle:hover {
    background: var(--p-pink-soft);
    color: var(--p-pink);
}

/* Dropdowns */
.dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    width: 290px;
    background: var(--bg-main);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    pointer-events: none;
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: all;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--p-pink-soft);
    transform: translateX(5px);
}

.dropdown-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--p-pink);
    flex-shrink: 0;
}

.dropdown-icon i {
    width: 22px;
    height: 22px;
}

.dropdown-content h5 {
    font-size: 0.95rem;
    margin-bottom: 2px;
    font-weight: 700;
}

.dropdown-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Profile Dropdown (Slider UI) --- */
.profile-dropdown-container {
    position: relative;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    border-radius: 40px;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.profile-trigger:hover {
    border-color: var(--p-pink);
    background: var(--p-pink-soft);
}

.profile-avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--p-pink);
    object-fit: cover;
}

.profile-slider {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 280px;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transition: var(--transition);
    z-index: 1100;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.profile-slider.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.slider-header {
    padding: 20px;
    background: linear-gradient(to bottom, var(--p-pink-soft), transparent);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.slider-body {
    padding: 10px;
}

.slider-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.slider-item:hover {
    background: var(--p-pink-soft);
    color: var(--p-pink);
    transform: translateX(5px);
}

.slider-item i {
    width: 18px;
    height: 18px;
    opacity: 0.8;
}

.slider-divider {
    height: 1px;
    background: var(--border-color);
    margin: 10px 15px;
}

.slider-stats {
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    background: rgba(0,0,0,0.05);
}

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

.stat-box small {
    display: block;
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
}

.stat-box span {
    font-weight: 800;
    color: var(--p-pink);
    font-size: 1.1rem;
}

/* UMAPYOI UNIQUE LOGO */
.logo-box {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--p-pink), var(--p-pink-deep));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 12px var(--accent-glow);
    transition: var(--transition);
}

.logo:hover .logo-box {
    transform: rotate(-5deg) scale(1.1);
}

.logo-dot {
    width: 8px;
    height: 8px;
    background: var(--p-pink);
    border-radius: 50%;
    margin-left: 2px;
    display: inline-block;
    box-shadow: 0 0 10px var(--accent-glow);
    animation: glowPulse 2s infinite;
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: flex-start; /* Changed from center to move content up */
    padding-top: calc(var(--header-h) + 60px); /* More air at the top but content starts earlier */
    background: radial-gradient(circle at 80% 20%, var(--p-pink-soft) 0%, transparent 40%);
    position: relative;
    overflow: hidden;
}

.hero-bg-particles {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(rgba(212, 163, 115, 0.6) 2.2px, transparent 2.2px);
    background-size: 48px 48px;
    z-index: 0;
    opacity: 1;
    animation: panBackground 30s linear infinite;
}

@keyframes panBackground {
    from { background-position: 0 0; }
    to { background-position: 100% 100%; }
}

.hero::before {
    content: 'UMAPYOYI';
    position: absolute;
    top: 15%;
    left: -5%;
    font-size: 15vw;
    font-weight: 950;
    color: var(--text-main);
    z-index: -1;
    opacity: 0.03;
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 60px;
}

.hero-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(212, 163, 115, 0.08); /* Soft Caramel translucent */
    border: 1px solid rgba(212, 163, 115, 0.2);
    border-radius: 100px;
    color: var(--p-pink);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    margin-bottom: 28px;
    backdrop-filter: blur(4px);
    box-shadow: 0 8px 25px var(--accent-glow);
    transition: var(--transition);
}

.hero-badge i {
    width: 14px;
    height: 14px;
    color: var(--p-pink-deep);
    filter: drop-shadow(0 0 5px var(--p-pink));
}

.hero-badge:hover {
    background: rgba(212, 163, 115, 0.12);
    transform: translateY(-2px);
    border-color: var(--p-pink);
}

.hero-text h1 {
    font-size: 3.8rem;
    line-height: 1.15;
    margin-bottom: 20px;
    animation: fadeIn 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-text h1 mark {
    background: transparent;
    color: var(--p-pink);
}

.hero-text p {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 540px;
    animation: fadeIn 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-actions {
    display: flex;
    gap: 20px;
    animation: fadeIn 1.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-img {
    position: relative;
    animation: float 6s ease-in-out infinite;
    display: flex;
    justify-content: center;
    z-index: 1;
}

.hero-img img {
    max-width: 100%;
    width: 380px;
    height: auto;
    border-radius: 50%;
    border: 4px solid var(--border-color);
    box-shadow: 0 15px 45px rgba(0,0,0,0.25);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); } 
}

/* Floating Tags Orbit System */
.floating-tags {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 5;
}

.floating-tag {
    position: absolute;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    padding: 10px 18px;
    border-radius: 50px;
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    white-space: nowrap;
    border: 1px solid rgba(212, 163, 115, 0.2);
    animation: spiral-entrance 1.5s cubic-bezier(0.19, 1, 0.22, 1) forwards, orbit-float 8s ease-in-out infinite;
    animation-delay: var(--delay, 0s), 1.5s;
    opacity: 0;
    pointer-events: auto;
    transition: var(--transition);
}

@keyframes spiral-entrance {
    from { 
        opacity: 0; 
        transform: translate(var(--start-x), var(--start-y)) scale(0) rotate(-540deg); 
        filter: blur(8px);
    }
    to { 
        opacity: 1; 
        transform: translate(0, 0) scale(1) rotate(0deg); 
        filter: blur(0);
    }
}

.floating-tag:hover {
    transform: scale(1.1) !important;
    border-color: var(--p-pink);
    box-shadow: 0 15px 40px var(--accent-glow);
    z-index: 10;
}

.floating-tag i {
    width: 18px;
    height: 18px;
    color: var(--p-pink);
    filter: drop-shadow(0 0 5px var(--p-pink-soft));
}

/* Orbits Positioning - Closer to images but avoiding coverage */
.tag-1 { top: 6%;   left: -8%;   --delay: 0.1s; --start-x: 58%; --start-y: 48%; }
.tag-2 { top: 76%;  left: -12%;  --delay: 0.3s; --start-x: 62%; --start-y: -26%; }
.tag-3 { top: 4%;   right: -2%;  --delay: 0.2s; --start-x: -52%; --start-y: 50%; }
.tag-4 { top: 82%;  right: -8%;  --delay: 0.5s; --start-x: -58%; --start-y: -32%; }
.tag-5 { top: 45%;  right: -35%; --delay: 0.4s; --start-x: -85%; --start-y: 5%; }

@keyframes orbit-float {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(4px, -4px); }
    50% { transform: translate(-3px, 5px); }
    75% { transform: translate(-5px, -2px); }
}

/* Mobile adjustments for Floating Tags - IMPROVED */
@media (max-width: 768px) {
    .floating-tags { 
        display: flex; 
        flex-wrap: wrap; 
        justify-content: center; 
        position: relative; 
        gap: 12px; 
        margin-top: 40px; 
        top: auto !important; left: auto !important; right: auto !important; bottom: auto !important;
        transform: none !important;
        width: 100% !important;
        max-width: 500px;
        z-index: 10;
        pointer-events: auto;
    }

    .floating-tag {
        position: relative !important;
        animation: fadeIn 0.8s ease forwards;
        opacity: 1 !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        margin: 5px !important;
        box-shadow: var(--shadow-md);
    }
}
.feature-card {
    padding: 45px;
    border-radius: var(--radius-lg);
    user-select: none;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--p-pink-soft);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--p-pink);
    margin-bottom: 25px;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--p-pink);
    color: white;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .nav-links { gap: 20px; }
    .hero-text h1 { font-size: 3.5rem; }
}

@media (max-width: 968px) {
    .menu-toggle { display: flex; }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--bg-main);
        flex-direction: column;
        justify-content: center;
        gap: 20px;
        padding: 40px;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        z-index: 1000;
        backdrop-filter: blur(20px);
        visibility: hidden;
        opacity: 0;
    }

    .nav-links.active {
        right: 0;
        visibility: visible;
        opacity: 1;
        transform: translateX(0);
    }

    .nav-item { width: 100%; }
    
    .dropdown {
        position: static;
        transform: none !important;
        width: 100%;
        opacity: 1 !important;
        visibility: visible !important;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        margin-top: 5px;
        pointer-events: all;
        transition: max-height 0.3s ease-out;
    }

    .nav-item:hover .dropdown {
        max-height: 500px;
        transform: none;
    }

    .hero {
        padding-top: calc(var(--header-h) + 20px);
        text-align: center;
        align-items: center;
    }

    .hero-grid { 
        grid-template-columns: 1fr; 
        justify-items: center;
        text-align: center; 
        gap: 40px; 
    }
    
    .hero-text {
        align-items: center;
        text-align: center;
    }

    .hero-text h1 { font-size: 2.8rem; }
    .hero-text p { margin: 0 auto 30px; font-size: 1.1rem; }
    .hero-actions { justify-content: center; flex-direction: column; gap: 15px; width: 100%; max-width: 300px; margin: 0 auto; }
    .hero-actions .btn { width: 100%; }
    
    .hero-img { 
        order: -1; 
        margin-top: 20px; 
        flex-direction: column; 
        align-items: center;
    }
    .hero-img img { max-width: 60%; margin: 0 auto; }
}

/* --- Module Pages --- */
.module-hero {
    padding: 160px 0 100px; /* Increased padding to avoid "cramped" feel */
    text-align: center;
    background: radial-gradient(circle at 50% 0%, var(--p-pink-soft) 0%, transparent 70%);
}

.module-hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
}

.module-hero h1 span {
    color: var(--p-pink);
}

.module-hero p {
    font-size: 1.3rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto 40px;
}

.module-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    padding-bottom: 100px;
}

@media (max-width: 480px) {
    .module-hero { padding: 120px 0 60px; }
    .module-hero h1 { font-size: 2.5rem; }
}

/* --- Footer --- */
footer {
    padding: 60px 0 30px;
    background: var(--bg-alt);
    border-top: 1px solid var(--border-color);
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Sidebar Section Collapsing */
.sidebar-section {
    transition: var(--transition);
}
.sidebar-section.icon-mode ul li a span {
    display: none;
}
.sidebar-section.icon-mode ul li a {
    justify-content: center;
    padding: 12px 0;
}
.sidebar-section.icon-mode .sidebar-heading {
    text-align: center;
    padding-left: 0 !important;
    font-size: 0.65rem !important;
}

/* Server Controls */
.server-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.search-wrapper {
    position: relative;
    flex-grow: 1;
    max-width: 400px;
}
.search-input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    transition: var(--transition);
}
.search-input:focus {
    border-color: var(--p-pink);
    outline: none;
    box-shadow: 0 0 10px var(--accent-glow);
}
.category-link:focus {
    outline: none;
    box-shadow: 0 0 10px var(--accent-glow);
}
.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}
.btn-refresh {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--p-pink-soft);
    color: var(--p-pink);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}
tr.active-row {
    background: var(--p-pink-soft);
    color: var(--p-pink);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}
.btn-refresh:hover {
    background: var(--p-pink);
    color: white;
    transform: translateY(-2px);
}
.btn-refresh i.spinning {
    animation: spin 1s linear infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Sidebar Categories (Guild Panel) */
.sidebar-category {
    margin-bottom: 25px;
}
.sidebar-category .sidebar-heading {
    margin-bottom: 8px;
    padding-left: 15px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.sidebar-category .sidebar-nav {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* =============== CONFIG PANEL FORM STYLES =============== */

/* Shared form input base */
.cfg-input, .cfg-select, .cfg-textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
}
.cfg-input:focus, .cfg-select:focus, .cfg-textarea:focus {
    border-color: var(--p-pink);
    box-shadow: 0 0 0 3px var(--p-pink-soft);
}
.cfg-select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238e9aaf' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}
.cfg-textarea {
    min-height: 90px;
    resize: vertical;
    line-height: 1.6;
}

/* Color picker */
.cfg-color-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cfg-color-wrap input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    padding: 2px;
    background: transparent;
    transition: var(--transition);
}
.cfg-color-wrap input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}
.cfg-color-wrap input[type="color"]::-webkit-color-swatch {
    border-radius: 7px;
    border: none;
}
.cfg-color-wrap input[type="color"]:hover {
    border-color: var(--p-pink);
    transform: scale(1.05);
}
.cfg-color-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Toggle switch */
.cfg-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-main);
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    transition: var(--transition);
}
.cfg-toggle:hover {
    border-color: var(--p-pink-soft);
}
.cfg-toggle-info h4 {
    margin: 0;
    font-size: 0.95rem;
}
.cfg-toggle-info p {
    margin: 3px 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.switch {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--border-color);
    border-radius: 26px;
    transition: 0.3s;
}
.slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}
.switch input:checked + .slider {
    background: var(--p-pink);
}
.switch input:checked + .slider::before {
    transform: translateX(22px);
}

/* Field group */
.cfg-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cfg-label {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-main);
}
.cfg-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: -2px;
}

/* Field rows */
.cfg-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.cfg-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

/* Section card with accent line */
.cfg-section {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}
.cfg-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--p-pink), var(--p-pink-deep));
}
.cfg-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 1.2rem;
    font-weight: 700;
}
.cfg-section-title i {
    color: var(--p-pink);
    width: 24px;
    height: 24px;
}
.cfg-section-body {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* Save button */
.cfg-save-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--p-pink), var(--p-pink-deep));
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.02em;
}
.cfg-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
}
.cfg-save-btn:active {
    transform: translateY(0);
}

/* Premium Button System */
.cfg-footer {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.cfg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 34px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: 'Inter', sans-serif;
    color: white;
    text-decoration: none;
}

.cfg-btn.primary {
    background: linear-gradient(135deg, var(--p-pink), var(--p-pink-deep));
    box-shadow: 0 10px 20px var(--accent-glow);
}

.cfg-btn.primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px var(--accent-glow);
}

.cfg-btn.guild-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.cfg-btn.primary:active {
    transform: translateY(-1px);
}

.cfg-btn i {
    width: 20px;
    height: 20px;
}

/* Success toast */
.cfg-success {
    padding: 14px 20px;
    margin-bottom: 24px;
    border-radius: 14px;
    background: rgba(46, 204, 113, 0.1);
    border: 1.5px solid rgba(46, 204, 113, 0.3);
    color: #2ecc71;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    animation: fadeIn 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Banner preview */
.cfg-banner-preview {
    margin-top: 10px;
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid var(--border-color);
    max-height: 200px;
}
.cfg-banner-preview img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Checkbox list for gambling channels */
.cfg-channel-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding: 4px;
}
.cfg-channel-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-main);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}
.cfg-channel-item:hover {
    border-color: var(--p-pink);
}
.cfg-channel-item input[type="checkbox"] {
    accent-color: var(--p-pink);
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.cfg-channel-item.checked {
    border-color: var(--p-pink);
    background: var(--p-pink-soft);
}

/* Responsive */
@media (max-width: 768px) {
    .cfg-row, .cfg-row-3 {
        grid-template-columns: 1fr;
    }
    .guild-config-grid {
        grid-template-columns: 1fr;
    }
}
/* Sub-tabs System - PREMIUM REDESIGN */
.sub-tabs-container {
    display: inline-flex;
    gap: 8px;
    margin-bottom: 30px;
    padding: 6px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sub-tab {
    background: transparent !important;
    border: none !important;
    padding: 10px 22px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    outline: none;
    white-space: nowrap;
}

.sub-tab i {
    width: 16px;
    height: 16px;
    opacity: 0.7;
    transition: inherit;
}

.sub-tab:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05) !important;
}

.sub-tab.active {
    color: #fff;
    background: linear-gradient(135deg, var(--p-pink), var(--p-pink-deep)) !important;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.sub-tab.active i {
    color: #fff;
    opacity: 1;
}

.sub-tab-content {
    animation: subTabEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes subTabEntrance {
    from { opacity: 0; transform: translateY(15px); filter: blur(4px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* Switches */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #2c2c2c;
    transition: .4s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 26px; width: 26px;
    left: 4px; bottom: 4px;
    background-color: white;
    transition: .4s;
}
input:checked + .slider { background-color: var(--p-pink); }
input:focus + .slider { box-shadow: 0 0 1px var(--p-pink); }
input:checked + .slider:before { transform: translateX(26px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }


/* --- Enhanced Hero Elements --- */
.hero-blobs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 75%);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: blobFloat 25s infinite alternate ease-in-out;
}

.blob-1 { top: -15%; left: -10%; background: radial-gradient(circle, rgba(212, 163, 115, 0.4) 0%, transparent 75%); }
.blob-2 { bottom: 0%; right: -10%; background: radial-gradient(circle, rgba(188, 108, 37, 0.3) 0%, transparent 75%); animation-delay: -7s; }
.blob-3 { top: 30%; left: 40%; background: radial-gradient(circle, rgba(212, 163, 115, 0.2) 0%, transparent 75%); animation-delay: -12s; }

@keyframes blobFloat {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    100% { transform: translate(100px, 150px) scale(1.2) rotate(10deg); }
}

/* Floating Bits */
.floating-bits {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.bit {
    position: absolute;
    color: var(--p-pink);
    opacity: 0.2;
    animation: bitFloat 12s infinite alternate ease-in-out;
}

.bit i { width: 35px; height: 35px; }

.bit-1 { top: 12%; left: 8%; animation-delay: 0s; }
.bit-2 { top: 78%; left: 12%; animation-delay: -3s; }
.bit-3 { top: 18%; right: 12%; animation-delay: -6s; }
.bit-4 { top: 82%; right: 8%; animation-delay: -9s; }

@keyframes bitFloat {
    0% { transform: translateY(0) rotate(0deg) scale(1); }
    100% { transform: translateY(-40px) rotate(30deg) scale(1.1); }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: var(--transition);
    z-index: 20;
}

.scroll-indicator:hover {
    color: var(--p-pink);
    transform: translateX(-50%) translateY(-8px);
}

.mouse {
    width: 30px;
    height: 48px;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    position: relative;
    box-shadow: 0 0 15px var(--accent-glow);
}

.wheel {
    width: 4px;
    height: 10px;
    background: var(--p-pink);
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollMouse 2.2s infinite;
}

@keyframes scrollMouse {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(20px); }
}

/* Social Sidebar */
.social-sidebar {
    position: fixed;
    right: 40px;
    bottom: 40px;
    z-index: 9999;
}

.social-link {
    width: 65px;
    height: 65px;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--p-pink);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    text-decoration: none;
    animation: float 5s ease-in-out infinite;
}

.social-link:hover {
    transform: scale(1.15) rotate(10deg);
    background: var(--p-pink-soft);
    color: var(--p-pink);
    border-color: var(--p-pink);
    box-shadow: 0 15px 45px var(--accent-glow);
}

.social-link i { width: 32px; height: 32px; }

/* Expanded Footer */
.footer-grid {
    display: grid;
    grid-template-columns: 2.5fr 1fr 1fr;
    gap: 80px;
    margin-bottom: 80px;
    padding-bottom: 60px;
    border-bottom: 1px solid var(--border-color);
}

.footer-brand p {
    color: var(--text-muted);
    max-width: 400px;
    line-height: 1.8;
    font-size: 1.05rem;
}

.footer-links h4 {
    margin-bottom: 30px;
    font-size: 1.2rem;
    color: var(--text-main);
    font-family: "Quicksand", sans-serif;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links ul li {
    margin-bottom: 18px;
}

.footer-links ul li a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.footer-links ul li a:hover {
    color: var(--p-pink);
    padding-left: 8px;
}

@media (max-width: 968px) {
    .footer-grid { grid-template-columns: 1fr; gap: 50px; }
    .social-sidebar { bottom: 30px; right: 30px; }
    .social-link { width: 55px; height: 55px; }
    .scroll-indicator { display: none; }
}

/* --- Save Bar (Unsaved Changes Toast) --- */
.save-bar {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-main);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    padding: 15px 25px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-md);
    z-index: 9999;
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
    opacity: 0;
    pointer-events: none;
}

.save-bar.visible {
    bottom: 30px;
    opacity: 1;
    pointer-events: auto;
}

.save-bar-message {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
    font-weight: 600;
}

.save-bar-message i {
    color: var(--p-pink);
}

.save-bar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.save-bar .btn-reset {
    background: transparent;
    color: var(--text-muted);
    border: none;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: var(--transition);
}

.save-bar .btn-reset:hover {
    color: var(--text-main);
    background: var(--bg-alt);
}

.save-bar .btn-save {
    background: var(--p-pink);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.save-bar .btn-save:hover {
    background: var(--p-pink-deep);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--accent-glow);
}

