/* Texas Business Expense Simulator - Dark Mode Theme */
/* Glassmorphic Design System with Animated Orbs */

:root {
    /* Dark theme colors */
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;

    /* Glass effect for dark mode */
    --glass-bg: rgba(30, 30, 50, 0.7);
    --glass-bg-hover: rgba(40, 40, 70, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-border-hover: rgba(255, 255, 255, 0.2);

    /* Text colors */
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --text-muted: #718096;

    /* Accent colors */
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-green: #22c55e;
    --accent-yellow: #eab308;
    --accent-red: #ef4444;

    /* Shadows for dark mode */
    --shadow-soft: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    --shadow-strong: 0 15px 45px 0 rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.15);
}

/* Base styles */
html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ============================================
   ANIMATED FLOATING ORBS BACKGROUND
   ============================================ */

.orb-container {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: -10;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float-orb 20s ease-in-out infinite;
}

/* Different orb sizes and colors */
.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.8) 0%, rgba(59, 130, 246, 0) 70%);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
    animation-duration: 25s;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.7) 0%, rgba(139, 92, 246, 0) 70%);
    top: 20%;
    right: -50px;
    animation-delay: -5s;
    animation-duration: 22s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.6) 0%, rgba(236, 72, 153, 0) 70%);
    bottom: 10%;
    left: 20%;
    animation-delay: -10s;
    animation-duration: 28s;
}

.orb-4 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.5) 0%, rgba(34, 197, 94, 0) 70%);
    top: 50%;
    left: 60%;
    animation-delay: -15s;
    animation-duration: 30s;
}

.orb-5 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.5) 0%, rgba(251, 191, 36, 0) 70%);
    top: 70%;
    right: 20%;
    animation-delay: -8s;
    animation-duration: 24s;
}

.orb-6 {
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.6) 0%, rgba(99, 102, 241, 0) 70%);
    top: 30%;
    left: 40%;
    animation-delay: -12s;
    animation-duration: 26s;
}

/* Floating animation for orbs */
@keyframes float-orb {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    20% {
        transform: translate(30px, -40px) scale(1.05);
    }
    40% {
        transform: translate(-20px, 30px) scale(0.95);
    }
    60% {
        transform: translate(40px, 20px) scale(1.08);
    }
    80% {
        transform: translate(-30px, -20px) scale(0.98);
    }
}

/* Pulsing glow effect for orbs */
@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.75;
        filter: blur(1.5px);
    }
    33% {
        opacity: 0.9;
        filter: blur(1px);
    }
    66% {
        opacity: 0.8;
        filter: blur(2px);
    }
}

.orb-pulse {
    animation: float-orb 20s ease-in-out infinite, pulse-glow 8s ease-in-out infinite;
}

/* Legacy blob animation (keeping for compatibility) */
@keyframes blob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(20px, -50px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    75% {
        transform: translate(50px, 50px) scale(1.05);
    }
}

.animate-blob {
    animation: blob 20s ease-in-out infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* ============================================
   GLASS CARD COMPONENT
   ============================================ */

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft);
}

.glass-card:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-strong);
}

/* Stronger glass effect variant */
.glass-card-strong {
    background: rgba(20, 20, 40, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ============================================
   TEXT COLOR OVERRIDES FOR DARK MODE
   ============================================ */

.text-gray-900 {
    color: var(--text-primary) !important;
}

.text-gray-800 {
    color: #e2e8f0 !important;
}

.text-gray-700 {
    color: #cbd5e0 !important;
}

.text-gray-600 {
    color: var(--text-secondary) !important;
}

.text-gray-500 {
    color: var(--text-muted) !important;
}

/* ============================================
   BACKGROUND COLOR OVERRIDES FOR DARK MODE
   ============================================ */

.bg-gray-50, .bg-gray-100 {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.bg-gray-200 {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Colored backgrounds with transparency */
.bg-red-50 {
    background-color: rgba(239, 68, 68, 0.15) !important;
}

.bg-blue-50 {
    background-color: rgba(59, 130, 246, 0.15) !important;
}

.bg-green-50 {
    background-color: rgba(34, 197, 94, 0.15) !important;
}

.bg-purple-50 {
    background-color: rgba(139, 92, 246, 0.15) !important;
}

.bg-yellow-50 {
    background-color: rgba(234, 179, 8, 0.15) !important;
}

.bg-orange-50 {
    background-color: rgba(249, 115, 22, 0.15) !important;
}

.bg-cyan-50 {
    background-color: rgba(6, 182, 212, 0.15) !important;
}

.bg-pink-50 {
    background-color: rgba(236, 72, 153, 0.15) !important;
}

/* Icon background colors */
.bg-red-100 {
    background-color: rgba(239, 68, 68, 0.2) !important;
}

.bg-blue-100 {
    background-color: rgba(59, 130, 246, 0.2) !important;
}

.bg-green-100 {
    background-color: rgba(34, 197, 94, 0.2) !important;
}

.bg-purple-100 {
    background-color: rgba(139, 92, 246, 0.2) !important;
}

.bg-yellow-100 {
    background-color: rgba(234, 179, 8, 0.2) !important;
}

.bg-orange-100 {
    background-color: rgba(249, 115, 22, 0.2) !important;
}

.bg-cyan-100 {
    background-color: rgba(6, 182, 212, 0.2) !important;
}

/* ============================================
   BORDER COLORS FOR DARK MODE
   ============================================ */

.border-gray-200 {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.border-gray-300 {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* ============================================
   INPUT STYLING FOR DARK MODE
   ============================================ */

input[type="text"],
input[type="number"],
input[type="email"],
select,
textarea {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: var(--text-primary) !important;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--accent-blue) !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

input::placeholder {
    color: var(--text-muted) !important;
}

/* Progress bar background */
.bg-gray-200.rounded-full {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* ============================================
   INFO TOOLTIP STYLES
   ============================================ */

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    font-size: 11px;
    cursor: help;
    transition: all 0.2s ease;
    margin-left: 6px;
}

.info-icon:hover {
    background: rgba(59, 130, 246, 0.4);
    color: #93c5fd;
    transform: scale(1.1);
}

.tooltip-container {
    position: relative;
    display: inline-block;
}

.tooltip-content {
    visibility: hidden;
    position: absolute;
    z-index: 100;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    padding: 12px 16px;
    background: rgba(15, 15, 30, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -8px;
    border-width: 8px;
    border-style: solid;
    border-color: rgba(15, 15, 30, 0.95) transparent transparent transparent;
}

.tooltip-container:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
}

.tooltip-title {
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 6px;
    font-size: 13px;
}

.tooltip-text {
    color: #a0aec0;
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.tooltip-link {
    display: inline-flex;
    align-items: center;
    color: #60a5fa;
    font-size: 11px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.tooltip-link:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.tooltip-link i {
    margin-left: 4px;
    font-size: 10px;
}

/* ============================================
   HOVER & TRANSITION EFFECTS
   ============================================ */

* {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

a, button {
    cursor: pointer;
    user-select: none;
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong), var(--shadow-glow);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-blue), var(--accent-purple));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2563eb, #7c3aed);
}

/* ============================================
   LOADING SPINNER
   ============================================ */

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top: 3px solid var(--accent-blue);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   FOCUS STATES FOR ACCESSIBILITY
   ============================================ */

button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* ============================================
   RESPONSIVE TYPOGRAPHY
   ============================================ */

@media (max-width: 640px) {
    h2 {
        font-size: 2rem !important;
    }

    h3 {
        font-size: 1.25rem !important;
    }

    p {
        font-size: 0.95rem;
    }

    .tooltip-content {
        width: 220px;
        left: auto;
        right: 0;
        transform: none;
    }

    .tooltip-content::after {
        left: auto;
        right: 20px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    :root {
        --bg-primary: #ffffff;
        --text-primary: #000000;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .no-print, .orb-container {
        display: none !important;
    }

    .glass-card {
        background: white !important;
        backdrop-filter: none !important;
        border: 1px solid #e5e7eb !important;
        color: black !important;
    }

    .text-gray-900, .text-gray-800, .text-gray-700 {
        color: #000000 !important;
    }

    .text-gray-600, .text-gray-500 {
        color: #4b5563 !important;
    }
}
