/* assets/css/style.css - Premium Dark Mode & Glassmorphism */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Cyber Neon (Default) */
    --bg-dark: #0A121E;
    --bg-darker: #060A12;
    --glass-bg: rgba(18, 26, 40, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #E6F7FF;
    --text-secondary: #9CA3AF;
    --neon-cyan: #00D1FF;
    --neon-indigo: #8B5CF6;
    --neon-blue: #1B6BFF;
    --accent-gradient: linear-gradient(135deg, var(--neon-cyan), var(--neon-indigo));
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
    --glow-color: rgba(0, 209, 255, 0.3);
}

[data-theme="emerald"] {
    /* Emerald Matrix */
    --bg-dark: #06100A;
    --bg-darker: #030805;
    --glass-bg: rgba(6, 16, 10, 0.7);
    --glass-border: rgba(16, 185, 129, 0.2);
    --text-primary: #ECFDF5;
    --text-secondary: #6EE7B7;
    --neon-cyan: #10B981;
    --neon-indigo: #34D399;
    --neon-blue: #059669;
    --accent-gradient: linear-gradient(135deg, #10B981, #34D399);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.9);
    --glow-color: rgba(16, 185, 129, 0.3);
}

[data-theme="royal"] {
    /* Royal Amethyst */
    --bg-dark: #0F0A1E;
    --bg-darker: #080511;
    --glass-bg: rgba(15, 10, 30, 0.7);
    --glass-border: rgba(217, 70, 239, 0.2);
    --text-primary: #FAE8FF;
    --text-secondary: #E9D5FF;
    --neon-cyan: #D946EF;
    --neon-indigo: #F59E0B;
    --neon-blue: #A855F7;
    --accent-gradient: linear-gradient(135deg, #D946EF, #F59E0B);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.9);
    --glow-color: rgba(217, 70, 239, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 20% 30%, var(--glow-color) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, var(--glow-color) 0%, transparent 40%);
    min-height: 100vh;
    transition: background-color 0.5s ease, background-image 0.5s ease, color 0.5s ease;
}

/* Theme Switcher UI */
.theme-switcher {
    padding: 1rem;
    display: flex;
    gap: 0.8rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.theme-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn.active {
    border-color: white;
    transform: scale(1.1);
    box-shadow: 0 0 10px var(--neon-cyan);
}

.theme-btn:hover {
    transform: scale(1.2);
}

.theme-btn-default {
    background: linear-gradient(135deg, #00D1FF, #8B5CF6);
}

.theme-btn-emerald {
    background: linear-gradient(135deg, #10B981, #34D399);
}

.theme-btn-royal {
    background: linear-gradient(135deg, #D946EF, #F59E0B);
}

/* Glassmorphism Utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: background 0.5s ease, border-color 0.5s ease;
}

/* Layout Containers & Grids */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 209, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 209, 255, 0.5);
}

.btn-glass {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--neon-cyan);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: white;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 0 2px rgba(0, 209, 255, 0.1);
}

/* Dashboard Sidebar */
.sidebar {
    width: 270px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: rgba(6, 10, 18, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2.5rem 1.5rem;
    z-index: 100;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding: 0.9rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 0.4rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.sidebar-link ion-icon {
    font-size: 1.35rem;
    transition: all 0.3s;
}

.sidebar-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(6px);
}

.sidebar-link.active {
    background: linear-gradient(90deg, rgba(0, 209, 255, 0.15) 0%, rgba(0, 209, 255, 0.02) 100%);
    color: white;
    border: 1px solid rgba(0, 209, 255, 0.1);
    border-left: 3px solid var(--neon-cyan);
    border-radius: 6px 10px 10px 6px;
    box-shadow: 0 4px 20px rgba(0, 209, 255, 0.05);
}

.sidebar-link.active ion-icon {
    color: var(--neon-cyan);
    filter: drop-shadow(0 0 8px rgba(0, 209, 255, 0.8));
}

.main-content {
    margin-left: 260px;
    padding: 2rem;
    transition: margin-left 0.3s ease;
}

/* Mobile Toggle */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--neon-cyan);
    color: var(--bg-darker);
    border: none;
    padding: 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 209, 255, 0.3);
}

/* Base Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }

    .main-content {
        margin-left: 220px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        left: -260px;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        margin-left: 0;
        padding: 4rem 1rem 1.5rem 1.5rem;
    }

    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .container {
        padding: 1rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    /* Touch optimization */
    .btn,
    .sidebar-link,
    .form-control {
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    .sidebar-link {
        padding: 1rem;
    }

    /* Stack Grids */
    .grid-2,
    .grid-3,
    .grid-2-1 {
        grid-template-columns: 1fr !important;
    }
}

/* Product Cards */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    transition: transform 0.3s, border-color 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--neon-cyan);
}

.badge {
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-subscription {
    background: rgba(139, 92, 246, 0.2);
    color: var(--neon-indigo);
}

.badge-once {
    background: rgba(0, 209, 255, 0.2);
    color: var(--neon-cyan);
}

.badge-affiliate {
    background: rgba(27, 107, 255, 0.2);
    color: var(--neon-blue);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade {
    animation: fadeIn 0.5s ease forwards;
}