:root {
    /* Color Palette - Light Theme (Umapyoi Original) */
    --p-pink: #ff8fa3; /* More vibrant coral-pink */
    --p-pink-soft: #fff0f3;
    --p-pink-deep: #ff4d6d;
    --s-cream: #fdfaf1;
    --a-purple: #7209b7; /* Deeper violet */
    --a-green: #2ecc71;
    
    /* Functional Colors - Light */
    --bg-main: #ffffff;
    --bg-alt: #fdfafb; /* Tinted light alt */
    --text-main: #1a1a1a;
    --text-muted: #5f5f5f;
    --nav-bg: rgba(255, 255, 255, 0.9);
    --border-color: rgba(255, 143, 163, 0.15);
    --accent-glow: rgba(255, 143, 163, 0.3);
    
    /* 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(0, 0, 0, 0.03);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 56px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] {
    --bg-main: #0b0914; /* Deeper dark */
    --bg-alt: #120e24;
    --text-main: #f8f9fa;
    --text-muted: #8e9aaf;
    --nav-bg: rgba(11, 9, 20, 0.95);
    --border-color: rgba(255, 143, 163, 0.2);
    --p-pink-soft: rgba(255, 143, 163, 0.1);
    --accent-glow: rgba(255, 143, 163, 0.25);
    --shadow-md: 0 8px 40px rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: '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: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

/* --- 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: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* 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;
    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-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(--a-purple);
    border-radius: 2px;
    margin-left: 5px;
    box-shadow: 0 0 10px var(--a-purple);
    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::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 h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    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); } 
}

/* --- Features & Cards --- */
.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: var(--transition);
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        z-index: 1000;
        backdrop-filter: blur(20px);
    }

    .nav-links.active {
        right: 0;
        visibility: visible;
        opacity: 1;
    }

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

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

    .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 30px; }
    .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; }
    .hero-img { order: -1; margin-top: 20px; }
    .hero-img img { max-width: 65%; } /* Smaller on mobile to avoid overlap */
}

/* --- 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: white;
    transition: var(--transition);
}
.search-input:focus {
    border-color: var(--p-pink);
    outline: none;
    box-shadow: 0 0 10px rgba(255, 143, 163, 0.2);
}
.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: rgba(255,143,163,0.1);
    color: var(--p-pink);
    border: 1px solid rgba(255,143,163,0.3);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}
.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 rgba(255, 77, 109, 0.35);
}
.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 rgba(255, 143, 163, 0.25);
}

.cfg-btn.primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px rgba(255, 143, 163, 0.4);
}

.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), #ff7eb3) !important;
    box-shadow: 0 4px 15px rgba(255, 122, 180, 0.3);
}

.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%; }
