/* Base Variables and Typography */
:root {
    /* Premium Color Palette */
    --black: #0A0A0A;
    --white: #FFFFFF;
    --gray-50: #FAFAFA;
    --gray-100: #F7F7F8;
    --gray-200: #EAEAEC;
    --gray-300: #D7D7DC;
    --gray-400: #A0A0A8;
    --gray-500: #70707B;
    --gray-600: #4A4A57;
    --gray-700: #303037;
    --gray-800: #1A1A1F;
    --gray-900: #0F0F12;
    
    --primary: #0A0A0A;
    --primary-hover: #1A1A1F;
    --accent: #5B5BFF;
    --accent-hover: #4747E6;
    
    /* Premium Typography */
    --font-sans: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", sans-serif;
    --font-mono: "SF Mono", "Menlo", "Monaco", "Courier New", monospace;
    
    /* Refined Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.06), 0 4px 8px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 16px 24px rgba(0, 0, 0, 0.06), 0 8px 12px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.08), 0 16px 32px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 32px 64px rgba(0, 0, 0, 0.12), 0 24px 48px rgba(0, 0, 0, 0.06);
    
    /* Premium Effects */
    --gradient-premium: linear-gradient(135deg, #0A0A0A 0%, #1A1A1F 100%);
    --gradient-subtle: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    --blur-glass: saturate(180%) blur(20px);
    
    /* Timing Functions */
    --ease-premium: cubic-bezier(0.32, 0, 0.67, 0);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --black: #FFFFFF;
    --white: #000000;
    --gray-50: #171717;
    --gray-100: #262626;
    --gray-200: #404040;
    --gray-300: #525252;
    --gray-400: #737373;
    --gray-500: #A3A3A3;
    --gray-600: #D4D4D4;
    --gray-700: #E5E5E5;
    --gray-800: #F5F5F5;
    --gray-900: #FAFAFA;
    
    --primary: #FFFFFF;
    --primary-hover: #F5F5F5;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--white);
    color: var(--black);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
    font-weight: 400;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

/* Premium Focus States */
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Premium Selection */
::selection {
    background: rgba(91, 91, 255, 0.15);
    color: var(--black);
}

::-moz-selection {
    background: rgba(91, 91, 255, 0.15);
    color: var(--black);
}

/* Premium Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s var(--ease-premium);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.02em;
    position: relative;
    overflow: hidden;
    backdrop-filter: var(--blur-glass);
}

.btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-subtle);
    opacity: 0;
    transition: opacity 0.3s var(--ease-premium);
}

.btn-primary {
    background: var(--gradient-premium);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: var(--black);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Premium Card Component */
.premium-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s var(--ease-premium);
    position: relative;
}

.premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-subtle);
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.3s var(--ease-premium);
    pointer-events: none;
}

.premium-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0, 0, 0, 0.08);
}

.premium-card:hover::before {
    opacity: 1;
}

/* Premium Glass Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Premium Loading Animation */
.premium-loading {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: premiumShimmer 2s infinite;
}

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

