/* PremRas Sangeet - Main Stylesheet */
/* Extracted from index.html for modular architecture */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&family=Outfit:wght@200;300;400;500&display=swap');

/* ============================================
   CSS Custom Properties (Theme Variables)
   ============================================ */

:root {
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* Dark Theme (Default) - Cosmic Divine */
    --bg-primary: #0a0514;
    --bg-secondary: #150a1e;
    --bg-tertiary: #1f0f2e;
    --text-primary: #fef3c7;
    --text-secondary: #d4c4a8;
    --text-muted: #a89984;
    --accent-gold: #f59e0b;
    --accent-gold-light: #fbbf24;
    --accent-gold-glow: rgba(251, 191, 36, 0.4);
    --accent-rose: #db2777;
    --accent-rose-light: #ec4899;
    --accent-purple: #7c3aed;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(251, 191, 36, 0.15);
    --card-bg: rgba(31, 15, 46, 0.6);
    --glow-color: rgba(251, 191, 36, 0.15);
}

.light-theme {
    /* Light Theme - Warm Devotional */
    --bg-primary: #fef7ed;
    --bg-secondary: #fffbf5;
    --bg-tertiary: #fff8ee;
    --text-primary: #581c87;
    --text-secondary: #6b21a8;
    --text-muted: #9333ea;
    --accent-gold: #b45309;
    --accent-gold-light: #d97706;
    --accent-gold-glow: rgba(180, 83, 9, 0.25);
    --accent-rose: #be185d;
    --accent-rose-light: #db2777;
    --accent-purple: #7c3aed;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(180, 83, 9, 0.2);
    --card-bg: rgba(255, 255, 255, 0.8);
    --glow-color: rgba(217, 119, 6, 0.15);
}

/* ============================================
   Base Styles
   ============================================ */

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

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Animated gradient background overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, var(--accent-gold-glow) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(219, 39, 119, 0.1) 0%, transparent 45%),
        radial-gradient(ellipse 50% 30% at 50% 20%, rgba(124, 58, 237, 0.08) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
    animation: gradientShift 20s ease-in-out infinite alternate;
}

.light-theme body::before,
body.light-theme::before {
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(251, 191, 36, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(236, 72, 153, 0.08) 0%, transparent 45%),
        radial-gradient(ellipse 50% 30% at 50% 80%, rgba(124, 58, 237, 0.06) 0%, transparent 40%);
}

/* ============================================
   Typography
   ============================================ */

.font-serif {
    font-family: var(--font-serif);
}

.font-sans {
    font-family: var(--font-sans);
}

/* Enhanced text shadows */
.text-shadow-gold {
    text-shadow:
        0 0 20px var(--accent-gold-glow),
        0 0 40px var(--accent-gold-glow),
        0 2px 4px rgba(0, 0, 0, 0.3);
}

.light-theme .text-shadow-gold {
    text-shadow:
        0 0 15px rgba(180, 83, 9, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Glassmorphism & Cards
   ============================================ */

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.light-theme .glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Card hover glow effect */
.card-glow {
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-glow::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-rose) 50%, var(--accent-purple) 100%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
}

.card-glow:hover::before {
    opacity: 0.3;
}

.card-glow:hover {
    transform: translateY(-4px);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 60px var(--glow-color);
}

/* Oracle card special styling */
.oracle-card {
    background: linear-gradient(145deg, var(--card-bg), rgba(251, 191, 36, 0.05));
    border: 1px solid var(--glass-border);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.light-theme .oracle-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(254, 243, 199, 0.5));
    border: 1px solid rgba(180, 83, 9, 0.15);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.08),
        inset 0 1px 1px rgba(255, 255, 255, 1);
}

/* 3D Card Effect */
.card-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card-3d-inner {
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
}

.card-3d:hover .card-3d-inner {
    transform: rotateX(5deg) rotateY(-5deg) translateZ(10px);
}

/* Continuous Shine Effect */
.card-shine {
    position: relative;
    overflow: hidden;
}

.card-shine::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 50%;
    height: 200%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 215, 0, 0.08),
            rgba(255, 255, 255, 0.15),
            rgba(255, 215, 0, 0.08),
            transparent);
    transform: translateX(-100%) rotate(25deg);
    animation: cardShine 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 10;
}

.light-theme .card-shine::before {
    background: linear-gradient(90deg,
            transparent,
            rgba(217, 119, 6, 0.1),
            rgba(255, 255, 255, 0.25),
            rgba(217, 119, 6, 0.1),
            transparent);
}

/* ============================================
   Buttons
   ============================================ */

.btn-primary {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #ea580c 100%);
    box-shadow:
        0 4px 15px var(--accent-gold-glow),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 25px var(--accent-gold-glow),
        0 0 40px var(--accent-gold-glow),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

/* ============================================
   Navbar
   ============================================ */

.navbar-glow {
    box-shadow:
        0 0 20px var(--glow-color),
        0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Floating Flowers
   ============================================ */

.floating-flower {
    position: fixed;
    pointer-events: none;
    z-index: 1;
    animation: floatFlower linear forwards;
    filter: drop-shadow(0 0 10px var(--accent-gold-glow));
}

.light-theme .floating-flower {
    filter: drop-shadow(0 4px 8px rgba(180, 83, 9, 0.25));
}

/* ============================================
   Cursor
   ============================================ */

/* Hide default cursor only on devices with mouse */
@media (pointer: fine) {
    body {
        cursor: none;
    }

    a,
    button {
        cursor: none;
    }
}

/* ============================================
   Selection & Scrollbar
   ============================================ */

::selection {
    background: var(--accent-gold);
    color: var(--bg-primary);
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-gold), var(--accent-rose));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent-gold-light), var(--accent-rose-light));
}

/* ============================================
   Animations - Keyframes
   ============================================ */

@keyframes gradientShift {
    0% {
        opacity: 0.8;
        transform: scale(1);
    }
    100% {
        opacity: 1;
        transform: scale(1.1);
    }
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse-slow {
    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.15);
    }
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(3deg);
    }
    50% {
        transform: translateY(-5px) rotate(-2deg);
    }
    75% {
        transform: translateY(-15px) rotate(2deg);
    }
}

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

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

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

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

@keyframes floatFlower {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

@keyframes fall-fade {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(120px) rotate(360deg) scale(0.5);
        opacity: 0;
    }
}

@keyframes cardShine {
    0% {
        transform: translateX(-100%) rotate(25deg);
    }
    100% {
        transform: translateX(200%) rotate(25deg);
    }
}

/* ============================================
   Animation Utility Classes
   ============================================ */

.animate-spin-slow {
    animation: spin-slow 12s linear infinite;
}

.animate-pulse-slow {
    animation: pulse-slow 8s ease-in-out infinite;
}

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

.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

.animate-fade-in {
    animation: fadeIn 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-fade-in-up {
    animation: fadeInUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

.animate-fade-in-down {
    animation: fadeInDown 0.5s ease-out;
}

.animate-fall-fade {
    animation: fall-fade 2.5s ease-out forwards;
}

.animation-delay-500 {
    animation-delay: 0.5s;
}

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