/* ================================================================
   SMART EXPENSE TRACKER - "GLASS AURORA" ULTRA REFINED
   Version: 3.0 - Enhanced Interactive Edition
   ================================================================ */

/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ================================================================
   ROOT VARIABLES
   ================================================================ */
:root {
    /* Background Colors - Clean Light Theme */
    --bg-base: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 50%, #f1f5f9 100%);
    --bg-primary: #ffffff;
    --bg-secondary: #e2e8f0;
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-card-solid: #ffffff;
    --bg-elevated: rgba(255, 255, 255, 0.9);
    --bg-input: rgba(248, 250, 252, 0.8);
    
    /* Glass Effect - Refined for Light Mode */
    --glass-bg: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-shine: rgba(255, 255, 255, 0.6);
    
    /* Accent Colors - More Vibrant for Light Mode */
    --accent-purple: #7c3aed;
    --accent-pink: #db2777;
    --accent-blue: #2563eb;
    --accent-cyan: #0891b2;
    --accent-green: #059669;
    --accent-emerald: #10b981;
    --accent-red: #e11d48;
    --accent-orange: #ea580c;
    --accent-yellow: #d97706;
    
    /* Gradients - Higher Contrast */
    --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #db2777 50%, #ea580c 100%);
    --gradient-secondary: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --gradient-income: linear-gradient(135deg, #059669 0%, #0891b2 100%);
    --gradient-expense: linear-gradient(135deg, #e11d48 0%, #db2777 100%);
    --gradient-warning: linear-gradient(135deg, #d97706 0%, #ea580c 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.4) 100%);
    
    /* Text Colors - High Contrast */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-dim: #94a3b8;
    
    /* Glow Effects - Adjusted for Light Mode */
    --glow-purple: 0 0 20px rgba(124, 58, 237, 0.2);
    --glow-pink: 0 0 20px rgba(219, 39, 119, 0.2);
    --glow-green: 0 0 20px rgba(5, 150, 105, 0.2);
    --glow-red: 0 0 20px rgba(225, 29, 72, 0.2);
    --glow-blue: 0 0 20px rgba(37, 99, 235, 0.2);
    
    /* Shadows - More defined for Light Mode */
    --shadow-xs: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 4px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.15);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    
    /* Spacing - 8px Grid System */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    
    /* Border Radius - Smooth Curves */
    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-2xl: 36px;
    --radius-full: 9999px;
    
    /* Transitions - Buttery Smooth */
    --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);
    --transition-fast: 0.2s var(--ease-smooth);
    --transition-normal: 0.3s var(--ease-smooth);
    --transition-slow: 0.5s var(--ease-smooth);
    --transition-slower: 0.8s var(--ease-smooth);
    
    /* Blur */
    --blur-sm: 8px;
    --blur-md: 16px;
    --blur-lg: 24px;

    /* Scroll Gradient Colors - Cyclic */
    --gradient-color-1: #7c3aed;
    --gradient-color-2: #db2777;
    --gradient-color-3: #2563eb;
    --gradient-color-4: #0891b2;
    --gradient-color-5: #059669;
}

/* ================================================================
   RESET & BASE
   ================================================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-snap-type: y mandatory;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-base);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Scroll-based animated gradient background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% var(--gradient-pos-1, 20%), var(--gradient-color-1) 0%, transparent 50%),
        radial-gradient(circle at 80% var(--gradient-pos-2, 30%), var(--gradient-color-2) 0%, transparent 50%),
        radial-gradient(circle at 40% var(--gradient-pos-3, 70%), var(--gradient-color-3) 0%, transparent 50%),
        radial-gradient(circle at 60% var(--gradient-pos-4, 90%), var(--gradient-color-4) 0%, transparent 50%),
        radial-gradient(circle at 90% var(--gradient-pos-5, 40%), var(--gradient-color-5) 0%, transparent 50%);
    opacity: 0.15;
    pointer-events: none;
    z-index: -2;
    transition: all 0.1s ease-out;
}

/* ================================================================
   ANIMATED BACKGROUND
   ================================================================ */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 20% -20%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 10%, rgba(219, 39, 119, 0.06) 0%, transparent 45%),
        radial-gradient(ellipse 50% 50% at 90% 90%, rgba(37, 99, 235, 0.05) 0%, transparent 40%),
        radial-gradient(ellipse 70% 50% at 10% 100%, rgba(5, 150, 105, 0.04) 0%, transparent 45%);
    pointer-events: none;
    z-index: -2;
    animation: backgroundPulse 20s ease-in-out infinite;
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Floating Orbs */
body::after {
    content: '';
    position: fixed;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.15) 0%, transparent 60%);
    top: -250px;
    right: -150px;
    border-radius: 50%;
    filter: blur(40px);
    animation: floatingOrb 25s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes floatingOrb {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }
    33% {
        transform: translate(-80px, 120px) scale(1.1);
        opacity: 0.8;
    }
    66% {
        transform: translate(-40px, 60px) scale(0.95);
        opacity: 0.5;
    }
}

/* Second Orb */
.container::before {
    content: '';
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.12) 0%, transparent 60%);
    bottom: -200px;
    left: -100px;
    border-radius: 50%;
    filter: blur(50px);
    animation: floatingOrb2 30s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes floatingOrb2 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(60px, -80px) scale(1.15);
    }
}

/* ================================================================
   CONTAINER
   ================================================================ */
.container {
    width: 100%;
    max-width: 95%;
    margin: 0 auto;
    padding: var(--space-6);
    position: relative;
}

/* ================================================================
   GLASS CARD MIXIN STYLE
   ================================================================ */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--blur-md));
    -webkit-backdrop-filter: blur(var(--blur-md));
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
}

/* ================================================================
   HEADER
   ================================================================ */
.header {
    text-align: center;
    padding: var(--space-12) var(--space-8);
    background: var(--bg-card);
    backdrop-filter: blur(var(--blur-lg));
    -webkit-backdrop-filter: blur(var(--blur-lg));
    border-radius: var(--radius-2xl);
    margin-bottom: var(--space-6);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    animation: headerEntry 0.8s var(--ease-smooth) both;
}

@keyframes headerEntry {
    from {
        opacity: 0;
        transform: translateY(-40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Animated Gradient Border */
.header::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--gradient-primary);
    border-radius: var(--radius-2xl);
    z-index: -1;
    opacity: 0.5;
    filter: blur(15px);
    animation: borderBreath 4s ease-in-out infinite;
}

@keyframes borderBreath {
    0%, 100% {
        opacity: 0.3;
        filter: blur(15px);
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        filter: blur(20px);
        transform: scale(1.02);
    }
}

/* Shine sweep effect */
.header::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    transform: skewX(-20deg);
    animation: headerShine 6s ease-in-out infinite;
}

@keyframes headerShine {
    0%, 100% { left: -100%; }
    50%, 60% { left: 150%; }
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--space-2);
    position: relative;
    display: inline-block;
}

.header p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* ================================================================
   BALANCE SECTION
   ================================================================ */
.balance-section {
    background: var(--bg-card);
    backdrop-filter: blur(var(--blur-md));
    -webkit-backdrop-filter: blur(var(--blur-md));
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    margin-bottom: var(--space-5);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: cardEntry 0.6s var(--ease-smooth) 0.1s both;
}

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

/* Inner glow */
.balance-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.08) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.balance-section h2 {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: var(--space-3);
}

.balance-amount {
    font-size: 3.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    transition: var(--transition-normal);
    position: relative;
}

.balance-amount.positive {
    color: var(--accent-green);
    text-shadow: var(--glow-green);
}

.balance-amount.negative {
    color: var(--accent-red);
    text-shadow: var(--glow-red);
}

/* ================================================================
   SUMMARY SECTION
   ================================================================ */
.summary-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.summary-card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--blur-md));
    -webkit-backdrop-filter: blur(var(--blur-md));
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    text-align: center;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: var(--transition-normal);
    cursor: default;
}

/* Top accent line */
.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: var(--space-6);
    right: var(--space-6);
    height: 3px;
    border-radius: 0 0 var(--radius-full) var(--radius-full);
    transition: var(--transition-normal);
}

/* Inner glow on hover */
.summary-card::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: var(--transition-normal);
    pointer-events: none;
}

.summary-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.12);
}

.summary-card:hover::before {
    left: var(--space-4);
    right: var(--space-4);
}

.summary-card:hover::after {
    opacity: 1;
}

/* Income Card */
.income-card {
    animation: cardEntry 0.6s var(--ease-smooth) 0.15s both;
}

.income-card::before {
    background: var(--gradient-income);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.4);
}

.income-card::after {
    background: radial-gradient(ellipse at top, rgba(52, 211, 153, 0.08) 0%, transparent 70%);
}

.income-card:hover {
    box-shadow: var(--shadow-md), 0 8px 32px rgba(52, 211, 153, 0.15);
}

/* Expense Card */
.expense-card {
    animation: cardEntry 0.6s var(--ease-smooth) 0.2s both;
}

.expense-card::before {
    background: var(--gradient-expense);
    box-shadow: 0 0 20px rgba(251, 113, 133, 0.4);
}

.expense-card::after {
    background: radial-gradient(ellipse at top, rgba(251, 113, 133, 0.08) 0%, transparent 70%);
}

.expense-card:hover {
    box-shadow: var(--shadow-md), 0 8px 32px rgba(251, 113, 133, 0.15);
}

.summary-card h3 {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: var(--space-2);
}

.summary-card .amount {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.amount.income {
    color: var(--accent-green);
}

.amount.expense {
    color: var(--accent-red);
}

/* ================================================================
   BUDGET SECTION
   ================================================================ */
.budget-section {
    background: var(--bg-card);
    backdrop-filter: blur(var(--blur-md));
    -webkit-backdrop-filter: blur(var(--blur-md));
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin-bottom: var(--space-5);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    animation: cardEntry 0.6s var(--ease-smooth) 0.25s both;
}

.budget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-5);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.budget-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.budget-input-group {
    display: flex;
    gap: var(--space-2);
}

.budget-input-group input {
    width: 130px;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-input);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.budget-input-group input:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.budget-input-group input:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.15);
    background: var(--bg-secondary);
}

.budget-input-group input::placeholder {
    color: var(--text-dim);
    font-weight: 400;
}

.budget-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-3);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Progress Bar - Ultra Smooth */
.progress-bar {
    height: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-4);
    box-shadow: var(--shadow-inner);
    position: relative;
}

/* Subtle track lines */
.progress-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 10%,
        rgba(255, 255, 255, 0.02) 10%,
        rgba(255, 255, 255, 0.02) 10.5%
    );
    pointer-events: none;
}

.progress-fill {
    height: 100%;
    width: 0%;
    border-radius: var(--radius-full);
    position: relative;
    overflow: hidden;
    transition: 
        width 1s cubic-bezier(0.34, 1.56, 0.64, 1),
        background 0.5s var(--ease-smooth);
}

/* Shimmer animation */
.progress-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    animation: shimmer 2.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% { left: -150%; }
    100% { left: 150%; }
}

/* Glow effect */
.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
    border-radius: var(--radius-full);
}

.progress-fill.safe {
    background: var(--gradient-income);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.4);
}

.progress-fill.caution {
    background: var(--gradient-warning);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
}

.progress-fill.warning {
    background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-red) 100%);
    box-shadow: 0 0 20px rgba(251, 146, 60, 0.4);
}

.progress-fill.danger {
    background: var(--gradient-expense);
    box-shadow: 0 0 25px rgba(251, 113, 133, 0.5);
    animation: dangerPulse 1.5s ease-in-out infinite;
}

@keyframes dangerPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(251, 113, 133, 0.4);
    }
    50% {
        box-shadow: 0 0 35px rgba(251, 113, 133, 0.6);
    }
}

/* Budget Status */
.budget-status {
    text-align: center;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
    transition: var(--transition-normal);
}

.budget-status.safe {
    background: rgba(52, 211, 153, 0.1);
    border-color: rgba(52, 211, 153, 0.25);
    color: var(--accent-emerald);
}

.budget-status.caution {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.25);
    color: var(--accent-yellow);
}

.budget-status.warning {
    background: rgba(251, 146, 60, 0.1);
    border-color: rgba(251, 146, 60, 0.25);
    color: var(--accent-orange);
}

.budget-status.danger {
    background: rgba(251, 113, 133, 0.1);
    border-color: rgba(251, 113, 133, 0.25);
    color: var(--accent-red);
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.75; }
}

/* ================================================================
   FORM SECTION
   ================================================================ */
.form-section {
    background: var(--bg-card);
    backdrop-filter: blur(var(--blur-md));
    -webkit-backdrop-filter: blur(var(--blur-md));
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin-bottom: var(--space-5);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    animation: cardEntry 0.6s var(--ease-smooth) 0.3s both;
}

.form-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.form-section h3::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--glass-border), transparent);
}

.form-group {
    margin-bottom: var(--space-4);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: var(--space-4);
    background: var(--bg-input);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.form-group input:hover,
.form-group select:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: var(--bg-secondary);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 
        0 0 0 4px rgba(167, 139, 250, 0.12),
        0 0 20px rgba(167, 139, 250, 0.1);
    background: var(--bg-secondary);
}

.form-group input::placeholder {
    color: var(--text-dim);
    font-weight: 400;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-4) center;
    padding-right: var(--space-10);
}

.form-group select option {
    background: var(--bg-card-solid);
    color: var(--text-primary);
    padding: var(--space-3);
}

.form-group select optgroup {
    color: var(--text-muted);
    font-weight: 600;
}

/* Error State */
.form-group input.error,
.form-group select.error {
    border-color: var(--accent-red);
    box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.12);
    animation: shake 0.4s var(--ease-smooth);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
    75% { transform: translateX(-6px); }
}

/* ================================================================
   FILTER SECTION
   ================================================================ */
.filter-section {
    background: var(--bg-card);
    backdrop-filter: blur(var(--blur-md));
    -webkit-backdrop-filter: blur(var(--blur-md));
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    animation: cardEntry 0.6s var(--ease-smooth) 0.35s both;
}

.filter-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

.filter-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-3);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.filter-group label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-controls select {
    padding: var(--space-3) var(--space-4);
    background: var(--bg-input);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-3) center;
    padding-right: var(--space-8);
    transition: var(--transition-fast);
}

.filter-controls select:hover {
    border-color: var(--accent-purple);
    background-color: var(--bg-secondary);
}

.filter-controls select:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: var(--glow-purple);
}

/* ================================================================
   TRANSACTIONS SECTION
   ================================================================ */
.transactions-section {
    background: var(--bg-card);
    backdrop-filter: blur(var(--blur-md));
    -webkit-backdrop-filter: blur(var(--blur-md));
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin-bottom: var(--space-5);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    animation: cardEntry 0.6s var(--ease-smooth) 0.4s both;
}

.transactions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--glass-border);
}

.transactions-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.transaction-count {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    border: 1px solid var(--glass-border);
}

/* Transaction List */
.transaction-list {
    max-height: 420px;
    overflow-y: auto;
    padding-right: var(--space-2);
    scroll-behavior: smooth;
}

/* Smooth Scrollbar */
.transaction-list::-webkit-scrollbar {
    width: 5px;
}

.transaction-list::-webkit-scrollbar-track {
    background: transparent;
}

.transaction-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-purple), var(--accent-pink));
    border-radius: var(--radius-full);
}

.transaction-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent-pink), var(--accent-purple));
}

/* Empty State */
.empty-message {
    text-align: center;
    padding: var(--space-12);
    color: var(--text-dim);
    font-style: italic;
}

/* Transaction Item */
.transaction-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    margin-bottom: var(--space-2);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    border-left: 3px solid transparent;
    position: relative;
    overflow: hidden;
    transition: var(--transition-fast);
}

/* Hover glow */
.transaction-item::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: var(--transition-fast);
    pointer-events: none;
}

.transaction-item:hover {
    transform: translateX(6px);
    border-color: var(--glass-border);
    background: var(--bg-elevated);
}

.transaction-item:hover::before {
    opacity: 1;
}

/* Income Transaction */
.transaction-item.income {
    border-left-color: var(--accent-green);
}

.transaction-item.income::before {
    background: linear-gradient(90deg, rgba(52, 211, 153, 0.06) 0%, transparent 40%);
}

.transaction-item.income:hover {
    box-shadow: -4px 0 20px rgba(52, 211, 153, 0.15);
}

/* Expense Transaction */
.transaction-item.expense {
    border-left-color: var(--accent-red);
}

.transaction-item.expense::before {
    background: linear-gradient(90deg, rgba(251, 113, 133, 0.06) 0%, transparent 40%);
}

.transaction-item.expense:hover {
    box-shadow: -4px 0 20px rgba(251, 113, 133, 0.15);
}

/* Transaction Info */
.transaction-info {
    flex: 1;
    min-width: 0;
}

.transaction-description {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.transaction-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.transaction-category {
    background: var(--bg-card);
    padding: 2px var(--space-2);
    border-radius: var(--radius-xs);
    font-weight: 500;
    border: 1px solid var(--glass-border);
}

/* Transaction Amount */
.transaction-amount {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 var(--space-4);
    flex-shrink: 0;
    letter-spacing: -0.02em;
}

.transaction-amount.income {
    color: var(--accent-green);
}

.transaction-amount.expense {
    color: var(--accent-red);
}

/* ================================================================
   STATISTICS SECTION
   ================================================================ */
.stats-section {
    background: var(--bg-card);
    backdrop-filter: blur(var(--blur-md));
    -webkit-backdrop-filter: blur(var(--blur-md));
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin-bottom: var(--space-5);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    animation: cardEntry 0.6s var(--ease-smooth) 0.45s both;
}

.stats-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.stats-section h3::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--glass-border), transparent);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.stat-card {
    background: var(--bg-secondary);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    transition: var(--transition-fast);
}

/* Top accent line */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    opacity: 0;
    transition: var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-sm);
}

.stat-card:hover::before {
    opacity: 1;
    width: 60%;
}

.stat-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-2);
}

.stat-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.stat-value.income {
    color: var(--accent-green);
}

.stat-value.expense {
    color: var(--accent-red);
}

/* Category Breakdown */
.category-breakdown {
    padding-top: var(--space-5);
    border-top: 1px solid var(--glass-border);
}

.category-breakdown h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

.category-stats {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.category-item {
    display: flex;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    transition: var(--transition-fast);
}

.category-item:hover {
    background: var(--bg-elevated);
    border-color: var(--glass-border);
    transform: translateX(4px);
}

.category-name {
    width: 100px;
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--text-primary);
}

.category-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-primary);
    border-radius: var(--radius-full);
    margin: 0 var(--space-4);
    overflow: hidden;
}

.category-bar-fill {
    height: 100%;
    background: var(--gradient-expense);
    border-radius: var(--radius-full);
    transition: width 0.8s var(--ease-smooth);
    box-shadow: 0 0 10px rgba(251, 113, 133, 0.3);
}

.category-amount {
    width: 75px;
    text-align: right;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--accent-red);
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-6);
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition-fast);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Primary Button */
.btn-add {
    width: 100%;
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 20px rgba(167, 139, 250, 0.25);
}

/* Shine sweep */
.btn-add::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.25),
        transparent
    );
    transform: skewX(-20deg);
    transition: 0.6s;
}

.btn-add:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 30px rgba(167, 139, 250, 0.35),
        var(--glow-purple);
}

.btn-add:hover::before {
    left: 150%;
}

.btn-add:active {
    transform: translateY(-1px);
}

/* Budget Button */
.btn-budget {
    background: var(--accent-purple);
    color: white;
    padding: var(--space-3) var(--space-5);
    font-size: 0.85rem;
    box-shadow: 0 2px 10px rgba(167, 139, 250, 0.2);
}

.btn-budget:hover {
    background: var(--accent-pink);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(244, 114, 182, 0.3);
}

/* Delete Button */
.btn-delete {
    background: transparent;
    color: var(--accent-red);
    border: 1px solid rgba(251, 113, 133, 0.4);
    padding: var(--space-1) var(--space-3);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
}

.btn-delete:hover {
    background: var(--accent-red);
    color: white;
    border-color: var(--accent-red);
    box-shadow: var(--glow-red);
}

/* Clear All Button */
.btn-clear {
    width: 100%;
    margin-top: var(--space-4);
    background: transparent;
    color: var(--accent-red);
    border: 1px solid rgba(251, 113, 133, 0.3);
    padding: var(--space-3);
}

.btn-clear:hover {
    background: rgba(251, 113, 133, 0.1);
    border-color: var(--accent-red);
}

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
    text-align: center;
    padding: var(--space-8);
    color: var(--text-dim);
    font-size: 0.8rem;
    animation: cardEntry 0.6s var(--ease-smooth) 0.5s both;
}

.footer p {
    margin-bottom: var(--space-1);
}

.footer p:last-child {
    margin-bottom: 0;
}

/* ================================================================
   UTILITY CLASSES
   ================================================================ */
.hidden {
    display: none !important;
}

.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;
}

/* ================================================================
   RESPONSIVE DESIGN
   ================================================================ */
@media (max-width: 768px) {
    :root {
        --space-6: 20px;
        --space-8: 28px;
        --space-12: 40px;
    }
    
    .container {
        padding: var(--space-4);
    }
    
    .header {
        padding: var(--space-8) var(--space-5);
        border-radius: var(--radius-xl);
    }
    
    .header h1 {
        font-size: 1.85rem;
    }
    
    .balance-amount {
        font-size: 2.5rem;
    }
    
    .summary-section {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }
    
    .budget-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .budget-input-group {
        width: 100%;
    }
    
    .budget-input-group input {
        flex: 1;
    }
    
    .filter-controls {
        grid-template-columns: 1fr;
    }
    
    .transaction-item {
        flex-wrap: wrap;
        gap: var(--space-3);
        padding: var(--space-3);
    }
    
    .transaction-info {
        width: 100%;
    }
    
    .transaction-amount {
        margin: 0;
        margin-right: auto;
    }
    
    .btn-delete {
        padding: var(--space-2) var(--space-4);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-item {
        flex-wrap: wrap;
        gap: var(--space-2);
    }
    
    .category-name {
        width: 100%;
    }
    
    .category-bar {
        flex: 1;
        margin: 0;
        margin-right: var(--space-3);
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .header p {
        font-size: 0.85rem;
    }
    
    .balance-amount {
        font-size: 2rem;
    }
    
    .summary-card .amount {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .transaction-meta {
        flex-direction: column;
        gap: var(--space-1);
    }
    
    .stat-card {
        padding: var(--space-3);
    }
}

/* Large Screens */
@media (min-width: 1024px) {
    .container {
        padding: var(--space-8);
    }
    
    /* Subtle hover effects */
    .transaction-item .btn-delete {
        opacity: 0.4;
    }
    
    .transaction-item:hover .btn-delete {
        opacity: 1;
    }
}

/* ================================================================
   REDUCED MOTION
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ================================================================
   PRINT STYLES
   ================================================================ */
@media print {
    body {
        background: white;
        color: black;
    }

    body::before,
    body::after,
    .container::before {
        display: none;
    }

    .form-section,
    .filter-section,
    .btn,
    .budget-input-group {
        display: none !important;
    }

    .header,
    .balance-section,
    .summary-card,
    .budget-section,
    .transactions-section,
    .stats-section {
        background: white;
        box-shadow: none;
        border: 1px solid #ddd;
        backdrop-filter: none;
    }

    .header::before,
    .header::after {
        display: none;
    }

    .header h1 {
        -webkit-text-fill-color: #333;
        background: none;
        color: #333;
    }

    .transaction-item {
        background: #f5f5f5;
        border-left-width: 3px;
    }
}

/* ================================================================
   ENHANCED INTERACTIVE ELEMENTS & MICRO-INTERACTIONS
   ================================================================ */

/* Ripple Effect for Buttons */
.btn-primary-large,
.nav-btn,
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary-large::after,
.nav-btn::after,
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn-primary-large:focus:not(:active)::after,
.nav-btn:focus:not(:active)::after,
.btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(40, 40);
        opacity: 0;
    }
}

/* Enhanced Button Hover with 3D Lift */
.btn-primary-large:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 10px 30px rgba(124, 58, 237, 0.4),
        0 6px 10px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary-large:active {
    transform: translateY(-2px) scale(1.01);
    box-shadow:
        0 6px 20px rgba(124, 58, 237, 0.3),
        0 3px 6px rgba(0, 0, 0, 0.1);
}

/* Magnetic Button Effect (CSS-only approach) */
.magnetic-btn {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.magnetic-btn:hover {
    transform: scale(1.05) rotate(1deg);
}

/* ================================================================
   3D CARD EFFECTS WITH DEPTH LAYERS
   ================================================================ */

/* Multi-layer card with realistic depth */
.glass-card-3d {
    position: relative;
    transform-style: preserve-3d;
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: calc(var(--radius-xl) + 4px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.4) inset,
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.glass-card-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0) 100%
    );
    pointer-events: none;
    border-radius: calc(var(--radius-xl) + 4px) calc(var(--radius-xl) + 4px) 0 0;
}

.glass-card-3d:hover {
    transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) translateZ(20px);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.2),
        0 10px 20px rgba(0, 0, 0, 0.1),
        0 1px 0 rgba(255, 255, 255, 0.5) inset;
}

/* Card floating animation */
@keyframes cardFloat {
    0%, 100% {
        transform: translateY(0px) rotateX(0deg);
    }
    50% {
        transform: translateY(-10px) rotateX(2deg);
    }
}

.glass-card-3d.floating {
    animation: cardFloat 6s ease-in-out infinite;
}

.glass-card-3d.floating:hover {
    animation-play-state: paused;
    transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) translateZ(30px);
}

/* ================================================================
   INPUT FIELD ENHANCEMENTS WITH FOCUS GLOW
   ================================================================ */

input[type="text"],
input[type="number"],
select,
textarea {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow:
        0 0 0 4px rgba(124, 58, 237, 0.1),
        0 4px 12px rgba(124, 58, 237, 0.2);
    transform: translateY(-2px);
}

/* Input label animations */
.form-group {
    position: relative;
    margin-bottom: var(--space-6);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    position: relative;
}

input:focus + label,
input:not(:placeholder-shown) + label,
select:focus + label {
    color: var(--accent-purple);
}

/* Floating label effect */
.form-group input,
.form-group select {
    width: 100%;
}

.form-group label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    padding: 0 4px;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group select:focus + label,
.form-group select:valid + label {
    top: 0;
    font-size: 0.75rem;
    color: var(--accent-purple);
    background: var(--bg-card);
    border-radius: 4px;
}

/* ================================================================
   TRANSACTION LIST ENHANCEMENTS
   ================================================================ */

.transaction-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.transaction-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(124, 58, 237, 0.1) 0%,
        transparent 100%
    );
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.transaction-item:hover::before {
    width: 100%;
}

.transaction-item:hover {
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-left-color: var(--accent-purple);
    background: rgba(124, 58, 237, 0.05);
}

.transaction-item.income:hover {
    border-left-color: var(--accent-green);
    background: rgba(5, 150, 105, 0.05);
}

.transaction-item.expense:hover {
    border-left-color: var(--accent-red);
    background: rgba(225, 29, 72, 0.05);
}

/* Delete button with hover effect */
.btn-delete {
    transition: all 0.2s ease;
    opacity: 0.7;
}

.transaction-item:hover .btn-delete {
    opacity: 1;
    transform: scale(1.1);
}

.btn-delete:hover {
    background: var(--accent-red) !important;
    color: white !important;
    transform: scale(1.2) rotate(45deg);
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
}

/* ================================================================
   PROGRESS BAR WITH ANIMATION
   ================================================================ */

.progress-fill {
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

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

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-bar {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ================================================================
   STATISTICS CARDS WITH 3D EFFECT
   ================================================================ */

.stat-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s;
}

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

.stat-card:hover {
    transform: translateY(-8px) rotateX(5deg);
    box-shadow:
        0 12px 24px rgba(0, 0, 0, 0.15),
        0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-purple);
}

/* Stat value animations */
.stat-value {
    transition: all 0.3s ease;
}

.stat-card:hover .stat-value {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px var(--accent-purple));
}

/* ================================================================
   CATEGORY BREAKDOWN WITH INTERACTIVE BARS
   ================================================================ */

.category-item {
    transition: all 0.3s ease;
    padding: var(--space-3);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-2);
    position: relative;
}

.category-item:hover {
    background: rgba(124, 58, 237, 0.1);
    transform: translateX(4px);
}

.category-bar {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-full);
    background: rgba(124, 58, 237, 0.1);
}

.category-bar-fill {
    transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    border-radius: var(--radius-full);
}

.category-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4)
    );
    animation: barShine 2s infinite;
}

@keyframes barShine {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* ================================================================
   ANIMATED ENTRANCES & SCROLL REVEAL
   ================================================================ */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children animations */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-children.active > *:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-children.active > *:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-children.active > *:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.stagger-children.active > *:nth-child(4) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.stagger-children.active > *:nth-child(5) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }

/* ================================================================
   LOADING & SPINNER ANIMATIONS
   ================================================================ */

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(124, 58, 237, 0.1);
    border-left-color: var(--accent-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pulse animation for new transactions */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(124, 58, 237, 0);
    }
}

.transaction-item.new {
    animation: pulse 0.8s ease-in-out;
}

/* ================================================================
   DARK MODE SUPPORT REMOVED - LIGHT THEME ONLY
   ================================================================ */

/* Dark mode has been disabled to maintain consistent light gradient theme */

/* ================================================================
   RESPONSIVE INTERACTIONS
   ================================================================ */

@media (hover: none) and (pointer: coarse) {
    /* Touch device adjustments */
    .btn-primary-large:hover {
        transform: none;
    }

    .glass-card-3d:hover {
        transform: none;
    }

    .transaction-item:hover {
        transform: none;
    }

    /* Add touch feedback */
    .btn-primary-large:active {
        transform: scale(0.98);
    }

    .transaction-item:active {
        transform: scale(0.99);
    }
}

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

/* ================================================================
   CUSTOM SCROLLBAR WITH GLASS EFFECT
   ================================================================ */

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(
        135deg,
        var(--accent-purple) 0%,
        var(--accent-pink) 50%,
        var(--accent-blue) 100%
    );
    border-radius: var(--radius-full);
    border: 3px solid var(--glass-bg);
    min-height: 40px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        135deg,
        var(--accent-blue) 0%,
        var(--accent-purple) 50%,
        var(--accent-pink) 100%
    );
    transform: scale(1.1);
}

::-webkit-scrollbar-corner {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
}

/* ================================================================
   UTILITY CLASSES FOR ANIMATIONS
   ================================================================ */

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scale-in {
    animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

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