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

@tailwind base;
@tailwind components;
@tailwind utilities;

/* =========================================
   1. GLOBAL THEME VARIABLES
   ========================================= */
:root {
    --bg-base: #f8fafc;        
    --text-primary: #1e293b;   
    --text-secondary: #64748b; 
    /* Increased Transparency for Rainbow Effect */
    --glass-bg: rgba(255, 255, 255, 0.45); 
    --glass-border: rgba(255, 255, 255, 0.6);
    --card-bg: rgba(255, 255, 255, 0.6);
    --shadow-color: rgba(30, 41, 59, 0.05);
}

[data-theme="dark"] {
    --bg-base: #0f172a;        
    --text-primary: #f1f5f9;   
    --text-secondary: #94a3b8; 
    --glass-bg: rgba(15, 23, 42, 0.5);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(30, 41, 59, 0.6);
    --shadow-color: rgba(0, 0, 0, 0.3);
}

/* =========================================
   2. RAINBOW MESH BACKGROUND
   ========================================= */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

/* The Rainbow Blobs */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: 
        radial-gradient(circle at 50% 50%, rgba(79, 70, 229, 0.15), transparent 50%),
        radial-gradient(circle at 10% 20%, rgba(236, 72, 153, 0.15), transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(34, 211, 238, 0.15), transparent 40%);
    z-index: -1;
    pointer-events: none;
    filter: blur(60px);
}

[data-theme="dark"] body::before {
    background: 
        radial-gradient(circle at 50% 50%, rgba(79, 70, 229, 0.1), transparent 50%),
        radial-gradient(circle at 10% 20%, rgba(236, 72, 153, 0.1), transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(34, 211, 238, 0.1), transparent 40%);
}

/* =========================================
   3. COMPONENTS
   ========================================= */

/* IOS Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 var(--shadow-color);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Floating Window (Modal) - Smooth Corners */
.floating-window {
    border-radius: 1.5rem; /* rounded-3xl */
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Standard Card */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

/* Animations */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-up {
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

/* Hide Scrollbar */
::-webkit-scrollbar { width: 0px; background: transparent; }

/* Safe Area */
.pb-safe { padding-bottom: env(safe-area-inset-bottom); }

/* Add this at the bottom of style.css */

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

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

/* Ensure the modal background fades in smoothly too */
.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
/* Add this at the bottom of style.css */

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

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

/* Ensure the modal background fades in smoothly too */
.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
