/**
 * Modern UI System
 * Bi Tool v2.1 - Professional design upgrade
 * Includes: Gradients, Glassmorphism, Animations, Typography
 */

/* ==========================================
   MODERN COLOR PALETTE
   ========================================== */
:root {
    /* Primary Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-gold: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
    --gradient-blue: linear-gradient(135deg, #667eea 0%, #00d9ff 100%);
    --gradient-purple: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --gradient-sunset: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --gradient-ocean: linear-gradient(135deg, #2e3192 0%, #1bffff 100%);
    --gradient-fire: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
    
    /* Glass Morphism */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --glass-blur: blur(10px);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.4);
    
    /* Animations */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

[data-theme="dark"] {
    --glass-bg: rgba(30, 30, 50, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

/* ==========================================
   GLASS MORPHISM EFFECTS
   ========================================== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    transition: all 0.3s var(--ease-smooth);
}

[data-theme="dark"] .glass-card {
    background: rgba(30, 30, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
}

/* ==========================================
   GRADIENT BACKGROUNDS
   ========================================== */
.bg-gradient-primary {
    background: var(--gradient-primary);
    color: white;
}

.bg-gradient-gold {
    background: var(--gradient-gold);
    color: white;
}

.bg-gradient-blue {
    background: var(--gradient-blue);
    color: white;
}

.bg-gradient-animated {
    background: linear-gradient(-45deg, #667eea, #764ba2, #f7971e, #ffd200);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

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

/* ==========================================
   MODERN CARD STYLES
   ========================================== */
.modern-card {
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: var(--shadow-md);
    transition: all 0.4s var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .modern-card {
    background: #252837;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.modern-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-smooth);
}

.modern-card:hover::before {
    transform: scaleX(1);
}

.modern-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

/* ==========================================
   HERO SECTION MODERN
   ========================================== */
.hero-modern {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1d2e 50%, #252837 100%);
    overflow: hidden;
}

.hero-modern::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 210, 0, 0.1) 0%, transparent 50%);
    animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { opacity: 0.3; }
    100% { opacity: 0.6; }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 72px;
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffd700 0%, #ffffff 50%, #00d9ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    animation: fadeInUp 1s var(--ease-smooth);
}

.hero-subtitle {
    font-size: 24px;
    color: #9ca3af;
    margin-bottom: 40px;
    animation: fadeInUp 1s var(--ease-smooth) 0.2s backwards;
}

/* ==========================================
   FLOATING ANIMATIONS
   ========================================== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes floatRotate {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

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

.float-rotate {
    animation: floatRotate 8s ease-in-out infinite;
}

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

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation Classes */
.fade-in-up {
    animation: fadeInUp 0.8s var(--ease-smooth);
}

.fade-in-down {
    animation: fadeInDown 0.8s var(--ease-smooth);
}

.fade-in-left {
    animation: fadeInLeft 0.8s var(--ease-smooth);
}

.fade-in-right {
    animation: fadeInRight 0.8s var(--ease-smooth);
}

.scale-in {
    animation: scaleIn 0.6s var(--ease-bounce);
}

/* Delay Classes */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ==========================================
   MODERN BUTTONS
   ========================================== */
.btn-modern {
    position: relative;
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s var(--ease-smooth);
    box-shadow: var(--shadow-md);
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-modern:hover::before {
    width: 300px;
    height: 300px;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-modern:active {
    transform: translateY(0);
}

.btn-gradient-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-gradient-gold {
    background: var(--gradient-gold);
    color: white;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

/* ==========================================
   FEATURE CARDS WITH ICONS
   ========================================== */
.feature-card-modern {
    padding: 40px 32px;
    border-radius: 24px;
    background: white;
    box-shadow: var(--shadow-md);
    transition: all 0.4s var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .feature-card-modern {
    background: #252837;
}

.feature-card-modern::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    transition: all 0.6s var(--ease-smooth);
    opacity: 0;
}

.feature-card-modern:hover::before {
    opacity: 1;
    top: -25%;
    right: -25%;
}

.feature-card-modern:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: var(--gradient-primary);
    color: white;
    font-size: 36px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    transition: all 0.4s var(--ease-bounce);
}

.feature-card-modern:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-glow);
}

/* ==========================================
   STATS CARDS
   ========================================== */
.stat-card-modern {
    padding: 32px;
    border-radius: 20px;
    background: white;
    box-shadow: var(--shadow-md);
    transition: all 0.4s var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .stat-card-modern {
    background: #252837;
}

.stat-card-modern::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-smooth);
}

.stat-card-modern:hover::after {
    transform: scaleX(1);
}

.stat-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-value {
    font-size: 48px;
    font-weight: 800;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================
   MODERN TYPOGRAPHY
   ========================================== */
.heading-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.text-glow {
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

/* ==========================================
   LOADING SHIMMER
   ========================================== */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ==========================================
   SCROLL ANIMATIONS
   ========================================== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s var(--ease-smooth);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   PROGRESS BARS
   ========================================== */
.progress-modern {
    height: 8px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 50px;
    overflow: hidden;
    position: relative;
}

.progress-bar-modern {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 50px;
    transition: width 1s var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

.progress-bar-modern::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

/* ==========================================
   BADGES & TAGS
   ========================================== */
.badge-modern {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

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

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7); }
    50% { box-shadow: 0 0 0 10px rgba(102, 126, 234, 0); }
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 48px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .modern-card {
        padding: 24px;
    }
    
    .feature-card-modern {
        padding: 32px 24px;
    }
    
    .stat-value {
        font-size: 36px;
    }
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */
.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow:hover {
    box-shadow: var(--shadow-glow);
}

.smooth-transition {
    transition: all 0.3s var(--ease-smooth);
}

.bounce-transition {
    transition: all 0.4s var(--ease-bounce);
}
