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

body {
    font-family: 'Arial', sans-serif;
    overflow-x: hidden;
    background: #000;
    color: #fff;
    min-height: 100vh;
}

/* Cursor Trail */
.cursor-trail {
    position: fixed;
    width: 20px;
    height: 20px;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
}

.fairy-light {
    position: absolute;
    width: 6px;
    height: 6px;
    background: transparent;
    border-radius: 50%;
    pointer-events: none;
    animation: fairyFloat 2s ease-out forwards;
    filter: blur(1px);
}

.floating-heart {
    position: absolute;
    font-size: 16px;
    pointer-events: none;
    opacity: 0.8;
    filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.5));
    animation: heartFloat 2s ease-in-out infinite;
}

.floating-heart:nth-child(1) {
    animation-delay: 0s;
    transform: translate(-20px, 0);
    animation-name: heartFloatUp;
}

.floating-heart:nth-child(2) {
    animation-delay: 1s;
    transform: translate(20px, 0);
    animation-name: heartFloatDown;
}

@keyframes heartFloatUp {
    0%, 100% {
        transform: translate(-20px, 0) scale(1);
        opacity: 0.8;
        filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.5));
    }
    50% {
        transform: translate(-20px, -20px) scale(1.2);
        opacity: 1;
        filter: drop-shadow(0 0 15px rgba(255, 0, 0, 0.8));
    }
}

@keyframes heartFloatDown {
    0%, 100% {
        transform: translate(20px, 0) scale(1);
        opacity: 0.8;
        filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.5));
    }
    50% {
        transform: translate(20px, 20px) scale(1.2);
        opacity: 1;
        filter: drop-shadow(0 0 15px rgba(255, 0, 0, 0.8));
    }
}

/* Fairy dust effect for hearts */
.heart-fairy-dust {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: fairyDust 1.5s ease-out forwards;
}

@keyframes fairyDust {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

.fairy-light::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, 
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 100%);
    border-radius: 50%;
    animation: lightPulse 1.5s ease-in-out infinite;
}

.fairy-light::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, 
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: lightGlow 2s ease-in-out infinite;
}

@keyframes fairyFloat {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

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

@keyframes lightGlow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0.1;
    }
}

/* Add color variations */
.fairy-light.color1::before {
    background: radial-gradient(circle, 
        rgba(255, 192, 203, 0.8) 0%,
        rgba(255, 192, 203, 0.4) 50%,
        rgba(255, 192, 203, 0) 100%);
}

.fairy-light.color2::before {
    background: radial-gradient(circle, 
        rgba(173, 216, 230, 0.8) 0%,
        rgba(173, 216, 230, 0.4) 50%,
        rgba(173, 216, 230, 0) 100%);
}

.fairy-light.color3::before {
    background: radial-gradient(circle, 
        rgba(255, 255, 0, 0.8) 0%,
        rgba(255, 255, 0, 0.4) 50%,
        rgba(255, 255, 0, 0) 100%);
}

.fairy-light.color4::before {
    background: radial-gradient(circle, 
        rgba(255, 0, 255, 0.8) 0%,
        rgba(255, 0, 255, 0.4) 50%,
        rgba(255, 0, 255, 0) 100%);
}

.fairy-dust {
    position: absolute;
    width: 8px;
    height: 8px;
    background: transparent;
    border-radius: 50%;
    pointer-events: none;
    animation: fairyFloat 1.5s ease-out forwards;
}

.fairy-dust::before {
    content: '✨';
    position: absolute;
    font-size: 12px;
    animation: sparkle 1s ease-in-out infinite;
}

.fairy-dust.heart::before {
    content: '💖';
    font-size: 10px;
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 0.8;
    }
}

/* Scene Styles */
.scene {
    min-height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    opacity: 1;
    transform: translateY(0);
    transition: all 1s ease;
}

.content {
    text-align: center;
    padding: 2rem;
    max-width: 1200px;
    width: 100%;
}

/* Two Column Layout */
.two-column {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1rem;
}

.left {
    flex: 1;
    max-width: 45%;
}

.right {
    flex: 1;
    max-width: 45%;
    text-align: left;
}

/* Image Card Styles */
.image-card {
    position: relative;
    width: 100%;
    height: 300px;
    margin: 20px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    clip-path: none;
}

/* Different shapes for different cards */
#beginning .image-card {
    border-radius: 20px;
    clip-path: none;
}

#coder .image-card {
    border-radius: 20px;
    clip-path: none;
}

#magical-moments .image-card {
    border-radius: 20px;
    clip-path: none;
}

#emotional .image-card {
    border-radius: 20px;
    clip-path: none;
}

#final .image-card {
    border-radius: 20px;
    clip-path: none;
}

.image-card:hover {
    transform: translateY(-10px) rotate(2deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: none;
}

.image-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    z-index: 1;
}

.image-card:hover::before {
    transform: translateX(100%);
}

.image-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent, rgba(255, 255, 255, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-card:hover::after {
    opacity: 1;
}

.card-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
    transform-origin: center;
}

.image-card:hover .card-image img {
    transform: scale(1.1) rotate(1deg);
    filter: brightness(1.1) contrast(1.1);
}

/* Floating Animation */
@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(1deg);
    }
    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

/* Glow Effect */
@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    }
    100% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
    }
}

/* Add glow animation to cards */
.image-card {
    animation: float 3s ease-in-out infinite, glow 3s ease-in-out infinite;
}

/* Add border animation */
.image-card {
    border: 2px solid transparent;
    background-clip: padding-box;
}

.image-card:hover {
    border: 2px solid rgba(255, 255, 255, 0.3);
    background-clip: padding-box;
}

/* Add perspective effect */
.image-card {
    perspective: 1000px;
    transform-style: preserve-3d;
}

.image-card:hover {
    transform: translateY(-10px) rotate(2deg) translateZ(20px);
}

/* Add shine effect */
.image-card {
    position: relative;
    overflow: hidden;
}

.image-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

/* Text Content Styles */
.text-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.story-text.fancy {
    font-family: 'Dancing Script', cursive;
    font-size: 1.4rem;
    color: #fff;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-align: justify;
    padding: 0 1rem;
    opacity: 0;
    transform: translateY(20px);
    animation: textAppear 1s ease forwards;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    position: relative;
}

.story-text.fancy::first-letter {
    font-size: 2.2rem;
    color: #ffd700;
    float: left;
    padding-right: 0.5rem;
    line-height: 1;
}

.story-text.fancy:hover {
    transform: translateY(-5px);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

@keyframes textAppear {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive text adjustments */
@media (max-width: 768px) {
    .story-text.fancy {
        font-size: 1.2rem;
        padding: 0 0.5rem;
    }
    
    .story-text.fancy::first-letter {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .story-text.fancy {
        font-size: 1.1rem;
        padding: 0 0.3rem;
    }
    
    .story-text.fancy::first-letter {
        font-size: 1.6rem;
    }
}

/* Scene-specific text effects */
#beginning .story-text.fancy {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

#coder .story-text.fancy {
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
}

#magical-moments .story-text.fancy {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 105, 180, 0.3);
}

#emotional .story-text.fancy {
    color: #fff;
    text-shadow: 0 0 10px rgba(65, 105, 225, 0.3);
}

#final .story-text.fancy {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 65, 108, 0.3);
}

/* Add subtle background to text content */
.text-content {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.text-content:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}

/* Title and Subtitle */
.title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    color: #fff;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 1s ease forwards;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.subtitle {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #fff;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 1s ease forwards 0.5s;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Button Styles */
.glow-button, .next-scene-button {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 1s ease forwards 1s;
    font-family: 'Playfair Display', serif;
}

.glow-button:hover, .next-scene-button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.glow-button::before, .next-scene-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.glow-button:hover::before, .next-scene-button:hover::before {
    left: 100%;
}

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

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

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

/* Scene-specific backgrounds */
#landing {
    background: linear-gradient(135deg, #2c3e50, #3498db);
}

#beginning {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
}

#coder {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

#magical-moments {
    background: linear-gradient(135deg, #8e2de2, #4a00e0);
}

#emotional {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
}

#final {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
}

/* Enhanced Memory Cards */
.memory-card {
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(5px);
    transform: translateY(50px);
    opacity: 0;
    transition: all 0.5s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.memory-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.memory-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.memory-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.memory-card:hover::before {
    transform: translateX(100%);
}

/* Enhanced Coder Avatar */
.coder-avatar {
    margin: 2rem 0;
    transform: scale(0.8);
    opacity: 0;
    transition: all 1s ease;
}

.coder-avatar.visible {
    transform: scale(1);
    opacity: 1;
}

.coder-svg {
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.5));
    animation: float 3s ease-in-out infinite;
}

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

/* Scene Transitions */
.scene-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1000;
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.5s ease;
}

/* Enhanced Particle Canvas */
#particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Enhanced Memory Icons */
.memory-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Scene Navigation */
.scene-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}

.scene-dot {
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    margin: 10px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scene-dot.active {
    background: #fff;
    transform: scale(1.5);
}

/* Story Text */
.story-text {
    font-size: 2rem;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeIn 2s forwards;
}

/* Memory Cards */
.memory-cards {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.memory-card {
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(5px);
    transform: translateY(50px);
    opacity: 0;
    animation: floatUp 1s forwards;
}

.memory-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Glowing Text */
.glowing-text {
    font-size: 2.5rem;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
    margin: 1rem 0;
    opacity: 0;
    animation: glowPulse 2s infinite alternate;
}

/* Enhanced Love Letter Styles */
.letter-header {
    text-align: center;
    margin-bottom: 2rem;
}

.heart-icon {
    font-size: 2rem;
    display: inline-block;
    animation: heartBeat 1.5s infinite;
}

.letter-content {
    font-size: 1.2rem;
    line-height: 1.8;
    margin: 2rem 0;
}

.letter-footer {
    text-align: right;
    font-style: italic;
    margin-top: 2rem;
}

/* Interactive Elements */
.interactive-elements {
    position: relative;
    margin-top: 3rem;
}

.floating-hearts {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.magic-sparkles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Enhanced Button Styles */
.button-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.smile-icon {
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

.button-text {
    font-size: 1.2rem;
}

/* Response Message */
.response-message {
    margin-top: 2rem;
    text-align: center;
    font-size: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.response-message.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Confetti */
.confetti-container {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* New Animations */
@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Floating Hearts Animation */
.floating-heart {
    position: absolute;
    font-size: 1.5rem;
    animation: floatUp 3s ease-in-out infinite;
    opacity: 0;
}

/* Magic Sparkles */
.magic-sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    animation: sparkle 2s ease-in-out infinite;
    opacity: 0;
}

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

/* Enhanced Love Letter Container */
.love-letter {
    background: rgba(255, 255, 255, 0.1);
    padding: 3rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateY(100%);
    animation: scrollUp 2s forwards;
    max-width: 600px;
    margin: 0 auto;
}

/* Music Button */
.music-button {
    position: fixed;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1000;
}

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

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

@keyframes glowPulse {
    from { text-shadow: 0 0 10px rgba(255,255,255,0.5); }
    to { text-shadow: 0 0 20px rgba(255,255,255,0.8); }
}

@keyframes scrollUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .two-column {
        flex-direction: column;
        gap: 1rem;
    }

    .left, .right {
        max-width: 100%;
    }

    .story-text.fancy {
        font-size: 1.8rem;
    }

    .title {
        font-size: 2.8rem;
    }

    .subtitle {
        font-size: 1.5rem;
    }

    .story-text {
        font-size: 1.2rem;
    }
    
    .memory-cards {
        flex-direction: column;
    }
    
    .glowing-text {
        font-size: 2rem;
    }
    
    .love-letter {
        padding: 2rem;
    }
    
    .letter-content {
        font-size: 1rem;
    }
    
    .button-content {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .card-image {
        height: 200px;
    }
    
    .glow-button, .next-scene-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

/* Coder Section Styles */
.coder-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.coder-intro {
    text-align: center;
    margin-bottom: 40px;
}

.coder-intro .story-text {
    color: #fff;
    font-size: 1.8em;
    margin: 10px 0;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards;
}

.coder-intro .story-text:nth-child(1) { animation-delay: 0.2s; }
.coder-intro .story-text:nth-child(2) { animation-delay: 0.4s; }

.coder-image-container {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    transition: transform 0.3s ease;
}

.coder-image-container:hover {
    transform: scale(1.05);
}

.coder-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.coder-description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.poem-container, .coder-story {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    margin: 20px 0;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.fade-in-text {
    color: #fff;
    font-size: 1.5em;
    margin: 15px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.fade-in-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.coder-avatar {
    margin-top: 30px;
}

.coder-svg {
    width: 100px;
    height: 100px;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

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

/* Navigation Buttons */
.next-scene-button {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 2rem;
    opacity: 1;
    transform: translateY(0);
    animation: fadeIn 1s forwards 1s;
}

.next-scene-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

.next-scene-button:hover::before {
    left: 100%;
}

/* Scene-specific button positions */
#beginning .next-scene-button {
    margin-top: 3rem;
}

#coder .next-scene-button {
    margin-top: 2rem;
}

#adventures .next-scene-button {
    margin: 2rem auto;
    display: block;
}

#emotional .next-scene-button {
    margin-top: 3rem;
}

/* New Interactive Code Section */
.code-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    overflow: hidden;
    padding: 4rem 2rem;
}

.code-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(255, 255, 255, 0.05) 1px,
        transparent 1px,
        transparent 2px
    );
    animation: codeFlow 20s linear infinite;
}

@keyframes codeFlow {
    0% { transform: translateY(0); }
    100% { transform: translateY(100px); }
}

.code-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    transform: translateY(50px);
    opacity: 0;
    transition: all 1s ease;
}

.code-container.visible {
    transform: translateY(0);
    opacity: 1;
}

.code-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-icon {
    font-size: 2rem;
    color: #00ff9d;
    animation: pulse 2s infinite;
}

.code-title {
    font-size: 2rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 255, 157, 0.5);
}

.code-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.code-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.code-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

.code-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(0, 255, 157, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.code-card:hover::before {
    transform: translateX(100%);
}

.code-card-title {
    font-size: 1.2rem;
    color: #00ff9d;
    margin-bottom: 1rem;
}

.code-card-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.code-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.6);
}

.stat-icon {
    color: #00ff9d;
}

@media (max-width: 768px) {
    .code-container {
        padding: 1.5rem;
    }
    
    .code-title {
        font-size: 1.5rem;
    }
    
    .code-content {
        grid-template-columns: 1fr;
    }
}

/* Magical Moments Section Styles */
.timeline {
    position: relative;
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    background: linear-gradient(to bottom, #ffd700, #ff69b4);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    width: 100%;
}

.timeline-icon {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    z-index: 1;
}

.timeline-content {
    width: 45%;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    position: relative;
    transition: transform 0.3s ease;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: 55%;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-right: 55%;
}

.timeline-content:hover {
    transform: scale(1.05);
}

.timeline-content h3 {
    color: #ff69b4;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.magic-wand {
    text-align: center;
    margin-top: 40px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.wand-icon {
    font-size: 2em;
    margin-bottom: 10px;
    animation: float 2s ease-in-out infinite;
}

.wand-text {
    color: #ff69b4;
    font-style: italic;
}

.section-title {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    color: #fff;
    text-align: center;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(50px);
    animation: titleAppear 1s ease forwards;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    position: relative;
    padding: 0.5rem;
}

.section-title::before,
.section-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: lineExpand 1s ease forwards;
}

.section-title::before {
    left: -120px;
}

.section-title::after {
    right: -120px;
}

@keyframes titleAppear {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes lineExpand {
    0% {
        width: 0;
        opacity: 0;
    }
    100% {
        width: 100px;
        opacity: 1;
    }
}

/* Scene-specific title colors and effects */
#beginning .section-title {
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.7);
}

#coder .section-title {
    color: #00ff9d;
    text-shadow: 0 0 20px rgba(0, 255, 157, 0.7);
}

#magical-moments .section-title {
    color: #ff69b4;
    text-shadow: 0 0 20px rgba(255, 105, 180, 0.7);
}

#emotional .section-title {
    color: #4169e1;
    text-shadow: 0 0 20px rgba(65, 105, 225, 0.7);
}

#final .section-title {
    color: #8905c2;
    text-shadow: 0 0 20px rgba(255, 65, 108, 0.7);
}

/* Hover effects for titles */
.section-title:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.section-title:hover::before,
.section-title:hover::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    transition: background 0.3s ease;
}

/* Responsive design for titles */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .section-title::before,
    .section-title::after {
        width: 40px;
    }
    
    .section-title::before {
        left: -60px;
    }
    
    .section-title::after {
        right: -60px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-title::before,
    .section-title::after {
        width: 25px;
    }
    
    .section-title::before {
        left: -40px;
    }
    
    .section-title::after {
        right: -40px;
    }
}

/* Emotional Section Styles */
.message-container {
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.glowing-text {
    color: #fff;
    font-size: 1.8em;
    margin: 15px 0;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards;
}

.glowing-text:nth-child(1) { animation-delay: 0.2s; }
.glowing-text:nth-child(2) { animation-delay: 0.4s; }
.glowing-text:nth-child(3) { animation-delay: 0.6s; }
.glowing-text:nth-child(4) { animation-delay: 0.8s; }
.glowing-text:nth-child(5) { animation-delay: 1s; }
.glowing-text:nth-child(6) { animation-delay: 1.2s; }

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

#emotional {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

#emotional .content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    padding: 20px;
}

.sparkles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Card Animation Effects */
.image-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: cardGlow 3s infinite;
}

@keyframes cardGlow {
    0% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 0.5;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .card-image {
        height: 300px;
    }
    
    .card-content {
        padding: 20px;
    }
    
    .image-card {
        max-width: 90%;
    }
}

/* Forgive Me Button */
.forgive-button {
    background: linear-gradient(45deg, #ff416c, #ff4b2b);
    border: none;
    color: #fff;
    padding: 1.2rem 2.5rem;
    font-size: 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-family: 'Dancing Script', cursive;
    box-shadow: 0 5px 15px rgba(255, 65, 108, 0.4);
    animation: pulse 2s infinite;
}

.forgive-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 65, 108, 0.6);
    background: linear-gradient(45deg, #ff4b2b, #ff416c);
}

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

.forgive-button:hover::before {
    left: 100%;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(255, 65, 108, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 25px rgba(255, 65, 108, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(255, 65, 108, 0.4);
    }
}

/* Fireworks Container */
#fireworks-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.firework {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    box-shadow: 0 0 10px 5px rgba(255, 255, 255, 0.8);
    animation: explode 1s ease-out forwards;
}

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

.firework-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    animation: particle 1s ease-out forwards;
}

@keyframes particle {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
} 