/**
 * Simketh Design System - Liquid Glass DNA
 * Shared styles for all templates with consistent animations and glass effects
 * @version 1.0.0
 */

/* ======================================================
   DESIGN TOKENS — LIGHT MODE (Default)
====================================================== */
:root {
    /* Glass System - Clear (Video Shows Through) */
    --glass-bg:          rgba(255, 255, 255, 0.08);
    --glass-bg-strong:   rgba(255, 255, 255, 0.15);
    --glass-bg-subtle:   rgba(255, 255, 255, 0.05);
    --glass-border:      rgba(255, 255, 255, 0.30);
    --glass-border-subtle: rgba(255, 255, 255, 0.15);
    --glass-shadow:      0 8px 32px rgba(0, 0, 0, 0.15), 0 0 80px rgba(168, 85, 247, 0.15);
    --glass-shadow-strong: 0 16px 60px rgba(0, 0, 0, 0.20), 0 0 100px rgba(168, 85, 247, 0.25);
    --glass-blur:        10px;

    /* Brand Colors */
    --primary-amethyst:  #a855f7;
    --primary-cyan:      #22d3ee;
    --primary-gold:      #fbbf24;
    --primary-red:       #ef4444;
    --primary-green:     #10b981;

    /* Platform Colors */
    --ebay-red:          #e53e3e;
    --etsy-orange:       #F1641E;
    --shopify-green:     #96bf48;
    --amazon-orange:     #FF9900;

    /* Text Colors */
    --text-primary:      #ffffff;
    --text-secondary:    #e2e8f0;
    --text-muted:        #cbd5e1;

    /* Background Colors */
    --bg-obsidian:       #f8fafc;
    --bg-nebula:         #e2e8f0;
    --bg-void:           #f1f5f9;

    /* Status Colors */
    --status-green:      #10b981;
    --status-red:        #ef4444;
    --status-yellow:     #fbbf24;
    --status-blue:       #3b82f6;

    /* Animation Timing */
    --ease-smooth:       cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce:       cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-slow:         cubic-bezier(0.16, 1, 0.3, 1);

    /* Spacing Scale */
    --space-xs:          4px;
    --space-sm:          8px;
    --space-md:          16px;
    --space-lg:          24px;
    --space-xl:          32px;
    --space-2xl:         48px;
}

/* ======================================================
   DESIGN TOKENS — DARK MODE
====================================================== */
.dark {
    --glass-bg:          rgba(15, 10, 30, 0.20);
    --glass-bg-strong:   rgba(30, 15, 60, 0.30);
    --glass-bg-subtle:   rgba(15, 10, 30, 0.10);
    --glass-border:      rgba(192, 132, 252, 0.30);
    --glass-border-subtle: rgba(192, 132, 252, 0.15);
    --glass-shadow:      0 8px 32px rgba(0, 0, 0, 0.40), 0 0 80px rgba(192, 132, 252, 0.20);
    --glass-shadow-strong: 0 16px 60px rgba(0, 0, 0, 0.50), 0 0 100px rgba(192, 132, 252, 0.30);
    --glass-blur:        12px;

    --text-primary:      #f8fafc;
    --text-secondary:    #94a3b8;
    --text-muted:        #64748b;

    --bg-obsidian:       #020617;
    --bg-nebula:         #0f172a;
    --bg-void:           #1e293b;
}

/* ======================================================
   BASE RESET
====================================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-obsidian);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ======================================================
   ANIMATED BACKGROUND — RELAXING ORBS
====================================================== */
.animated-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(135deg, var(--bg-obsidian) 0%, var(--bg-nebula) 50%, var(--bg-obsidian) 100%);
    overflow: hidden;
    pointer-events: none;
}

.animated-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(34, 211, 238, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 40% 20%, rgba(251, 191, 36, 0.06) 0%, transparent 50%);
    animation: gradientShift 20s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

/* Floating Orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.35;
    will-change: transform;
    pointer-events: none;
}

.orb-1 {
    width: 900px;
    height: 900px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.25), transparent 70%);
    top: -15%;
    right: -5%;
    animation: float1 35s infinite ease-in-out;
}

.orb-2 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.20), transparent 70%);
    bottom: -10%;
    left: -5%;
    animation: float2 40s infinite ease-in-out;
    animation-delay: -10s;
}

.orb-3 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.15), transparent 70%);
    top: 40%;
    left: 30%;
    animation: float3 30s infinite ease-in-out;
    animation-delay: -5s;
}

.orb-4 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.18), transparent 70%);
    bottom: 20%;
    right: 10%;
    animation: float1 38s infinite ease-in-out;
    animation-delay: -15s;
}

/* Orb Animation Keyframes */
@keyframes float1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-50px, 80px) scale(1.12); }
    66% { transform: translate(-30px, 40px) scale(0.95); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(60px, -50px) scale(1.08); }
    66% { transform: translate(40px, -30px) scale(1.05); }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(70px, 30px) scale(1.10); }
    50% { transform: translate(50px, -40px) scale(0.95); }
    75% { transform: translate(-30px, 50px) scale(1.05); }
}

/* ======================================================
   PARTICLE EFFECTS — STARDUST
====================================================== */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(168, 85, 247, 0.4);
    border-radius: 50%;
    animation: particleFloat 15s infinite ease-in-out;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
    pointer-events: none;
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) translateX(50px); opacity: 0; }
}

/* ======================================================
   GLASS CARDS — CORE COMPONENT
====================================================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.5);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.5);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--glass-shadow);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 60px rgba(168, 85, 247, 0.25),
                0 0 100px rgba(168, 85, 247, 0.20),
                inset 0 0 60px rgba(255, 255, 255, 0.05);
    border-color: rgba(192, 132, 252, 0.50);
    background: var(--glass-bg-strong);
}

.glass-card-strong {
    background: var(--glass-bg-strong);
    border-color: var(--glass-border);
    box-shadow: var(--glass-shadow-strong);
}

.glass-card-subtle {
    background: var(--glass-bg-subtle);
    border-color: var(--glass-border-subtle);
}

/* ======================================================
   GLASS SIDEBAR
====================================================== */
.glass-sidebar {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 28px 24px;
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
    position: sticky;
    top: 24px;
    height: calc(100vh - 48px);
    animation: sidebarSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes sidebarSlideIn {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.glass-sidebar::-webkit-scrollbar { width: 0; }

/* ======================================================
   NAVIGATION ITEMS
====================================================== */
.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 16px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.nav-item:hover::before {
    opacity: 1;
}

.nav-item:hover {
    background: rgba(168, 85, 247, 0.12);
    color: var(--text-primary);
    transform: translateX(6px);
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.15);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.22) 0%, rgba(34, 211, 238, 0.22) 100%);
    border: 1px solid rgba(168, 85, 247, 0.35);
    color: var(--text-primary);
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.nav-item.active .material-symbols-outlined {
    animation: iconPulse 2s infinite ease-in-out;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 6px 0;
}

/* ======================================================
   BUTTONS
====================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn-luxury {
    background: linear-gradient(135deg, var(--primary-amethyst) 0%, var(--primary-cyan) 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.30);
}

.btn-luxury:hover {
    transform: scale(1.04) translateY(-2px);
    box-shadow: 0 10px 28px rgba(168, 85, 247, 0.45);
}

.btn-ghost {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-ghost:hover {
    border-color: rgba(168, 85, 247, 0.45);
    background: rgba(168, 85, 247, 0.10);
    transform: translateY(-1px);
}

.btn-subtle {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-subtle:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* ======================================================
   TYPOGRAPHY UTILITIES
====================================================== */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-amethyst) 0%, var(--primary-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-gold {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--primary-amethyst) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-red {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-amethyst) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ======================================================
   STAT CARDS
====================================================== */
.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 28px;
    box-shadow: var(--glass-shadow);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(34, 211, 238, 0.3), rgba(168, 85, 247, 0.3));
    border-radius: 24px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.stat-card:hover::after {
    opacity: 1;
    animation: borderRotate 3s linear infinite;
}

@keyframes borderRotate {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(20deg); }
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(168, 85, 247, 0.25);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* ======================================================
   BADGES
====================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.badge-amethyst {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.30);
}

.badge-cyan {
    background: rgba(34, 211, 238, 0.12);
    color: #22d3ee;
    border: 1px solid rgba(34, 211, 238, 0.25);
}

.badge-gold {
    background: rgba(251, 191, 36, 0.14);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.30);
}

.badge-green {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-red {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-platform {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
}

.badge-ebay { background: rgba(229, 62, 62, 0.15); color: #e53e3e; border: 1px solid rgba(229, 62, 62, 0.30); }
.badge-etsy { background: rgba(241, 100, 30, 0.15); color: #F1641E; border: 1px solid rgba(241, 100, 30, 0.30); }
.badge-shopify { background: rgba(150, 191, 72, 0.15); color: #96bf48; border: 1px solid rgba(150, 191, 72, 0.30); }
.badge-amazon { background: rgba(255, 153, 0, 0.15); color: #FF9900; border: 1px solid rgba(255, 153, 0, 0.30); }

/* ======================================================
   ANIMATION UTILITIES
====================================================== */
.card-animate {
    animation: cardFadeUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.card-animate:nth-child(1) { animation-delay: 0.1s; }
.card-animate:nth-child(2) { animation-delay: 0.2s; }
.card-animate:nth-child(3) { animation-delay: 0.3s; }
.card-animate:nth-child(4) { animation-delay: 0.4s; }
.card-animate:nth-child(5) { animation-delay: 0.5s; }
.card-animate:nth-child(6) { animation-delay: 0.6s; }

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

.fade-in {
    animation: fadeIn 0.65s ease both;
}

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

.fade-in-scale {
    animation: fadeInScale 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% { transform: translateX(100%); }
}

/* ======================================================
   SCROLLBAR STYLING
====================================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.25);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 85, 247, 0.4);
}

/* ======================================================
   FORM INPUTS — GLASS STYLE
====================================================== */
.input-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 100%;
}

.input-glass:focus {
    outline: none;
    border-color: var(--primary-amethyst);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

.input-glass::placeholder {
    color: var(--text-muted);
}

/* ======================================================
   RESPONSIVE UTILITIES
====================================================== */
@media (max-width: 768px) {
    .glass-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        width: 280px;
        border-radius: 0 24px 24px 0;
        z-index: 1000;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .glass-sidebar.open {
        left: 0;
    }

    .orb-1, .orb-2, .orb-3, .orb-4 {
        opacity: 0.25;
    }

    .stat-value {
        font-size: 1.5rem;
    }
}

/* ======================================================
   MATERIAL ICONS FONT VARIATION
====================================================== */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ======================================================
   LOADING STATES
====================================================== */
.skeleton {
    background: linear-gradient(90deg, var(--glass-bg) 25%, var(--glass-bg-strong) 50%, var(--glass-bg) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ======================================================
   TOAST NOTIFICATIONS
====================================================== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: var(--glass-shadow-strong);
    animation: toastSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

.toast.success { border-color: rgba(16, 185, 129, 0.4); }
.toast.error { border-color: rgba(239, 68, 68, 0.4); }
.toast.warning { border-color: rgba(251, 191, 36, 0.4); }
