/* ============================================
   SRILEKHA AKKA - BIRTHDAY ODYSSEY
   Fully Audited & Bug-Fixed CSS
============================================= */

:root {
    --deep:   #03040a;
    --space:  #0b0d1a;
    --glow:   #a6b1e1;
    --accent: #fbd3e9;
    --gold:   #f1d3a1;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--deep);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Hide cursor only on non-touch devices */
@media (pointer: fine) {
    body { cursor: none; }
}

/* --- CUSTOM CURSOR (only on non-touch) --- */
#cursor {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    position: fixed;
    top: 0; left: 0;           /* start offscreen, not at center */
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: difference;
    opacity: 0;                 /* hidden until first mouse move */
    transition: opacity 0.3s;
    transform: translate(-50%, -50%);
    will-change: transform;
}

#cursor-follower {
    width: 40px;
    height: 40px;
    border: 1.5px solid var(--glow);
    border-radius: 50%;
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;                 /* hidden until first mouse move */
    transition: border-color 0.3s, opacity 0.3s;
    transform: translate(-50%, -50%);
    will-change: transform;
}

/* --- PILLAR CARDS --- */
.pillar-card {
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
                border-color 0.4s ease,
                box-shadow 0.4s ease;
    will-change: transform;
}

.pillar-card:hover {
    transform: translateY(-18px);
    border-color: rgba(251, 175, 189, 0.45) !important;
    box-shadow: 0 30px 60px rgba(251, 175, 189, 0.12);
}

/* --- GIFT BOXES --- */
.gift-box-wrap {
    cursor: pointer;
    user-select: none;
}

/* Opened gift state — use explicit color values, not Tailwind opacity fractions */
.gift-box-wrap [id^="gift-"].opened {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.08) !important;
    cursor: default;
}

/* Gift label text — explicit colors to avoid Tailwind CDN opacity bug */
.gift-label-joy      { color: rgba(251, 175, 189, 0.7); }
.gift-label-laughter { color: rgba(241, 211, 161, 0.7); }
.gift-label-support  { color: rgba(166, 177, 225, 0.7); }

/* --- THREE.JS CONTAINER --- */
#three-container {
    width: 100%;
    height: 60vh;
    min-height: 300px;
    max-height: 700px;
    overflow: hidden;           /* prevents canvas overflow */
    position: relative;
}

#three-container canvas {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

/* --- POLAROID GALLERY --- */
.polaroid {
    background: #fff;
    padding: 1.2rem 1.2rem 3.5rem 1.2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: rotate(var(--rot, 0deg));
    transition: transform 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.7s ease,
                z-index 0s;
    flex-shrink: 0;
    width: 300px;
    height: 380px;
    position: relative;         /* required for ::after */
    overflow: hidden;
}

.polaroid:hover {
    transform: rotate(0deg) scale(1.08) translateY(-25px);
    z-index: 100;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.65);
}

/* --- GALLERY SECTION --- */
#gallery-scroller {
    display: flex;
    gap: 2.5rem;
    overflow-x: auto;
    padding: 0 4rem 4rem 4rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
    cursor: grab;
}

#gallery-scroller:active {
    cursor: grabbing;
}

#gallery-scroller::-webkit-scrollbar {
    display: none;
}

/* --- UTILITY --- */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* --- PROGRESS BAR (future use) --- */
.progress-bar {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--gold), var(--glow));
    box-shadow: 0 0 10px var(--accent);
    z-index: 1000;
    pointer-events: none;
    transition: width 0.1s linear;
}

/* --- KEYFRAME ANIMATIONS --- */
@keyframes floatUp {
    0%   { transform: translateY(0px); }
    50%  { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}

.float-anim {
    animation: floatUp 4s ease-in-out infinite;
}

/* Mic button hover (injected by JS) */
#mic-btn:hover {
    background: var(--accent) !important;
    color: var(--deep) !important;
}

/* Birthday blast overlay */
#blast-overlay button:hover {
    background: rgba(166, 177, 225, 0.15);
}

/* Responsive: hide custom cursor on small touch screens */
@media (max-width: 768px) {
    #cursor, #cursor-follower { display: none; }
}
