/**
 * Prysmera Design System v2.0
 * Light gradient aesthetic with ambient animations
 * Color Palette: Blue (#88b9d6, #a8d5eb) | Honey (#ffd89b, #ffe4b3) | Pink (#ffb8c6, #ffd1dc)
 */

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

/* ========================================
   CSS CUSTOM PROPERTIES
   ======================================== */
:root {
    /* === Color Palette === */
    --blue-primary: #88b9d6;
    --blue-secondary: #a8d5eb;
    --blue-light: #c4dff0;
    --blue-accent: #6ba3c7;
    --blue-darker: #5b9fd6;
    
    --honey-primary: #ffd89b;
    --honey-secondary: #ffe4b3;
    --honey-light: #ffedd4;
    --honey-accent: #ffc166;
    
    --pink-primary: #ffb8c6;
    --pink-secondary: #ffd1dc;
    --pink-light: #ffe5ec;
    
    /* === Neutrals === */
    --text-primary: #1a202c;
    --text-secondary: #2d3748;
    --text-muted: #4a5568;
    --text-light: #64748b;
    --text-lighter: #718096;
    
    /* === Backgrounds === */
    --bg-gradient: linear-gradient(180deg, 
        #f8f9fa 0%, 
        #ffffff 15%,
        #fafbfc 50%,
        #f5f7f9 100%);
    
    --bg-glass: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%,
        rgba(250, 252, 254, 0.95) 100%);
    
    --bg-glass-light: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%,
        rgba(246, 248, 250, 0.9) 100%);
    
    /* === Borders & Dividers === */
    --border-light: rgba(184, 207, 224, 0.3);
    --border-medium: rgba(184, 207, 224, 0.4);
    --border-strong: rgba(184, 207, 224, 0.5);
    --border-divider: rgba(210, 218, 230, 0.3);
    
    /* === Shadows === */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04),
                 0 4px 16px rgba(136, 185, 214, 0.08),
                 inset 0 1px 0 rgba(255, 255, 255, 0.8);
    
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06),
                 0 8px 24px rgba(136, 185, 214, 0.12),
                 inset 0 1px 0 rgba(255, 255, 255, 0.9);
    
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08),
                 0 16px 48px rgba(136, 185, 214, 0.15),
                 inset 0 1px 0 rgba(255, 255, 255, 1);
    
    --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.10),
                    0 24px 64px rgba(136, 185, 214, 0.2);
    
    /* === Transitions === */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* === Spacing Scale === */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    
    /* === Border Radius === */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    /* === Typography === */
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ========================================
   GLOBAL RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-gradient);
    color: var(--text-secondary);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* ========================================
   AMBIENT BACKGROUND BLOBS
   ======================================== */
.ambient-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    opacity: 0;
    animation: ambientFadeIn 2s ease-out forwards;
}

@keyframes ambientFadeIn {
    to { opacity: 1; }
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    animation: breathe 15s ease-in-out infinite;
    will-change: transform;
}

/* Blue Orbs */
.glow-orb.blue-1 {
    background: radial-gradient(circle, var(--blue-primary) 0%, var(--blue-light) 100%);
    width: 1080px;
    height: 1080px;
    top: -200px;
    right: -200px;
    opacity: 0.18;
    animation-delay: 0s;
}

.glow-orb.blue-2 {
    background: radial-gradient(circle, var(--blue-secondary) 0%, #d0e8f5 100%);
    width: 990px;
    height: 990px;
    bottom: 10%;
    left: 10%;
    opacity: 0.16;
    animation-delay: 9s;
}

/* Honey Orbs */
.glow-orb.honey-1 {
    background: radial-gradient(circle, var(--honey-primary) 0%, var(--honey-light) 100%);
    width: 900px;
    height: 900px;
    top: 20%;
    left: -300px;
    opacity: 0.15;
    animation-delay: 3s;
}

.glow-orb.honey-2 {
    background: radial-gradient(circle, var(--honey-secondary) 0%, #fff5dc 100%);
    width: 720px;
    height: 720px;
    bottom: 30%;
    right: 15%;
    opacity: 0.14;
    animation-delay: 12s;
}

/* Pink Orbs */
.glow-orb.pink-1 {
    background: radial-gradient(circle, var(--pink-primary) 0%, var(--pink-secondary) 100%);
    width: 810px;
    height: 810px;
    top: 50%;
    right: 5%;
    opacity: 0.13;
    animation-delay: 6s;
}

.glow-orb.pink-2 {
    background: radial-gradient(circle, var(--pink-secondary) 0%, var(--pink-light) 100%);
    width: 864px;
    height: 864px;
    top: 70%;
    left: 30%;
    opacity: 0.12;
    animation-delay: 4.5s;
}

@keyframes breathe {
    0%, 100% { 
        transform: scale(1) translateY(0) translateX(0); 
    }
    33% { 
        transform: scale(1.15) translateY(-30px) translateX(20px); 
    }
    66% { 
        transform: scale(0.95) translateY(20px) translateX(-20px); 
    }
}

/* ========================================
   REUSABLE COMPONENTS
   ======================================== */

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px 24px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-smooth);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue-darker) 0%, var(--blue-primary) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(91, 159, 214, 0.25);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(91, 159, 214, 0.35);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background: transparent;
    color: var(--text-muted);
    border: 2px solid rgba(210, 218, 230, 0.8);
}

.btn-secondary:hover {
    border-color: var(--blue-primary);
    color: var(--text-secondary);
    background: rgba(136, 185, 214, 0.05);
}

/* === Cards === */
.card {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1.5px solid var(--border-medium);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: radial-gradient(circle at 50% 0%, 
        rgba(136, 185, 214, 0.12) 0%, 
        transparent 70%);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(136, 185, 214, 0.6);
    box-shadow: var(--shadow-hover);
}

.card-feature {
    background: var(--bg-glass-light);
    padding: var(--space-xl);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.05),
        0 10px 20px rgba(136, 185, 214, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.card-feature:hover {
    transform: translateY(-12px) rotateX(2deg);
    box-shadow: 
        0 12px 24px rgba(0, 0, 0, 0.08),
        0 24px 48px rgba(136, 185, 214, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    border-color: rgba(136, 185, 214, 0.4);
}

/* === Badges === */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.badge-blue {
    background: linear-gradient(135deg, rgba(136, 185, 214, 0.2) 0%, rgba(136, 185, 214, 0.15) 100%);
    color: #4a6fa5;
    border: 1px solid rgba(136, 185, 214, 0.3);
}

.badge-honey {
    background: linear-gradient(135deg, var(--honey-primary) 0%, var(--honey-secondary) 100%);
    color: var(--text-primary);
}

.badge-pink {
    background: linear-gradient(135deg, rgba(255, 184, 198, 0.2) 0%, rgba(255, 209, 220, 0.15) 100%);
    color: #c2185b;
    border: 1px solid rgba(255, 184, 198, 0.3);
}

.badge-green {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.2) 0%, rgba(34, 197, 94, 0.15) 100%);
    color: #15803d;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

/* === Icons === */
.icon-gradient-blue {
    background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-secondary) 100%);
}

.icon-gradient-honey {
    background: linear-gradient(135deg, var(--honey-primary) 0%, var(--honey-secondary) 100%);
}

.icon-gradient-pink {
    background: linear-gradient(135deg, var(--pink-primary) 0%, var(--pink-secondary) 100%);
}

/* === Animated Underlines === */
.link-underline {
    position: relative;
    text-decoration: none;
    transition: color var(--transition-base);
}

.link-underline::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--blue-primary), var(--honey-primary));
    transition: width var(--transition-smooth);
}

.link-underline:hover::after {
    width: 100%;
}

/* === Glass Morphism Utility === */
.glass {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.glass-light {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes badgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

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

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-light { color: var(--text-light); }

.bg-blue { background: var(--blue-primary); }
.bg-honey { background: var(--honey-primary); }
.bg-pink { background: var(--pink-primary); }

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

/* === Responsive Utilities === */
@media (max-width: 768px) {
    :root {
        --space-xl: 24px;
        --space-2xl: 32px;
        --space-3xl: 48px;
    }
    
    .glow-orb {
        filter: blur(100px);
    }
}

/* === Performance Optimization === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .glow-orb {
        animation: none;
    }
}

/* ========================================
   SIDEBAR NAVIGATION
   ======================================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 240px;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(250, 252, 254, 0.95) 100%);
    border-right: 1.5px solid var(--border-medium);
    padding: 2rem 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    animation: slideInLeft 0.8s ease-out forwards;
}

.logo {
    padding: 0 1.5rem;
    margin-bottom: 2rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 1.75rem;
    filter: drop-shadow(0 2px 4px rgba(136, 185, 214, 0.3));
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    padding: 0.875rem 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    text-decoration: none;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(136, 185, 214, 0.1);
    color: var(--blue-primary);
    border-left-color: rgba(136, 185, 214, 0.3);
}

.nav-item.active {
    background: rgba(136, 185, 214, 0.12);
    color: var(--blue-primary);
    border-left-color: var(--blue-primary);
    font-weight: 600;
}

.nav-icon {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.nav-item--logout {
    margin-top: auto;
}

/* Mobile sidebar */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-smooth);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
}
