@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --font-sans: 'Plus Jakarta Sans', sans-serif;
    --color-bg-dark: #070708;
    --color-bg-light: #f8fafc;
    --color-accent-red: #ea580c;
    --color-accent-orange: #f97316;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg-dark);
    color: #f1f5f9;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(15, 15, 20, 0.5);
}
::-webkit-scrollbar-thumb {
    background: rgba(220, 38, 38, 0.4);
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 38, 38, 0.7);
}

/* Premium Animated Background */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -10;
    background: radial-gradient(circle at 10% 20%, rgba(20, 10, 10, 1) 0%, rgba(5, 5, 5, 1) 90.2%);
    overflow: hidden;
}

.gradient-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 0, 0, 0.15) 0%, rgba(249, 115, 22, 0.05) 30%, transparent 60%);
    animation: rotateGlow 30s linear infinite;
}

.gradient-bg::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -20%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.12) 0%, rgba(249, 115, 22, 0.04) 40%, transparent 70%);
    animation: floatGlow 20s ease-in-out infinite alternate;
}

/* Glassmorphism Panel */
.glass-panel {
    background: rgba(18, 18, 24, 0.45);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glass-panel:hover {
    border-color: rgba(220, 38, 38, 0.2);
    box-shadow: 0 8px 32px 0 rgba(220, 38, 38, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Neon Glow Cards */
.glow-card-red {
    position: relative;
}
.glow-card-red::after {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.4), rgba(249, 115, 22, 0.1), transparent);
    z-index: -1;
    border-radius: 17px;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.glow-card-red:hover::after {
    opacity: 1;
}

/* Glass Input */
.glass-input {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}
.glass-input:focus {
    outline: none !important;
    border-color: rgba(220, 38, 38, 0.5) !important;
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.2) !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

/* Glass Buttons */
.glass-btn-primary {
    background: linear-gradient(135deg, #dc2626 0%, #ea580c 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5);
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
}

.glass-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transition: all 0.3s ease;
}
.glass-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Animations */
@keyframes rotateGlow {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes floatGlow {
    0% {
        transform: translateY(0px) scale(1);
    }
    100% {
        transform: translateY(-40px) scale(1.1);
    }
}

.animate-pulse-slow {
    animation: pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.03);
    }
}

/* Custom Utilities */
.text-glow-red {
    text-shadow: 0 0 10px rgba(220, 38, 38, 0.5), 0 0 20px rgba(220, 38, 38, 0.2);
}

/* Sidebar Custom Glass Navigation */
.sidebar-glass {
    background: rgba(10, 10, 12, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

/* For Light Mode Support (Optional Toggle) */
body.light-mode {
    background-color: var(--color-bg-light);
    color: #1e293b;
}
body.light-mode .gradient-bg {
    background: radial-gradient(circle at 10% 20%, #f1f5f9 0%, #e2e8f0 90.2%);
}
body.light-mode .gradient-bg::before, body.light-mode .gradient-bg::after {
    opacity: 0.2;
}
body.light-mode .glass-panel {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
}
body.light-mode .glass-panel:hover {
    border-color: rgba(220, 38, 38, 0.2);
    box-shadow: 0 8px 32px 0 rgba(220, 38, 38, 0.08);
}
body.light-mode .glass-input {
    background: rgba(0, 0, 0, 0.02) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #1e293b !important;
}
body.light-mode .glass-input:focus {
    background: rgba(255, 255, 255, 0.9) !important;
}
body.light-mode .glass-btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: #1e293b;
}
body.light-mode .glass-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
}
body.light-mode .sidebar-glass {
    background: rgba(248, 250, 252, 0.85);
    border-right-color: rgba(0, 0, 0, 0.08);
}
body.light-mode text-glow-red {
    text-shadow: none;
}

/* =============================================
   Dropdown Popup Animation
   ============================================= */
@keyframes dropdownOpen {
    0% {
        opacity: 0;
        transform: scale(0.92) translateY(-8px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes dropdownClose {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.92) translateY(-8px);
    }
}

/* Applied on any dropdown menu element that toggles open */
.dropdown-menu {
    transform-origin: top left;
    animation: dropdownOpen 0.18s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Dots style dropdown specific */
#dots_menu:not(.hidden) {
    transform-origin: top center;
    animation: dropdownOpen 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Each item inside the dropdown has a staggered slide-in */
#dots_menu > div {
    transition: background 0.15s ease, transform 0.12s ease;
}
#dots_menu > div:hover {
    transform: translateX(4px);
}

/* Preset logo select custom styling */
#preset_logo option {
    background: rgba(18, 18, 24, 0.98);
    color: #f1f5f9;
}

/* Corner/inner selects */
#corners_type option,
#corners_dot_type option,
#wifi_encrypt option,
#grad_type option {
    background: rgba(18, 18, 24, 0.98);
    color: #f1f5f9;
}

