/* --- Global Variables & Theme Setup --- */
:root {
    --bg-gradient: linear-gradient(135deg, #0d0b21 0%, #17113b 50%, #0a041c 100%);
    --primary: #ffd700; /* Gold */
    --primary-glow: rgba(255, 215, 0, 0.4);
    --secondary: #ff3366; /* Vibrant Rose */
    --secondary-glow: rgba(255, 51, 102, 0.4);
    --text-color: #f5f4fc;
    --text-muted: #a39eb8;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.07);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- Particle Canvas --- */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* --- Utilities & Typography --- */
.cursive {
    font-family: 'Pacifico', cursive;
    font-size: 2.2rem;
    display: block;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px var(--secondary-glow);
}

.gradient-text {
    background: linear-gradient(45deg, #ffd700, #ff6699, #00f2fe);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shineText 5s linear infinite;
}

@keyframes shineText {
    to { background-position: 200% center; }
}

.glow-text {
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

.hidden {
    display: none !important;
}

/* --- Glassmorphism Card Style --- */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 24px;
}

/* --- Floating Music Player --- */
.music-btn {
    position: fixed;
    top: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.08);
    color: var(--primary);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.music-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px var(--primary-glow);
}

.music-btn.playing {
    animation: rotate 6s linear infinite;
}

.music-wave {
    position: absolute;
    bottom: 5px;
    display: flex;
    gap: 2px;
}

.music-wave span {
    width: 2px;
    height: 5px;
    background: var(--primary);
    animation: bounceWave 0.8s ease infinite alternate;
    display: none;
}

.music-btn.playing .music-wave span {
    display: block;
}

.music-wave span:nth-child(2) { animation-delay: 0.2s; }
.music-wave span:nth-child(3) { animation-delay: 0.4s; }

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

@keyframes bounceWave {
    from { height: 3px; }
    to { height: 12px; }
}

/* --- Overlay & Gift Box --- */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #090616;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out;
}

.intro-card {
    padding: 3rem;
    text-align: center;
    max-width: 450px;
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.intro-card h1 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.click-instruction {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- Gift Box CSS --- */
.gift-box {
    position: relative;
    width: 120px;
    height: 120px;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: transform 0.3s;
}

.gift-box:hover {
    transform: scale(1.08);
}

.gift-body {
    position: absolute;
    bottom: 0;
    left: 10px;
    width: 100px;
    height: 90px;
    background: linear-gradient(135deg, #ff3366, #ff0077);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.gift-lid {
    position: absolute;
    top: 15px;
    left: 0;
    width: 120px;
    height: 25px;
    background: linear-gradient(135deg, #ff4d79, #ff1a8c);
    border-radius: 5px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    z-index: 10;
    transition: transform 0.5s ease;
}

.gift-ribbon-y {
    position: absolute;
    top: 15px;
    left: 50px;
    width: 20px;
    height: 105px;
    background: var(--primary);
    z-index: 5;
}

.gift-ribbon-x {
    position: absolute;
    top: 50px;
    left: 10px;
    width: 100px;
    height: 20px;
    background: var(--primary);
    z-index: 5;
}

/* Box Open Animations */
.gift-box.open .gift-lid {
    transform: translateY(-50px) rotate(-15deg);
}

/* --- Main Layout --- */
main {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-section {
    text-align: center;
    margin-bottom: 3rem;
}

.banner-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 1rem;
    max-width: 600px;
}

/* --- Celebration Area --- */
.celebration-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    width: 100%;
    max-width: 950px;
    align-items: center;
    margin-bottom: 4rem;
}

@media (max-width: 768px) {
    .celebration-area {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

/* --- 3D Photo Card --- */
.card-container {
    perspective: 1000px;
    display: flex;
    justify-content: center;
}

.birthday-card {
    position: relative;
    width: 320px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    transform-style: preserve-3d;
    cursor: grab;
}

.birthday-card:active {
    cursor: grabbing;
}

.image-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 1;
    margin-bottom: 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.birthday-card:hover .profile-img {
    transform: scale(1.05);
}

.card-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    transition: left 0.75s ease-in-out;
}

.birthday-card:hover .card-shine {
    left: 150%;
}

.card-footer h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.75rem 0 0.25rem 0;
}

.role-text {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 215, 0, 0.15);
    color: var(--primary);
    border: 1px solid rgba(255, 215, 0, 0.3);
    padding: 0.25rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* --- Wishes Slideshow --- */
.wishes-container {
    padding: 2.5rem;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.wish-slider {
    position: relative;
    overflow: hidden;
    height: 180px;
}

.wish-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}

.wish-slide.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.wish-slide h3 {
    font-size: 1.4rem;
    margin: 1rem 0 0.5rem 0;
    font-weight: 600;
}

.wish-text {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 1.05rem;
}

.icon-pulse {
    font-size: 2rem;
}

.text-rose { color: var(--secondary); text-shadow: 0 0 10px var(--secondary-glow); }
.text-gold { color: var(--primary); text-shadow: 0 0 10px var(--primary-glow); }
.text-amber { color: #ff9f43; text-shadow: 0 0 10px rgba(255, 159, 67, 0.4); }

.slider-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
}

.control-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.3s;
}

.control-btn:hover {
    color: var(--text-color);
}

.slider-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow);
}

/* --- Interactive Zone (Balloon Game) --- */
.interactive-zone {
    width: 100%;
    max-width: 950px;
    padding: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    overflow: hidden;
}

.interactive-zone h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.interactive-zone p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.balloon-pop-stat {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.balloon-pop-stat strong {
    color: var(--primary);
}

.balloon-spawner {
    position: relative;
    height: 350px;
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* Interactive Balloons */
.balloon {
    position: absolute;
    bottom: -80px;
    width: 55px;
    height: 70px;
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    cursor: pointer;
    box-shadow: inset -5px -5px 10px rgba(0,0,0,0.2), inset 5px 5px 10px rgba(255,255,255,0.4);
    animation: riseUp var(--duration) linear infinite;
}

.balloon::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 23px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 8px solid currentColor;
}

.balloon::before {
    content: "";
    position: absolute;
    bottom: -22px;
    left: 26px;
    width: 2px;
    height: 15px;
    background: rgba(255, 255, 255, 0.4);
}

@keyframes riseUp {
    0% {
        bottom: -80px;
        transform: translateX(0) rotate(0deg);
    }
    50% {
        transform: translateX(var(--drift)) rotate(var(--rotate));
    }
    100% {
        bottom: 110%;
        transform: translateX(calc(var(--drift) * -1)) rotate(calc(var(--rotate) * -1));
    }
}

/* Balloon Burst Particle */
.pop-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    animation: burst 0.5s ease-out forwards;
}

@keyframes burst {
    to {
        transform: translate(var(--tx), var(--ty)) scale(0.2);
        opacity: 0;
    }
}

/* --- Action Buttons --- */
.action-btn {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0b071e;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.5);
}

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

.footer-actions {
    margin-bottom: 2rem;
}

/* --- Custom Input Form for Sender --- */
.form-container {
    width: 100%;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.glass-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.glass-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.glass-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

textarea.glass-input {
    resize: none;
}

/* --- Date Badge Style --- */
.date-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 51, 102, 0.15);
    color: var(--secondary);
    border: 1px solid rgba(255, 51, 102, 0.3);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 1rem;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(255, 51, 102, 0.1);
}

/* --- Wishes Log/History Styles --- */
.wishes-log-section {
    width: 100%;
    max-width: 950px;
    padding: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
}

.wishes-log-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.wishes-log-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Scrollbar styling for container */
.wishes-log-container::-webkit-scrollbar {
    width: 6px;
}
.wishes-log-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}
.wishes-log-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}
.wishes-log-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.no-wishes {
    color: var(--text-muted);
    font-style: italic;
}

.wish-log-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.2rem;
    text-align: left;
    transition: all 0.3s ease;
}

.wish-log-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 215, 0, 0.2);
    transform: translateY(-2px);
}

.wish-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.wish-log-name {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.05rem;
}

.wish-log-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.wish-log-message {
    color: var(--text-color);
    line-height: 1.5;
    font-size: 0.95rem;
}

/* --- Developer Credit Styling --- */
.developer-credit {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.developer-credit a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.developer-credit a:hover {
    color: #fff;
    text-shadow: 0 0 8px var(--primary-glow);
}
