/* Global Styles */
:root {
    --primary-color: #ff6b6b;
    --secondary-color: #ffd166;
    --accent-color: #d4af37;
    --text-color: #333;
    --light-color: #fff;
    --dark-overlay: rgba(0, 0, 0, 0.7);
    --light-overlay: rgba(255, 255, 255, 0.1);
    --font-primary: 'Poppins', sans-serif;
    --font-display: 'Dancing Script', cursive;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --border-radius: 15px;
}

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

html, body {
    height: 100%;
    font-family: var(--font-primary);
    color: var(--text-color);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    position: relative;
    background-color: #000;
}

/* Progressive Reveal Styles */
.hidden-screen {
    display: none !important;
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
}

.active-screen {
    display: block !important;
    opacity: 1;
    z-index: 100;
    pointer-events: auto;
    transition: opacity 1s ease;
}

.hidden-section {
    display: none;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal-section {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Welcome Screen */
.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../assets/images/friend/WhatsApp Image 2025-05-27 at 10.17.24 PM(1).jpeg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.8s ease-in-out;
}

.welcome-content {
    text-align: center;
    padding: 40px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: var(--border-radius);
    border: 3px solid var(--accent-color);
    max-width: 600px;
    animation: pulse 2s infinite alternate;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0 auto;
}

.welcome-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    color: var(--light-color);
    margin-bottom: 20px;
    text-shadow: 0 0 10px var(--accent-color);
}

.welcome-subtitle {
    font-size: 1.5rem;
    color: var(--light-color);
    margin-bottom: 40px;
}

.start-btn {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 1.5rem;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3), 0 0 15px var(--accent-color);
    position: relative;
    overflow: hidden;
    z-index: 1001;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.start-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: all 0.5s ease;
}

.start-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.start-btn:hover::before {
    left: 100%;
}

/* Progress Indicator */
.progress-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.progress-step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
    position: relative;
    border: 2px solid var(--light-overlay);
    transition: all 0.3s ease;
}

.progress-step::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 2px;
    background: var(--light-overlay);
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
}

.progress-step:last-child::after {
    display: none;
}

.progress-step.active {
    background: var(--primary-color);
    border-color: var(--accent-color);
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--primary-color);
}

.progress-step.completed {
    background: var(--secondary-color);
    border-color: var(--accent-color);
}

/* Continue Button */
.continue-btn {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 1.2rem;
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 30px;
    display: inline-block;
}

.continue-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.continue-btn i {
    margin-left: 10px;
}

/* Gift Boxes */
.gift-section {
    text-align: center;
    padding: 30px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: var(--border-radius);
    margin: 20px;
    box-shadow: var(--box-shadow);
}

.gift-section h2 {
    color: var(--light-color);
    margin-bottom: 20px;
    font-family: var(--font-display);
    font-size: 2.5rem;
}

.gift-intro {
    font-size: 1.2rem;
    color: var(--light-color);
    margin-bottom: 30px;
}

.gift-boxes {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.gift-box {
    position: relative;
    width: 150px;
    height: 150px;
    cursor: pointer;
    perspective: 1000px;
    transition: all 0.5s ease;
}

.gift-box:hover {
    transform: translateY(-10px);
}

.gift-container {
    position: absolute;
    width: 100%;
    height: 80%;
    bottom: 0;
    background: linear-gradient(45deg, var(--primary-color), #c0392b);
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    transition: all 0.5s ease;
}

.gift-lid {
    position: absolute;
    width: 110%;
    height: 25%;
    top: 0;
    left: -5%;
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    border-radius: 5px;
    transform-origin: bottom;
    transition: all 0.5s ease;
    z-index: 2;
}

.gift-ribbon {
    position: absolute;
    width: 20px;
    height: 100%;
    background: var(--secondary-color);
    left: 50%;
    transform: translateX(-50%);
}

.gift-ribbon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 20px;
    background: var(--secondary-color);
    top: 40%;
    left: 0;
    transform: translateY(-50%);
}

.gift-label {
    position: absolute;
    bottom: -30px;
    left: 0;
    width: 100%;
    text-align: center;
    color: var(--light-color);
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.gift-box:hover .gift-label {
    transform: scale(1.1);
    color: var(--secondary-color);
}

.gift-box.opened .gift-lid {
    transform: rotateX(-110deg);
}

.gift-progress {
    font-size: 1.1rem;
    color: var(--light-color);
    margin-bottom: 20px;
}

/* Slideshow Sections */
.slideshow-section, .friends-section {
    margin: 50px 0;
    padding: 30px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.gift-reveal-container {
    text-align: center;
}

.gift-reveal-container h2 {
    font-family: var(--font-display);
    color: var(--light-color);
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.slideshow-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 30px;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    border: 3px solid var(--accent-color);
    height: 450px; /* Fixed height for consistency */
}

.slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
    transform: scale(0.95);
}

.slide.active {
    opacity: 1;
    transform: scale(1);
}

.slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.9));
    color: white;
    padding: 15px;
    font-size: 1.1rem;
    text-align: center;
    border-top: 2px solid var(--accent-color);
}

.slide-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.slide-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.prev-btn {
    left: 15px;
}

.next-btn {
    right: 15px;
}

.back-to-gifts-btn {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 1.1rem;
    padding: 10px 25px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    display: inline-block;
}

.back-to-gifts-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Message Section */
.message-section {
    margin: 50px 0;
    padding: 30px;
}

.message-scroll {
    background: rgba(0, 0, 0, 0.7);
    padding: 30px;
    border-radius: var(--border-radius);
    color: var(--light-color);
    font-size: 1.2rem;
    line-height: 1.8;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 30px;
    border: 2px solid var(--accent-color);
    box-shadow: var(--box-shadow);
}

/* Cake Section */
.cake-section {
    margin: 50px 0;
    padding: 30px;
}

.cake-container {
    margin: 50px 0;
    perspective: 1000px;
}

.cake-container.larger {
    transform: scale(1.5);
}

.cake {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto;
    transform-style: preserve-3d;
    animation: cakeRotate 15s infinite linear;
}

.cake-base {
    position: absolute;
    width: 150px;
    height: 60px;
    background: linear-gradient(to right, #f39c12, #e74c3c);
    border-radius: 10px;
    bottom: 0;
}

.frosting {
    position: absolute;
    width: 150px;
    height: 20px;
    background: #f5f5f5;
    border-radius: 10px;
    bottom: 60px;
}

.candle {
    position: absolute;
    width: 10px;
    height: 40px;
    background: linear-gradient(to top, #3498db, #2ecc71);
    bottom: 80px;
    left: 70px;
    border-radius: 5px;
}

.flame {
    position: absolute;
    width: 15px;
    height: 25px;
    background: radial-gradient(#ffeb3b, #ff9800);
    border-radius: 50% 50% 20% 20%;
    bottom: 40px;
    left: -2.5px;
    animation: flicker 1s infinite alternate;
    box-shadow: 0 0 20px #ff9800, 0 0 40px #ff9800;
    cursor: pointer;
}

.blow-instruction {
    color: var(--light-color);
    font-size: 1.2rem;
    margin-top: 30px;
}

/* Balloon Section */
.balloon-section {
    margin: 50px 0;
    padding: 30px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.balloon-instruction {
    color: var(--light-color);
    font-size: 1.2rem;
    margin: 20px 0;
}

.interactive-balloons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin: 50px 0;
}

.balloon-item {
    width: 80px;
    height: 100px;
    background-color: var(--color);
    border-radius: 50%;
    position: relative;
    animation: float 3s infinite alternate ease-in-out;
    animation-delay: calc(var(--index, 0) * 0.5s);
    cursor: pointer;
    box-shadow: inset -5px -5px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.balloon-item:hover {
    transform: scale(1.1);
}

.balloon-text {
    color: rgba(255, 255, 255, 0.8);
    font-weight: bold;
    font-size: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.balloon-item::before {
    content: '';
    position: absolute;
    width: 2px;
    height: 100px;
    background: rgba(255, 255, 255, 0.7);
    bottom: -100px;
    left: 40px;
}

.balloon-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--color);
    bottom: -10px;
    left: 30px;
    border-radius: 0 0 5px 5px;
}

.balloon-counter {
    color: var(--light-color);
    font-size: 1.2rem;
    margin-top: 30px;
}

.balloon-item.popped {
    opacity: 0.2;
    transform: scale(0.8);
    pointer-events: none;
}

.balloon-surprise-container {
    min-height: 100px;
    margin: 30px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.balloon-surprise-message {
    color: var(--light-color);
    font-size: 1.3rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 15px 25px;
    border-radius: var(--border-radius);
    border: 2px solid var(--accent-color);
    max-width: 80%;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.balloon-surprise-message.show {
    opacity: 1;
    transform: translateY(0);
}

@keyframes pop {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    20% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* Final Section */
.final-section {
    text-align: center;
    padding: 50px 30px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: var(--border-radius);
    margin: 20px;
    box-shadow: var(--box-shadow);
}

.final-section h2 {
    font-family: var(--font-display);
    color: var(--light-color);
    font-size: 3.5rem;
    margin-bottom: 30px;
    text-shadow: 0 0 15px var(--accent-color);
}

.final-message {
    color: var(--light-color);
    font-size: 1.5rem;
    line-height: 1.8;
    margin-bottom: 40px;
}

.restart-btn {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 1.2rem;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 30px;
    display: inline-block;
}

.restart-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Background */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(3px) brightness(0.7);
    transform: scale(1.1);
    transition: all 1s ease;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg, 
        rgba(0, 0, 0, 0.8) 0%, 
        rgba(139, 0, 0, 0.5) 50%, 
        rgba(212, 175, 55, 0.3) 100%
    );
    z-index: 1;
}

/* Music Player */
.music-player {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 100;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 15px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--accent-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.music-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
}

.music-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--primary-color);
}

.music-tooltip {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.music-btn:hover .music-tooltip {
    opacity: 1;
}

#volume-control {
    margin-left: 10px;
    width: 80px;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    outline: none;
    opacity: 0;
    transition: all 0.3s ease;
}

.music-player:hover #volume-control {
    opacity: 1;
}

#volume-control::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--secondary-color);
    cursor: pointer;
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--primary-color);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
    mix-blend-mode: difference;
    box-shadow: 0 0 10px rgba(230, 57, 70, 0.7);
}

.cursor-trail {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s;
    opacity: 0.7;
}

/* Main Content */
.content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    justify-content: center;
}

/* Greeting Section */
.greeting-section {
    text-align: center;
    margin-bottom: 50px;
    padding: 30px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 2px solid var(--accent-color);
    box-shadow: var(--box-shadow);
    width: 100%;
    max-width: 800px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0 auto;
}

.typewriter {
    font-family: var(--font-display);
    font-size: 4rem;
    color: var(--light-color);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--secondary-color);
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

.message {
    font-size: 1.5rem;
    color: var(--light-color);
    line-height: 1.6;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards;
    animation-delay: 3.5s;
}

/* Countdown Section */
.countdown-section {
    margin-bottom: 50px;
    text-align: center;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
}

.countdown-section h2 {
    font-family: var(--font-display);
    color: var(--light-color);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.time-block {
    background: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 15px;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(10px);
    border: 1px solid var(--accent-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.time-block:hover {
    transform: translateY(-10px);
}

.time-block span:first-child {
    font-size: 3rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.time-label {
    font-size: 1rem;
    color: var(--light-color);
    margin-top: 5px;
}

/* Confetti Canvas */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

/* Animations */
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--secondary-color) }
}

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

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

@keyframes flicker {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(0.8);
        opacity: 0.8;
    }
}

@keyframes float {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 10px var(--accent-color);
    }
    100% {
        box-shadow: 0 0 30px var(--accent-color), 0 0 50px var(--accent-color);
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .welcome-title {
        font-size: 2.5rem;
    }
    
    .welcome-subtitle {
        font-size: 1.2rem;
    }
    
    .start-btn {
        font-size: 1.2rem;
        padding: 12px 30px;
    }
    
    .typewriter {
        font-size: 2.5rem;
    }
    
    .message {
        font-size: 1.2rem;
    }
    
    .gift-boxes {
        gap: 15px;
    }
    
    .gift-box {
        width: 120px;
        height: 120px;
    }
    
    .slideshow-container {
        height: 350px;
    }
    
    .slide img {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .welcome-title {
        font-size: 2rem;
    }
    
    .welcome-content {
        padding: 30px;
    }
    
    .countdown {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .time-block {
        width: 100%;
        max-width: 200px;
    }
    
    .gift-box {
        width: 100px;
        height: 100px;
    }
    
    .slideshow-container {
        height: 300px;
    }
    
    .slide img {
        height: 250px;
    }
}
