/**
 * Viddyy Premium Light Theme
 * Complete Design System for 3D Premium Light UI
 * Version: 2.0
 */

/* ========================================
   DESIGN TOKENS - COLOR PALETTE
   ======================================== */

:root {
    /* Primary Light Colors */
    --vd-white: #FFFFFF;
    --vd-pearl: #F8F9FA;
    --vd-ice: #F0F4F8;
    --vd-snow: #E8EDF2;
    --vd-silver: #CBD5E1;
    
    /* Premium Accent Colors */
    --vd-sky: #38BDF8;
    --vd-cyan: #06B6D4;
    --vd-blue: #3B82F6;
    --vd-lavender: #A78BFA;
    --vd-mint: #34D399;
    --vd-coral: #FB7185;
    
    /* Text Colors */
    --vd-text-primary: #1E293B;
    --vd-text-secondary: #475569;
    --vd-text-tertiary: #94A3B8;
    --vd-text-inverse: #FFFFFF;
    
    /* Gradients */
    --vd-gradient-sky: linear-gradient(135deg, #38BDF8 0%, #3B82F6 100%);
    --vd-gradient-mint: linear-gradient(135deg, #34D399 0%, #06B6D4 100%);
    --vd-gradient-lavender: linear-gradient(135deg, #A78BFA 0%, #FB7185 100%);
    --vd-gradient-light: linear-gradient(135deg, #FFFFFF 0%, #F0F4F8 100%);
    
    /* 3D Shadows */
    --vd-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.08);
    --vd-shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06), 0 2px 8px rgba(15, 23, 42, 0.1);
    --vd-shadow-lg: 0 8px 32px rgba(15, 23, 42, 0.08), 0 4px 16px rgba(15, 23, 42, 0.12);
    --vd-shadow-xl: 0 16px 48px rgba(15, 23, 42, 0.1), 0 8px 24px rgba(15, 23, 42, 0.14);
    --vd-shadow-floating: 0 24px 64px rgba(15, 23, 42, 0.12), 0 12px 32px rgba(15, 23, 42, 0.16);
    
    /* 3D Depth Effects */
    --vd-depth-top: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    --vd-depth-bottom: inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    --vd-depth-raised: var(--vd-depth-top), var(--vd-shadow-md);
    
    /* Glassmorphism */
    --vd-glass-light: rgba(255, 255, 255, 0.7);
    --vd-glass-medium: rgba(255, 255, 255, 0.85);
    --vd-glass-strong: rgba(255, 255, 255, 0.95);
    --vd-glass-blur: blur(20px);
    --vd-glass-blur-strong: blur(40px);
    
    /* Spacing Scale */
    --vd-space-1: 0.25rem;
    --vd-space-2: 0.5rem;
    --vd-space-3: 0.75rem;
    --vd-space-4: 1rem;
    --vd-space-5: 1.25rem;
    --vd-space-6: 1.5rem;
    --vd-space-8: 2rem;
    --vd-space-10: 2.5rem;
    --vd-space-12: 3rem;
    --vd-space-16: 4rem;
    --vd-space-20: 5rem;
    --vd-space-24: 6rem;
    
    /* Border Radius */
    --vd-radius-sm: 0.5rem;
    --vd-radius-md: 0.75rem;
    --vd-radius-lg: 1rem;
    --vd-radius-xl: 1.5rem;
    --vd-radius-2xl: 2rem;
    --vd-radius-full: 9999px;
    
    /* Transitions */
    --vd-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --vd-transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --vd-transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --vd-transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Typography */
    --vd-font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
    --vd-font-display: 'Space Grotesk', var(--vd-font-sans);
    
    --vd-text-xs: 0.75rem;
    --vd-text-sm: 0.875rem;
    --vd-text-base: 1rem;
    --vd-text-lg: 1.125rem;
    --vd-text-xl: 1.25rem;
    --vd-text-2xl: 1.5rem;
    --vd-text-3xl: 1.875rem;
    --vd-text-4xl: 2.25rem;
    --vd-text-5xl: 3rem;
}

/* ========================================
   GLOBAL RESET & BASE STYLES
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--vd-font-sans);
    color: var(--vd-text-primary);
    background: var(--vd-pearl);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========================================
   ANIMATED BACKGROUND
   ======================================== */

.vd-bg-animated {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: linear-gradient(135deg, #F8F9FA 0%, #E8EDF2 100%);
    overflow: hidden;
}

.vd-bg-animated::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(56, 189, 248, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(167, 139, 250, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(52, 211, 153, 0.06) 0%, transparent 50%);
    animation: bgFloat 30s ease-in-out infinite;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(2deg); }
    66% { transform: translate(-20px, 20px) rotate(-2deg); }
}

/* Floating Shapes */
.vd-floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.vd-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    animation: float linear infinite;
}

.vd-shape:nth-child(1) {
    width: 400px;
    height: 400px;
    background: var(--vd-gradient-sky);
    top: 10%;
    left: 10%;
    animation-duration: 20s;
}

.vd-shape:nth-child(2) {
    width: 300px;
    height: 300px;
    background: var(--vd-gradient-lavender);
    top: 60%;
    right: 15%;
    animation-duration: 25s;
    animation-delay: -10s;
}

.vd-shape:nth-child(3) {
    width: 250px;
    height: 250px;
    background: var(--vd-gradient-mint);
    bottom: 20%;
    left: 50%;
    animation-duration: 30s;
    animation-delay: -15s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -30px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    75% {
        transform: translate(40px, 10px) scale(1.05);
    }
}

/* ========================================
   3D GLASS CARDS
   ======================================== */

.vd-card {
    background: var(--vd-glass-medium);
    backdrop-filter: var(--vd-glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--vd-radius-xl);
    padding: var(--vd-space-6);
    box-shadow: var(--vd-shadow-md);
    position: relative;
    overflow: hidden;
    transition: all var(--vd-transition-base);
}

.vd-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 1), transparent);
    opacity: 0.8;
}

.vd-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.05), transparent);
}

.vd-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--vd-shadow-lg);
    border-color: rgba(56, 189, 248, 0.3);
}

/* Floating 3D Card */
.vd-card-floating {
    animation: cardFloat 6s ease-in-out infinite;
}

@keyframes cardFloat {
    0%, 100% {
        transform: translateY(0) rotateX(0);
    }
    50% {
        transform: translateY(-8px) rotateX(2deg);
    }
}

/* ========================================
   BUTTONS
   ======================================== */

.vd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--vd-space-2);
    padding: var(--vd-space-3) var(--vd-space-6);
    font-size: var(--vd-text-base);
    font-weight: 600;
    border-radius: var(--vd-radius-lg);
    border: none;
    cursor: pointer;
    transition: all var(--vd-transition-base);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.vd-btn::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 var(--vd-transition-slow);
}

.vd-btn:hover::before {
    left: 100%;
}

/* Primary Button */
.vd-btn-primary {
    background: var(--vd-gradient-sky);
    color: var(--vd-text-inverse);
    box-shadow: var(--vd-shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.vd-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--vd-shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.vd-btn-primary:active {
    transform: translateY(0);
}

/* Secondary Button */
.vd-btn-secondary {
    background: var(--vd-glass-strong);
    color: var(--vd-text-primary);
    border: 2px solid var(--vd-silver);
    box-shadow: var(--vd-shadow-sm);
}

.vd-btn-secondary:hover {
    background: var(--vd-white);
    border-color: var(--vd-sky);
    box-shadow: var(--vd-shadow-md);
}

/* Ghost Button */
.vd-btn-ghost {
    background: transparent;
    color: var(--vd-sky);
    border: 2px solid var(--vd-sky);
}

.vd-btn-ghost:hover {
    background: var(--vd-sky);
    color: var(--vd-text-inverse);
}

/* ========================================
   FORMS & INPUTS
   ======================================== */

.vd-input {
    width: 100%;
    padding: var(--vd-space-4);
    font-size: var(--vd-text-base);
    font-family: var(--vd-font-sans);
    color: var(--vd-text-primary);
    background: var(--vd-white);
    border: 2px solid var(--vd-silver);
    border-radius: var(--vd-radius-lg);
    box-shadow: var(--vd-shadow-sm);
    transition: all var(--vd-transition-base);
}

.vd-input:focus {
    outline: none;
    border-color: var(--vd-sky);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1), var(--vd-shadow-md);
    transform: translateY(-1px);
}

.vd-input::placeholder {
    color: var(--vd-text-tertiary);
}

/* ========================================
   SIDEBAR
   ======================================== */

.vd-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 280px;
    background: var(--vd-glass-strong);
    backdrop-filter: var(--vd-glass-blur-strong);
    border-right: 1px solid rgba(203, 213, 225, 0.5);
    box-shadow: var(--vd-shadow-lg);
    z-index: 100;
    overflow-y: auto;
}

.vd-sidebar-item {
    display: flex;
    align-items: center;
    gap: var(--vd-space-3);
    padding: var(--vd-space-3) var(--vd-space-4);
    margin: var(--vd-space-1) var(--vd-space-3);
    border-radius: var(--vd-radius-lg);
    color: var(--vd-text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--vd-transition-fast);
    position: relative;
}

.vd-sidebar-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 70%;
    background: var(--vd-gradient-sky);
    border-radius: 0 4px 4px 0;
    transition: transform var(--vd-transition-base);
}

.vd-sidebar-item:hover {
    background: var(--vd-white);
    color: var(--vd-text-primary);
    transform: translateX(4px);
}

.vd-sidebar-item.active {
    background: var(--vd-white);
    color: var(--vd-sky);
    box-shadow: var(--vd-shadow-sm);
}

.vd-sidebar-item.active::before {
    transform: translateY(-50%) scaleY(1);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.vd-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--vd-space-6);
}

.vd-text-gradient {
    background: var(--vd-gradient-sky);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.vd-glass {
    background: var(--vd-glass-medium);
    backdrop-filter: var(--vd-glass-blur);
}

.vd-shadow-float {
    box-shadow: var(--vd-shadow-floating);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vd-animate-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        font-size: 14px;
    }
    
    .vd-sidebar {
        transform: translateX(-100%);
        transition: transform var(--vd-transition-base);
    }
    
    .vd-sidebar.open {
        transform: translateX(0);
    }
}


/* ============================================
   VIDDYY UX FEATURES - STYLES
   ============================================ */

/* Floating Action Button (FAB) */
.vd-fab-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
}

.vd-fab-button {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--vd-gradient-sky);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: var(--vd-shadow-floating);
    transition: all var(--vd-transition-base);
}

.vd-fab-button:hover {
    transform: scale(1.1) rotate(90deg);
}

.vd-fab-menu {
    position: absolute;
    bottom: 80px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--vd-transition-base);
}

.vd-fab-container.active .vd-fab-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.vd-fab-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: var(--vd-white);
    border: 2px solid var(--vd-silver);
    border-radius: var(--vd-radius-full);
    text-decoration: none;
    color: var(--vd-text-primary);
    font-weight: 600;
    box-shadow: var(--vd-shadow-lg);
    transition: all var(--vd-transition-fast);
    white-space: nowrap;
}

.vd-fab-item:hover {
    transform: translateX(-4px);
    box-shadow: var(--vd-shadow-xl);
    border-color: var(--vd-sky);
}

.vd-fab-item i {
    font-size: 20px;
    color: var(--vd-sky);
}

/* Theme Toggle */
.vd-theme-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--vd-white);
    border: 2px solid var(--vd-silver);
    color: var(--vd-text-primary);
    font-size: 20px;
    cursor: pointer;
    box-shadow: var(--vd-shadow-md);
    transition: all var(--vd-transition-base);
    z-index: 999;
}

.vd-theme-toggle:hover {
    transform: rotate(180deg) scale(1.1);
    border-color: var(--vd-sky);
}

/* Dark Theme Colors */
[data-theme="dark"] {
    --vd-pearl: #1a1a1a;
    --vd-white: #2d2d2d;
    --vd-ice: #1e1e1e;
    --vd-silver: #444444;
    --vd-text-primary: #ffffff;
    --vd-text-secondary: #b0b0b0;
    --vd-text-tertiary: #808080;
}

[data-theme="dark"] body {
    background: #0a0a0a;
}

[data-theme="dark"] .vd-bg-animated {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

/* Camera Modal */
.vd-camera-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-container {
    max-width: 90%;
    max-height: 90%;
}

/* Upload Progress Container */
.upload-progress-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 400px;
    max-height: 500px;
    background: var(--vd-white);
    border: 2px solid var(--vd-silver);
    border-radius: var(--vd-radius-xl);
    box-shadow: var(--vd-shadow-floating);
    z-index: 1000;
    overflow-y: auto;
}

.upload-progress-item {
    padding: 16px;
    border-bottom: 1px solid var(--vd-silver);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.file-name {
    font-weight: 600;
    color: var(--vd-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 250px;
}

.file-size {
    color: var(--vd-text-secondary);
    font-size: var(--vd-text-sm);
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--vd-pearl);
    border-radius: var(--vd-radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--vd-gradient-sky);
    transition: width 0.3s ease;
}

.progress-percent {
    font-weight: 600;
    color: var(--vd-text-primary);
    min-width: 45px;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: var(--vd-text-sm);
    color: var(--vd-text-secondary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .vd-fab-container {
        bottom: 16px;
        right: 16px;
    }
    
    .vd-fab-button {
        width: 56px;
        height: 56px;
        font-size: 20px;
    }
    
    .upload-progress-container {
        width: calc(100% - 32px);
        left: 16px;
    }
    
    .vd-theme-toggle {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}
