/* ===== AIXEO Pro — Design System v2 ===== */
/* Style: Soft UI Evolution + Bento Grid */
/* Typography: Be Vietnam Pro + Space Grotesk */
/* Mode: Light default, Dark supported */

:root {
    /* === Color Tokens === */
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --primary-soft: #EFF6FF;
    --primary-border: #BFDBFE;
    --accent: #7C3AED;
    --accent-soft: #F5F3FF;

    --bg-page: #F8FAFC;
    --bg-surface: #FFFFFF;
    --bg-elevated: #F1F5F9;
    --bg-inset: #E2E8F0;

    --border: #E2E8F0;
    --border-hover: #CBD5E1;

    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --text-on-primary: #FFFFFF;

    --success: #059669;
    --success-soft: #ECFDF5;
    --warning: #D97706;
    --warning-soft: #FFFBEB;
    --danger: #DC2626;
    --danger-soft: #FEF2F2;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 40px -12px rgba(0,0,0,0.12);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --font-size-base: 14px;
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.dark {
    --primary: #3B82F6;
    --primary-hover: #60A5FA;
    --primary-soft: #1E3A5F;
    --primary-border: #1E40AF;
    --accent: #A78BFA;
    --accent-soft: #2E1065;

    --bg-page: #0F172A;
    --bg-surface: #1E293B;
    --bg-elevated: #334155;
    --bg-inset: #475569;

    --border: #334155;
    --border-hover: #475569;

    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --text-on-primary: #FFFFFF;

    --success: #10B981;
    --success-soft: #064E3B;
    --warning: #F59E0B;
    --warning-soft: #78350F;
    --danger: #F87171;
    --danger-soft: #7F1D1D;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.4);
    --shadow-xl: 0 20px 40px -12px rgba(0,0,0,0.5);
}

/* === Base === */
body {
    font-size: var(--font-size-base);
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-family: 'Be Vietnam Pro', system-ui, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-primary);
    transition: background-color 0.4s ease, color 0.3s ease;
}

h1, h2, h3, h4, .font-display {
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.025em;
}

/* === Surface Card === */
.surface-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.surface-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

/* === Glass (legacy compat) === */
.glass {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark .glass {
    background: rgba(30, 41, 59, 0.7);
    box-shadow: none;
}

.glass:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.dark .glass:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(100, 116, 139, 0.4);
    box-shadow: var(--shadow-lg);
}

/* === Glass Card (legacy compat) === */
.glass-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.dark .glass-card {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(51, 65, 85, 0.6);
}

.glass-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary), var(--shadow-md);
}

.dark .glass-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 10px 30px -10px rgba(59, 130, 246, 0.15);
}

/* === Hover Rainbow (subtle version) === */
.hover-rainbow {
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.hover-rainbow::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #3B82F6, #7C3AED, #06B6D4, #3B82F6);
    z-index: -1;
    filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
    background-size: 400%;
    animation: glow 20s linear infinite;
}

.hover-rainbow:hover::after {
    opacity: 0.15;
}

.dark .hover-rainbow:hover::after {
    opacity: 0.4;
}

@keyframes glow {
    0% { background-position: 0 0; }
    50% { background-position: 400% 0; }
    100% { background-position: 0 0; }
}

/* === Neo Shadow === */
.neo-shadow {
    box-shadow: 0 2px 8px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
}

.dark .neo-shadow {
    box-shadow: 0 4px 16px rgba(0,0,0,0.3), inset 0 1px 1px rgba(255,255,255,0.03);
}

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

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

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

.dark ::-webkit-scrollbar-thumb {
    background: #334155;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* === Animations === */
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.animate-shimmer {
    animation: shimmer 2s infinite linear;
}

@keyframes scan {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(100%); opacity: 0; }
}

.scan-line {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    animation: scan 2s linear infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.float-luxury {
    animation: float 6s ease-in-out infinite;
}

@keyframes blob {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}

.animate-blob {
    animation: blob 7s infinite;
}

@keyframes neon-pulse {
    0%, 100% { box-shadow: 0 0 5px rgba(37, 99, 235, 0.4), 0 0 10px rgba(59, 130, 246, 0.2); }
    50% { box-shadow: 0 0 15px rgba(37, 99, 235, 0.6), 0 0 25px rgba(59, 130, 246, 0.4); }
}

.animate-neon-pulse {
    animation: neon-pulse 3s infinite;
}

@keyframes border-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.bg-gradient-flow {
    background-size: 200% 200%;
    animation: border-flow 4s ease infinite;
}

@keyframes scale-up {
    0% { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.animate-scale-up {
    animation: scale-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fade-in {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.animate-fade-in {
    animation: fade-in 0.5s ease-out forwards;
}

/* === Spin Animation (Loading Spinner) === */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite !important;
    transition-property: none !important;
}

/* === Pulse Animation === */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* === Bounce Animation === */
@keyframes bounce {
    0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
    50% { transform: translateY(0); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
}

.animate-bounce {
    animation: bounce 1s infinite;
}

/* === Ping Animation === */
@keyframes ping {
    75%, 100% { transform: scale(2); opacity: 0; }
}

.animate-ping {
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* === Glow Effects === */
.text-glow-rose { text-shadow: 0 0 12px rgba(244, 63, 94, 0.3); }
.text-glow-emerald { text-shadow: 0 0 12px rgba(16, 185, 129, 0.3); }
.text-glow-cyan { text-shadow: 0 0 12px rgba(34, 211, 238, 0.3); }
.text-glow-blue { text-shadow: 0 0 12px rgba(37, 99, 235, 0.4); }

.strong-glow-rose { box-shadow: 0 8px 30px -8px rgba(244, 63, 94, 0.25); }
.strong-glow-indigo { box-shadow: 0 8px 30px -8px rgba(99, 102, 241, 0.25); }
.strong-glow-emerald { box-shadow: 0 8px 30px -8px rgba(16, 185, 129, 0.25); }
.strong-glow-amber { box-shadow: 0 8px 30px -8px rgba(245, 158, 11, 0.25); }
.strong-glow-cyan { box-shadow: 0 8px 30px -8px rgba(6, 182, 212, 0.25); }
.strong-glow-violet { box-shadow: 0 8px 30px -8px rgba(139, 92, 246, 0.25); }
.strong-glow-yellow { box-shadow: 0 8px 30px -8px rgba(234, 179, 8, 0.25); }
.strong-glow-purple { box-shadow: 0 8px 30px -8px rgba(168, 85, 247, 0.25); }
.strong-glow-blue { box-shadow: 0 8px 30px -8px rgba(37, 99, 235, 0.3); }

/* === Aurora Backgrounds === */
.aurora-bg {
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(37, 99, 235, 0.08), transparent 50%);
}

.dark .aurora-bg {
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.12), transparent 50%);
}

.aurora-bg-secondary {
    background: radial-gradient(ellipse 60% 40% at 100% 100%, rgba(124, 58, 237, 0.05), transparent 50%);
}

.dark .aurora-bg-secondary {
    background: radial-gradient(ellipse 60% 40% at 100% 100%, rgba(124, 58, 237, 0.08), transparent 50%);
}

/* === Theme V2 (legacy compat) === */
.theme-v2 {
    --primary: #f59e0b;
}

.theme-v2 .glass {
    background: rgba(255, 252, 235, 0.9);
    border-color: rgba(245, 158, 11, 0.15);
}

.theme-v2 .glass:hover {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 15px 40px -10px rgba(245, 158, 11, 0.1);
}

.dark.theme-v2 .glass {
    background: rgba(10, 10, 10, 0.7);
    border-color: rgba(245, 158, 11, 0.08);
}

.dark.theme-v2 .glass:hover {
    border-color: rgba(245, 158, 11, 0.2);
    box-shadow: 0 20px 60px -15px rgba(245, 158, 11, 0.1);
}

.theme-v2 .text-gradient-gold {
    background: linear-gradient(to right, #f59e0b, #fbbf24, #d97706);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* === Global Transitions === */
button, a, input, .glass, .card, span, div {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

/* Override: animated elements should not have conflicting transitions */
.animate-spin, .animate-pulse, .animate-bounce, .animate-ping {
    transition-property: none !important;
}

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