/* 
DiviaMall Core Design System
Version: 1.0
The foundational CSS for the Digital Metropolis aesthetic
*/

/* ===============================================
   CSS VARIABLES & DESIGN TOKENS
   =============================================== */

:root {
    /* ===== COLOR SYSTEM ===== */
    /* Primary Palette */
    --divia-deep-space: #0a0a0f;
    --divia-electric-blue: #00d4ff;
    --divia-neon-purple: #8b5cf6;
    --divia-holographic-white: #f8fafc;
    
    /* Accent Colors */
    --divia-cyber-green: #00ff88;
    --divia-plasma-pink: #ff0080;
    --divia-golden-glow: #ffd700;
    --divia-warning-orange: #ff6b35;
    
    /* Transparency System */
    --glass-light: rgba(255, 255, 255, 0.05);
    --glass-medium: rgba(255, 255, 255, 0.1);
    --glass-heavy: rgba(255, 255, 255, 0.15);
    --accent-blue-overlay: rgba(0, 212, 255, 0.1);
    --accent-green-overlay: rgba(0, 255, 136, 0.1);
    --accent-pink-overlay: rgba(255, 0, 128, 0.1);
    
    /* ===== TYPOGRAPHY SYSTEM ===== */
    --font-primary: 'Orbitron', 'Exo', 'Space Grotesk', monospace;
    --font-secondary: 'Inter', 'SF Pro Display', 'Roboto', sans-serif;
    --font-accent: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Type Scale */
    --text-hero: 4.5rem;      /* 72px */
    --text-h1: 2.5rem;        /* 40px */
    --text-h2: 1.8rem;        /* 28px */
    --text-large: 1.2rem;     /* 19px */
    --text-body: 1rem;        /* 16px */
    --text-small: 0.875rem;   /* 14px */
    --text-caption: 0.75rem;  /* 12px */
    
    /* ===== SPACING SYSTEM ===== */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;
    --space-9: 80px;
    
    /* ===== BORDER RADIUS SYSTEM ===== */
    --radius-1: 4px;
    --radius-2: 8px;
    --radius-3: 12px;
    --radius-4: 16px;
    --radius-5: 24px;
    --radius-6: 32px;
    --radius-full: 50px;
    
    /* ===== SHADOW & GLOW SYSTEM ===== */
    --shadow-subtle: 0 4px 16px rgba(0, 212, 255, 0.1);
    --shadow-medium: 0 8px 32px rgba(0, 212, 255, 0.2);
    --shadow-strong: 0 20px 40px rgba(0, 212, 255, 0.3);
    --glow-primary: 0 0 20px rgba(0, 212, 255, 0.3);
    --glow-success: 0 0 20px rgba(0, 255, 136, 0.3);
    --glow-warning: 0 0 20px rgba(255, 107, 53, 0.3);
    
    /* ===== ANIMATION SYSTEM ===== */
    --ease-smooth: cubic-bezier(0.4, 0.0, 0.2, 1);
    --ease-sharp: cubic-bezier(0.4, 0.0, 0.6, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    --duration-fast: 150ms;
    --duration-normal: 300ms;
    --duration-slow: 500ms;
    
    /* ===== BACKDROP BLUR ===== */
    --blur-light: blur(20px);
    --blur-medium: blur(25px);
    --blur-heavy: blur(30px);
}

/* ===============================================
   RESET & BASE STYLES
   =============================================== */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-secondary);
    color: var(--divia-holographic-white);
    background: var(--divia-deep-space);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===============================================
   COSMIC BACKGROUND SYSTEM
   =============================================== */

.cosmic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, var(--divia-neon-purple) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, var(--divia-electric-blue) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, var(--divia-plasma-pink) 0%, transparent 50%);
    opacity: 0.1;
    z-index: -1;
    animation: cosmic-drift 20s ease-in-out infinite;
}

@keyframes cosmic-drift {
    0%, 100% { 
        transform: rotate(0deg) scale(1); 
    }
    50% { 
        transform: rotate(2deg) scale(1.1); 
    }
}

/* ===============================================
   GLASSMORPHISM COMPONENTS
   =============================================== */

.glass-light {
    background: var(--glass-light);
    backdrop-filter: var(--blur-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-medium {
    background: var(--glass-medium);
    backdrop-filter: var(--blur-medium);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.glass-heavy {
    background: var(--glass-heavy);
    backdrop-filter: var(--blur-heavy);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===============================================
   TYPOGRAPHY CLASSES
   =============================================== */

.text-hero {
    font-family: var(--font-primary);
    font-size: var(--text-hero);
    font-weight: 900;
    line-height: 1.1;
    background: linear-gradient(45deg, var(--divia-electric-blue), var(--divia-neon-purple), var(--divia-plasma-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-h1 {
    font-family: var(--font-primary);
    font-size: var(--text-h1);
    font-weight: 700;
    color: var(--divia-electric-blue);
}

.text-h2 {
    font-family: var(--font-primary);
    font-size: var(--text-h2);
    font-weight: 600;
    color: var(--divia-neon-purple);
}

.text-body {
    font-size: var(--text-body);
    line-height: 1.6;
}

.text-small {
    font-size: var(--text-small);
    opacity: 0.8;
}

.text-glow {
    text-shadow: var(--glow-primary);
}

.text-gradient {
    background: linear-gradient(45deg, var(--divia-electric-blue), var(--divia-neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===============================================
   BUTTON SYSTEM
   =============================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4) var(--space-6);
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-smooth);
    font-family: inherit;
    font-size: var(--text-body);
}

.btn-primary {
    background: linear-gradient(45deg, var(--divia-electric-blue), var(--divia-neon-purple));
    color: var(--divia-deep-space);
    box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-strong);
}

.btn-secondary {
    background: var(--glass-medium);
    color: var(--divia-electric-blue);
    border: 1px solid rgba(0, 212, 255, 0.3);
    backdrop-filter: var(--blur-light);
}

.btn-secondary:hover {
    background: var(--accent-blue-overlay);
    border-color: var(--divia-electric-blue);
    box-shadow: var(--glow-primary);
}

.btn-success {
    background: linear-gradient(45deg, var(--divia-cyber-green), var(--divia-electric-blue));
    color: var(--divia-deep-space);
}

.btn-warning {
    background: linear-gradient(45deg, var(--divia-warning-orange), var(--divia-plasma-pink));
    color: var(--divia-holographic-white);
}

.btn-icon {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
}

.btn-lg {
    padding: var(--space-5) var(--space-8);
    font-size: var(--text-large);
}

.btn-sm {
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-small);
}

/* ===============================================
   CARD SYSTEM
   =============================================== */

.card {
    background: var(--glass-light);
    backdrop-filter: var(--blur-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-4);
    padding: var(--space-6);
    transition: all var(--duration-normal) var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left var(--duration-slow) var(--ease-smooth);
}

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

.card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: var(--shadow-strong);
    border-color: var(--divia-electric-blue);
}

.card-header {
    margin-bottom: var(--space-4);
}

.card-title {
    font-family: var(--font-primary);
    font-size: var(--text-h2);
    color: var(--divia-electric-blue);
    margin-bottom: var(--space-2);
}

.card-subtitle {
    color: rgba(248, 250, 252, 0.7);
    font-size: var(--text-small);
}

.card-body {
    margin-bottom: var(--space-4);
}

.card-footer {
    margin-top: auto;
}

/* ===============================================
   FORM SYSTEM
   =============================================== */

.form-field {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    color: var(--divia-electric-blue);
    font-weight: 500;
    font-size: var(--text-small);
}

.form-input {
    width: 100%;
    padding: var(--space-4) var(--space-5);
    background: var(--glass-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-3);
    color: var(--divia-holographic-white);
    font-size: var(--text-body);
    transition: all var(--duration-normal) var(--ease-smooth);
    backdrop-filter: var(--blur-light);
}

.form-input:focus {
    outline: none;
    border-color: var(--divia-electric-blue);
    box-shadow: var(--glow-primary);
    background: var(--accent-blue-overlay);
}

.form-input::placeholder {
    color: rgba(248, 250, 252, 0.4);
}

.form-input.valid {
    border-color: var(--divia-cyber-green);
    box-shadow: var(--glow-success);
}

.form-input.invalid {
    border-color: var(--divia-plasma-pink);
    box-shadow: 0 0 15px rgba(255, 0, 128, 0.3);
}

/* ===============================================
   NAVIGATION SYSTEM
   =============================================== */

.nav-container {
    background: var(--glass-light);
    backdrop-filter: var(--blur-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-medium);
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    padding: var(--space-4) var(--space-6);
}

.nav-logo {
    font-family: var(--font-primary);
    font-size: var(--text-large);
    font-weight: 900;
    background: linear-gradient(45deg, var(--divia-electric-blue), var(--divia-neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    text-shadow: var(--glow-primary);
}

.nav-links {
    display: flex;
    gap: var(--space-5);
    list-style: none;
}

.nav-link {
    color: var(--divia-holographic-white);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--duration-fast) var(--ease-smooth);
}

.nav-link:hover {
    color: var(--divia-electric-blue);
    text-shadow: var(--glow-primary);
}

/* ===============================================
   UTILITY CLASSES
   =============================================== */

/* Spacing */
.m-0 { margin: 0; }
.m-1 { margin: var(--space-1); }
.m-4 { margin: var(--space-4); }
.p-0 { padding: 0; }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }

/* Display */
.d-flex { display: flex; }
.d-grid { display: grid; }
.d-block { display: block; }
.d-none { display: none; }

/* Flex */
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-column { flex-direction: column; }

/* Grid */
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

/* Text Alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Colors */
.text-primary { color: var(--divia-electric-blue); }
.text-secondary { color: var(--divia-neon-purple); }
.text-success { color: var(--divia-cyber-green); }
.text-warning { color: var(--divia-warning-orange); }

/* Effects */
.glow-primary { box-shadow: var(--glow-primary); }
.glow-success { box-shadow: var(--glow-success); }
.glow-warning { box-shadow: var(--glow-warning); }

/* ===============================================
   ANIMATION CLASSES
   =============================================== */

.animate-fade-in {
    animation: fade-in var(--duration-slow) var(--ease-smooth);
}

.animate-slide-up {
    animation: slide-up var(--duration-slow) var(--ease-smooth);
}

.animate-glow-pulse {
    animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 212, 255, 0.8);
    }
}

/* ===============================================
   RESPONSIVE DESIGN
   =============================================== */

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --text-hero: 3.5rem;
        --text-h1: 2rem;
    }
    
    .card:hover {
        transform: translateY(-5px);
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --text-hero: 2.5rem;
        --text-h1: 1.8rem;
        --space-6: 24px;
        --space-8: 48px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .nav {
        flex-direction: column;
        gap: var(--space-4);
    }
    
    .nav-links {
        flex-direction: column;
        text-align: center;
    }
    
    .card:hover {
        transform: none;
    }
}

/* ===============================================
   ACCESSIBILITY
   =============================================== */

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --divia-holographic-white: #ffffff;
        --glass-light: rgba(255, 255, 255, 0.15);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .cosmic-bg {
        animation: none;
    }
}

/* Focus styles for keyboard navigation */
.btn:focus-visible,
.form-input:focus-visible,
.nav-link:focus-visible {
    outline: 2px solid var(--divia-electric-blue);
    outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}