/* Pixel Art Anniversary Website */

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

/* Music Controls */
.music-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 200;
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.5s ease-out;
}

.music-controls.show {
    opacity: 1;
    transform: translateY(0);
}

.pixel-music-frame {
    background: #2c2c54;
    border: 3px solid #000;
    border-radius: 0;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 
        inset 3px 3px 0px #4ecdc4,
        inset -3px -3px 0px #1a1a2e,
        6px 6px 0px #000;
    min-width: 300px;
}

.pixel-music-btn {
    background: #ff6b6b;
    border: 2px solid #000;
    color: #fff;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 3px 3px 0px #000;
    position: relative;
}

.pixel-music-btn::before {
    content: '';
    position: absolute;
    width: 48px;
    height: 48px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

#playPauseBtn::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><rect width="48" height="48" fill="%23000"/><polygon points="15,12 15,36 33,24" fill="%23fff"/></svg>');
}

#volumeBtn::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><rect width="48" height="48" fill="%23000"/><rect x="12" y="15" width="6" height="18" fill="%23fff"/><rect x="21" y="12" width="6" height="24" fill="%23fff"/><rect x="30" y="9" width="6" height="30" fill="%23fff"/></svg>');
}

/* Hide text content when using icons */
#playPauseIcon,
#volumeIcon {
    display: none;
}

.pixel-music-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0px #000;
    background: #ff5252;
}

.pixel-music-btn:active {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0px #000;
}

.music-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.music-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.5rem;
    color: #4ecdc4;
    text-shadow: 1px 1px 0px #000;
    text-align: center;
}

.music-progress {
    width: 100%;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #1a1a2e;
    border: 2px solid #000;
    position: relative;
    box-shadow: inset 2px 2px 0px #4ecdc4;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4);
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: inset 1px 1px 0px #fff;
}

/* Music Visualizer */
.music-visualizer {
    position: fixed;
    bottom: 100px;
    right: 20px;
    display: flex;
    align-items: end;
    gap: 2px;
    height: 60px;
    z-index: 150;
}

.visualizer-bar {
    width: 4px;
    background: #ff6b6b;
    border: 1px solid #000;
    animation: visualizerPulse 0.5s ease-in-out infinite alternate;
}

.visualizer-bar:nth-child(1) { animation-delay: 0s; }
.visualizer-bar:nth-child(2) { animation-delay: 0.1s; }
.visualizer-bar:nth-child(3) { animation-delay: 0.2s; }
.visualizer-bar:nth-child(4) { animation-delay: 0.3s; }
.visualizer-bar:nth-child(5) { animation-delay: 0.4s; }
.visualizer-bar:nth-child(6) { animation-delay: 0.5s; }
.visualizer-bar:nth-child(7) { animation-delay: 0.6s; }
.visualizer-bar:nth-child(8) { animation-delay: 0.7s; }

@keyframes visualizerPulse {
    0% {
        height: 10px;
        background: #ff6b6b;
    }
    100% {
        height: 60px;
        background: #4ecdc4;
    }
}

/* Volume Control */
.volume-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.volume-slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.pixel-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 8px;
    background: #1a1a2e;
    border: 2px solid #000;
    border-radius: 0;
    outline: none;
    box-shadow: inset 2px 2px 0px #4ecdc4;
}

.pixel-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #ff6b6b;
    border: 2px solid #000;
    border-radius: 0;
    cursor: pointer;
    box-shadow: 2px 2px 0px #000;
}

.pixel-volume-slider::-webkit-slider-thumb:hover {
    background: #ff5252;
    transform: scale(1.1);
}

.pixel-volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #ff6b6b;
    border: 2px solid #000;
    border-radius: 0;
    cursor: pointer;
    box-shadow: 2px 2px 0px #000;
}

.pixel-volume-slider::-moz-range-thumb:hover {
    background: #ff5252;
    transform: scale(1.1);
}

.volume-display {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.4rem;
    color: #4ecdc4;
    text-shadow: 1px 1px 0px #000;
    min-width: 30px;
    text-align: center;
}

/* Fade In Animation */
.fade-in {
    animation: fadeIn 2s ease-in;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Days Counter Animation */
.days-counter-container {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

.pixel-counter-frame {
    background: #2c2c54;
    border: 4px solid #000;
    border-radius: 0;
    padding: 2rem;
    text-align: center;
    box-shadow: 
        inset 4px 4px 0px #4ecdc4,
        inset -4px -4px 0px #1a1a2e,
        8px 8px 0px #000;
    position: relative;
    min-width: 300px;
    animation: counterAppear 1s ease-out;
}

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

.counter-label {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    color: #4ecdc4;
    text-shadow: 1px 1px 0px #000;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.counter-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.counter-number {
    font-family: 'Press Start 2P', monospace;
    font-size: 3rem;
    color: #ff6b6b;
    text-shadow: 4px 4px 0px #000, 8px 8px 0px rgba(0,0,0,0.3);
    animation: counterGlow 2s ease-in-out infinite alternate;
}

@keyframes counterGlow {
    from {
        text-shadow: 4px 4px 0px #000, 8px 8px 0px rgba(0,0,0,0.3), 0 0 20px #ff6b6b;
    }
    to {
        text-shadow: 4px 4px 0px #000, 8px 8px 0px rgba(0,0,0,0.3), 0 0 30px #ff6b6b, 0 0 40px #ff6b6b;
    }
}

.counter-text {
    font-family: 'Press Start 2P', monospace;
    font-size: 1.2rem;
    color: #96ceb4;
    text-shadow: 2px 2px 0px #000;
}

.counter-subtitle {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.5rem;
    color: #4ecdc4;
    text-shadow: 1px 1px 0px #000;
    letter-spacing: 1px;
}

/* Counter Animation Effects */
.counter-number.counting {
    animation: counterPulse 0.1s ease-in-out;
}

@keyframes counterPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Counter Particles */
.counter-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ff6b6b;
    border: 1px solid #000;
    pointer-events: none;
    animation: counterParticle 1s ease-out forwards;
}

@keyframes counterParticle {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: scale(0) rotate(360deg);
        opacity: 0;
    }
}

/* Mobile Touch Improvements */
@media (max-width: 768px) {
    /* Improve touch targets */
    .pixel-btn {
        min-height: 48px;
        min-width: 48px;
        padding: 12px 16px;
    }
    
    .pixel-input {
        min-height: 48px;
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px;
        border-radius: 0;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
    
    /* Date input mobile styling */
    input[type="date"] {
        color-scheme: dark;
    }
    
    input[type="date"]::-webkit-calendar-picker-indicator {
        filter: invert(1);
        cursor: pointer;
    }
    
    /* Music controls mobile */
    .pixel-music-frame {
        min-width: 280px;
        padding: 0.8rem;
        gap: 0.8rem;
    }
    
    .pixel-music-btn {
        width: 50px;
        height: 50px;
        font-size: 0.5rem;
    }
    
    /* Drake mobile adjustments */
    .drake-character {
        transform: scale(0.8);
    }
    
    .drake-bubble {
        max-width: 250px;
        font-size: 0.6rem;
    }
    
    /* Photo carousel mobile */
    .photo-carousel {
        padding: 1rem;
    }
    
    .photo-description {
        padding: 1rem;
    }
    
    .photo-description h3 {
        font-size: 0.8rem;
    }
    
    .photo-description p {
        font-size: 0.6rem;
        line-height: 1.4;
    }
}

/* Responsive Counter */
@media (max-width: 768px) {
    .pixel-counter-frame {
        min-width: 250px;
        padding: 1.5rem;
    }
    
    .counter-number {
        font-size: 2.5rem;
    }
    
    .counter-text {
        font-size: 1rem;
    }
    
    .counter-label {
        font-size: 0.5rem;
    }
    
    .counter-subtitle {
        font-size: 0.4rem;
    }
}

@media (max-width: 480px) {
    /* Extra small mobile improvements */
    .container {
        padding: 1rem;
    }
    
    .pixel-title h1 {
        font-size: 1.2rem;
    }
    
    .subtitle {
        font-size: 0.6rem;
        margin: 1rem 0;
    }
    
    /* Drake very small screens */
    .drake-character {
        transform: scale(0.6);
    }
    
    .drake-bubble {
        max-width: 200px;
        font-size: 0.5rem;
    }
    
    /* Music controls very small */
    .pixel-music-frame {
        min-width: 250px;
        padding: 0.6rem;
        gap: 0.6rem;
    }
    
    .pixel-music-btn {
        width: 45px;
        height: 45px;
        font-size: 0.4rem;
    }
    
    /* Photo carousel very small */
    .photo-description h3 {
        font-size: 0.7rem;
    }
    
    .photo-description p {
        font-size: 0.5rem;
    }
    
    /* Gift box mobile */
    .gift-box {
        width: 200px;
        height: 200px;
    }
    
    .gift-instruction p {
        font-size: 0.6rem;
    }
    
    .pixel-counter-frame {
        min-width: 200px;
        padding: 1rem;
    }
    
    .counter-number {
        font-size: 2rem;
    }
    
    .counter-text {
        font-size: 0.8rem;
    }
    
    .counter-label {
        font-size: 0.4rem;
    }
    
    .counter-subtitle {
        font-size: 0.3rem;
    }
    
    .counter-display {
        gap: 0.5rem;
    }
}

/* Landscape orientation for mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .drake-character {
        transform: scale(0.5);
    }
    
    .drake-bubble {
        max-width: 180px;
        font-size: 0.5rem;
    }
    
    .pixel-music-frame {
        min-width: 200px;
        padding: 0.5rem;
    }
    
    .photo-carousel {
        padding: 0.5rem;
    }
    
    .container {
        padding: 0.5rem;
    }
}

/* Touch improvements for all mobile devices */
@media (hover: none) and (pointer: coarse) {
    .pixel-btn:hover {
        transform: translate(-2px, -2px);
        box-shadow: 6px 6px 0px #000;
    }
    
    .pixel-btn:active {
        transform: translate(2px, 2px);
        box-shadow: 2px 2px 0px #000;
    }
    
    /* Improve carousel touch */
    .carousel-btn {
        min-width: 48px;
        min-height: 48px;
    }
    
    /* Improve photo touch */
    .photo-item {
        cursor: pointer;
    }
    }
}

/* Snow Storm Animation */
.snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    animation: snowFall linear infinite;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.snowflake:nth-child(odd) {
    width: 3px;
    height: 3px;
    background: #f0f0f0;
}

.snowflake:nth-child(3n) {
    width: 5px;
    height: 5px;
    background: #ffffff;
    border: 2px solid #d0d0d0;
}

.snowflake:nth-child(5n) {
    width: 2px;
    height: 2px;
    background: #f8f8f8;
}

@keyframes snowFall {
    0% {
        transform: translateY(-100vh) translateX(0) rotate(0deg);
        opacity: 1;
    }
    10% {
        transform: translateY(-90vh) translateX(10px) rotate(36deg);
        opacity: 0.9;
    }
    20% {
        transform: translateY(-80vh) translateX(-5px) rotate(72deg);
        opacity: 0.8;
    }
    30% {
        transform: translateY(-70vh) translateX(15px) rotate(108deg);
        opacity: 0.7;
    }
    40% {
        transform: translateY(-60vh) translateX(-10px) rotate(144deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-50vh) translateX(8px) rotate(180deg);
        opacity: 0.5;
    }
    60% {
        transform: translateY(-40vh) translateX(-15px) rotate(216deg);
        opacity: 0.4;
    }
    70% {
        transform: translateY(-30vh) translateX(12px) rotate(252deg);
        opacity: 0.3;
    }
    80% {
        transform: translateY(-20vh) translateX(-8px) rotate(288deg);
        opacity: 0.2;
    }
    90% {
        transform: translateY(-10vh) translateX(6px) rotate(324deg);
        opacity: 0.1;
    }
    100% {
        transform: translateY(100vh) translateX(0) rotate(360deg);
        opacity: 0;
    }
}

/* Snow Storm Effects */
.snow-storm {
    animation: snowStorm 0.5s ease-in-out infinite alternate;
}

@keyframes snowStorm {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(2px);
    }
}

/* Responsive Snow */
@media (max-width: 768px) {
    .snowflake {
        width: 3px;
        height: 3px;
    }
    
    .snowflake:nth-child(odd) {
        width: 2px;
        height: 2px;
    }
    
    .snowflake:nth-child(3n) {
        width: 4px;
        height: 4px;
    }
}

@media (max-width: 480px) {
    .snowflake {
        width: 2px;
        height: 2px;
    }
    
    .snowflake:nth-child(odd) {
        width: 1px;
        height: 1px;
    }
    
    .snowflake:nth-child(3n) {
        width: 3px;
        height: 3px;
    }
}

/* Responsive Music Controls */
@media (max-width: 768px) {
    .music-controls {
        bottom: 10px;
        right: 10px;
    }
    
    .pixel-music-frame {
        min-width: 250px;
        padding: 0.8rem;
        gap: 0.8rem;
    }
    
    .pixel-music-btn {
        width: 35px;
        height: 35px;
        font-size: 0.5rem;
    }
    
    .music-title {
        font-size: 0.4rem;
    }
}

@media (max-width: 480px) {
    .pixel-music-frame {
        min-width: 200px;
        padding: 0.6rem;
        gap: 0.6rem;
    }
    
    .pixel-music-btn {
        width: 30px;
        height: 30px;
        font-size: 0.4rem;
    }
    
    .music-title {
        font-size: 0.3rem;
    }
}

/* Drake Character Animation */
.drake-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    animation: drakeEntrance 2s ease-out 1s forwards;
}

@keyframes drakeEntrance {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes drakemovetoside {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 1;
        transform: translate(250%, -50%) scale(1);
    }
}

.drake-character {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.drake-sprite {
    width: 120px;
    height: 120px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    animation: drakeIdle 2s ease-in-out infinite;
    filter: drop-shadow(4px 4px 0px #000);
}

@keyframes drakeIdle {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.05);
    }
}

.drake-bubble {
    position: absolute;
    bottom: 140px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: bubbleAppear 0.5s ease-out forwards;
    animation-delay: 3s;
}

.bubble-content {
    position: relative;
    background: #fff;
    border: 4px solid #000;
    border-radius: 0;
    padding: 1rem 1.5rem;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 
        inset 2px 2px 0px #4ecdc4,
        inset -2px -2px 0px #1a1a2e,
        6px 6px 0px #000;
    z-index: 101;
}

.bubble-text {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    color: #000;
    line-height: 1.6;
    text-align: center;
    min-height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bubble-arrow {
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 12px solid #000;
}

.bubble-arrow::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: -10px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #fff;
}

@keyframes bubbleAppear {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0.3);
    }
    50% {
        opacity: 0.8;
        transform: translateX(-50%) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

/* Typing Animation */
.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1rem;
    background: #000;
    animation: typingBlink 1s infinite;
    margin-left: 2px;
}

@keyframes typingBlink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Drake Animation States */
.drake-sprite.talking {
    animation: drakeTalking 0.3s ease-in-out infinite;
}

@keyframes drakeTalking {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-3px) scale(1.02);
    }
}

.drake-sprite.happy {
    animation: drakeHappy 0.5s ease-in-out;
}

@keyframes drakeHappy {
    0% {
        transform: translateY(0px) scale(1);
    }
    25% {
        transform: translateY(-10px) scale(1.1);
    }
    50% {
        transform: translateY(-5px) scale(1.05);
    }
    75% {
        transform: translateY(-10px) scale(1.1);
    }
    100% {
        transform: translateY(0px) scale(1);
    }
}

.drake-sprite.sad {
    animation: drakeSad 0.5s ease-in-out;
}

@keyframes drakeSad {
    0% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(5px) scale(0.95);
    }
    100% {
        transform: translateY(0px) scale(1);
    }
}

/* Date Container Animation */
#dateContainer {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

#dateContainer.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Drake */
@media (max-width: 768px) {
    .drake-sprite {
        width: 80px;
        height: 80px;
    }
    
    .bubble-content {
        min-width: 250px;
        max-width: 300px;
        padding: 0.8rem 1rem;
    }
    
    .bubble-text {
        font-size: 0.5rem;
    }
    
    .drake-bubble {
        bottom: 100px;
    }
}

@media (max-width: 480px) {
    .drake-sprite {
        width: 60px;
        height: 60px;
    }
    
    .bubble-content {
        min-width: 200px;
        max-width: 250px;
        padding: 0.6rem 0.8rem;
    }
    
    .bubble-text {
        font-size: 0.4rem;
    }
    
    .drake-bubble {
        bottom: 80px;
    }
}

body {
    font-family: 'Press Start 2P', monospace;
    background: #1a1a2e;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    position: relative;
}

/* Enhanced Pixel Art Background for First Page */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        /* Main gradient background */
        linear-gradient(135deg, #1a1a2e 0%, #16213e 25%, #0f3460 50%, #533483 75%, #7209b7 100%),
        /* Pixel heart pattern */
        radial-gradient(circle at 20% 20%, rgba(255, 107, 107, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(78, 205, 196, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 70%, rgba(255, 107, 107, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(78, 205, 196, 0.08) 0%, transparent 50%),
        /* Pixel grid overlay */
        linear-gradient(45deg, rgba(44, 44, 84, 0.1) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(44, 44, 84, 0.1) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(44, 44, 84, 0.1) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(44, 44, 84, 0.1) 75%);
    background-size: 100% 100%, 300px 300px, 250px 250px, 350px 350px, 280px 280px, 20px 20px, 20px 20px, 20px 20px, 20px 20px;
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 10px, 10px -10px, -10px 0px;
    pointer-events: none;
    z-index: -1;
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% {
        background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 10px, 10px -10px, -10px 0px;
    }
    25% {
        background-position: 0 0, 50px 50px, -30px 30px, 40px -20px, -20px 40px, 5px 5px, 5px 15px, 15px -5px, -5px 5px;
    }
    50% {
        background-position: 0 0, 100px 100px, -60px 60px, 80px -40px, -40px 80px, 10px 10px, 10px 20px, 20px 0px, 0px 10px;
    }
    75% {
        background-position: 0 0, 150px 150px, -90px 90px, 120px -60px, -60px 120px, 15px 15px, 15px 25px, 25px 5px, 5px 15px;
    }
}

/* Special background for first page only */
#page1 {
    background: 
        /* Retro dark gradient */
        linear-gradient(45deg, #0a0a0a 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #533483 100%),
        /* Retro grid pattern */
        linear-gradient(90deg, rgba(0, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(180deg, rgba(0, 255, 255, 0.1) 1px, transparent 1px),
        /* Pixel stars - retro colors */
        radial-gradient(2px 2px at 20px 30px, #00ffff, transparent),
        radial-gradient(2px 2px at 40px 70px, #ff00ff, transparent),
        radial-gradient(1px 1px at 90px 40px, #ffff00, transparent),
        radial-gradient(1px 1px at 130px 80px, #00ff00, transparent),
        radial-gradient(2px 2px at 160px 30px, #ff0000, transparent),
        radial-gradient(1px 1px at 200px 60px, #00ffff, transparent),
        radial-gradient(2px 2px at 240px 20px, #ff00ff, transparent),
        radial-gradient(1px 1px at 280px 50px, #ffff00, transparent),
        radial-gradient(2px 2px at 320px 80px, #00ff00, transparent),
        /* Retro scanlines */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 255, 0.05) 2px,
            rgba(0, 255, 255, 0.05) 4px
        );
    background-size: 
        100% 100%,
        20px 20px,
        20px 20px,
        50px 50px,
        50px 50px,
        50px 50px,
        50px 50px,
        50px 50px,
        50px 50px,
        50px 50px,
        50px 50px,
        50px 50px,
        100% 4px;
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
    animation: firstPageBackground 12s ease-in-out infinite;
}

@keyframes firstPageBackground {
    0%, 100% {
        background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
    }
    25% {
        background-position: 0 0, 5px 5px, 5px 5px, 10px 10px, -10px 10px, 10px -10px, -10px -10px, 10px 10px, -10px 10px, 10px -10px, -10px -10px, 20px 20px, 0 0;
    }
    50% {
        background-position: 0 0, -5px -5px, -5px -5px, -10px -10px, 10px -10px, -10px 10px, 10px 10px, -10px -10px, 10px -10px, -10px 10px, 10px 10px, -20px -20px, 0 0;
    }
    75% {
        background-position: 0 0, 2px 2px, 2px 2px, 5px 5px, -5px 5px, 5px -5px, -5px -5px, 5px 5px, -5px 5px, 5px -5px, -5px -5px, 10px 10px, 0 0;
    }
}


/* Love Letter Styles */
.love-letter-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 2rem;
}

.letter-paper {
    background: #f8f8f8;
    border: 4px solid #000;
    border-radius: 0;
    padding: 3rem;
    max-width: 800px;
    width: 100%;
    box-shadow: 
        inset 4px 4px 0px #4ecdc4,
        inset -4px -4px 0px #1a1a2e,
        8px 8px 0px #000;
    position: relative;
    animation: letterAppear 1s ease-out;
}

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

.letter-header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid #000;
    padding-bottom: 1rem;
}

.letter-date {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.letter-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 1rem;
    color: #ff6b6b;
    text-shadow: 2px 2px 0px #000;
}

.letter-content {
    line-height: 1.8;
    color: #333;
}

.letter-greeting {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.8rem;
    color: #4ecdc4;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 0px #000;
}

.letter-paragraph {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.5rem;
    color: #333;
    margin-bottom: 1.5rem;
    text-align: justify;
    line-height: 1.6;
}

.letter-closing {
    text-align: right;
    margin-top: 2rem;
}

.letter-signature {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.5rem;
    color: #4ecdc4;
    margin-bottom: 0.5rem;
}

.letter-name {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    color: #ff6b6b;
    text-shadow: 1px 1px 0px #000;
}

.letter-footer {
    text-align: center;
    margin-top: 2rem;
    border-top: 2px solid #000;
    padding-top: 1rem;
}

.letter-hearts {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    animation: heartPulse 2s ease-in-out infinite;
}

@keyframes heartPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.letter-days {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    color: #96ceb4;
    text-shadow: 1px 1px 0px #000;
}

/* Button Container */
.button-container {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Gift Box Styles */
.gift-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 1.5rem;
    color: #ff6b6b;
    text-shadow: 3px 3px 0px #000;
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: 3px;
}

.gift-subtitle {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    color: #4ecdc4;
    text-shadow: 1px 1px 0px #000;
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

.gift-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
    position: relative;
}

/* Decorative flowers around gift box */
.gift-container::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -100px;
    width: 30px;
    height: 30px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 30 30"><circle cx="15" cy="15" r="12" fill="%23ff6b6b" stroke="%23000" stroke-width="2"/><circle cx="15" cy="15" r="8" fill="%23ff8e8e"/><circle cx="15" cy="15" r="4" fill="%23ffb3b3"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    animation: flowerFloat 3s ease-in-out infinite;
    z-index: 1;
}

.gift-container::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -80px;
    width: 25px;
    height: 25px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 25 25"><circle cx="12.5" cy="12.5" r="10" fill="%234ecdc4" stroke="%23000" stroke-width="2"/><circle cx="12.5" cy="12.5" r="6" fill="%236dd5cd"/><circle cx="12.5" cy="12.5" r="3" fill="%238ce5de"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    animation: flowerFloat 3s ease-in-out infinite 1.5s;
    z-index: 1;
}

@keyframes flowerFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

@keyframes bouquetFloat {
    0%, 100% {
        transform: translate(-50%, -50%) translateY(0px) rotate(0deg);
    }
    50% {
        transform: translate(-50%, -50%) translateY(-20px) rotate(5deg);
    }
}

/* Additional decorative flowers */
.gift-decoration {
    position: absolute;
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    animation: flowerFloat 4s ease-in-out infinite;
    z-index: 1;
}

.gift-decoration:nth-child(1) {
    top: 20px;
    left: 50px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="8" fill="%23feca57" stroke="%23000" stroke-width="1"/><circle cx="10" cy="10" r="5" fill="%23ffd93d"/><circle cx="10" cy="10" r="2" fill="%23fff"/></svg>');
    animation-delay: 0s;
}

.gift-decoration:nth-child(2) {
    top: 80px;
    right: 60px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="8" fill="%23ff9ff3" stroke="%23000" stroke-width="1"/><circle cx="10" cy="10" r="5" fill="%23ffb3f3"/><circle cx="10" cy="10" r="2" fill="%23ffc7f3"/></svg>');
    animation-delay: 1s;
}

.gift-decoration:nth-child(3) {
    bottom: 40px;
    left: 30px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="8" fill="%23a55eea" stroke="%23000" stroke-width="1"/><circle cx="10" cy="10" r="5" fill="%23b877ed"/><circle cx="10" cy="10" r="2" fill="%23c990f0"/></svg>');
    animation-delay: 2s;
}

.gift-decoration:nth-child(4) {
    bottom: 20px;
    right: 40px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="8" fill="%2396ceb4" stroke="%23000" stroke-width="1"/><circle cx="10" cy="10" r="5" fill="%23a8d5c4"/><circle cx="10" cy="10" r="2" fill="%23badcd4"/></svg>');
    animation-delay: 0.5s;
}

.gift-box {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: giftFloat 3s ease-in-out infinite;
}

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

.gift-box:hover {
    transform: scale(1.05);
    animation-play-state: paused;
}

.gift-box:active {
    transform: scale(0.95);
}

.gift-lid {
    width: 200px;
    height: 40px;
    background: #ff6b6b;
    border: 4px solid #000;
    border-radius: 0;
    position: relative;
    box-shadow: 
        inset 4px 4px 0px #ff8e8e,
        inset -4px -4px 0px #e55555,
        4px 4px 0px #000;
}

.gift-body {
    width: 200px;
    height: 150px;
    background: #4ecdc4;
    border: 4px solid #000;
    border-radius: 0;
    position: relative;
    box-shadow: 
        inset 4px 4px 0px #6dd5cd,
        inset -4px -4px 0px #3bb5ad,
        4px 4px 0px #000;
}

.gift-bow {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
}

.bow-center {
    width: 20px;
    height: 20px;
    background: #ff4757;
    border: 2px solid #000;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 
        inset 2px 2px 0px #ff6b7a,
        inset -2px -2px 0px #e63946;
}

.bow-left, .bow-right {
    width: 15px;
    height: 30px;
    background: #ff4757;
    border: 2px solid #000;
    position: absolute;
    top: 5px;
    box-shadow: 
        inset 2px 2px 0px #ff6b7a,
        inset -2px -2px 0px #e63946;
}

.bow-left {
    left: 5px;
    transform: rotate(-20deg);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

.bow-right {
    right: 5px;
    transform: rotate(20deg);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

.gift-pattern {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.pattern-line {
    width: 80%;
    height: 8px;
    background: #2c2c54;
    border: 2px solid #000;
    box-shadow: 
        inset 2px 2px 0px #3d3d6b,
        inset -2px -2px 0px #1a1a2e;
}

.gift-instruction {
    text-align: center;
    margin-top: 1rem;
}

.gift-instruction p {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.5rem;
    color: #96ceb4;
    text-shadow: 1px 1px 0px #000;
    background: #2c2c54;
    border: 3px solid #000;
    padding: 1rem;
    box-shadow: 
        inset 3px 3px 0px #4ecdc4,
        inset -3px -3px 0px #1a1a2e,
        6px 6px 0px #000;
}

/* Flowers Styles */
.flowers-container {
    position: relative;
    width: 100%;
    height: 300px;
    margin: 2rem 0;
    overflow: hidden;
}

.flower {
    position: absolute;
    font-size: 2rem;
    animation: flowerGrow 2s ease-out forwards;
    z-index: 5;
}

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


.flower-bouquet {
    background-image: url('asset/asset/FlowerBouquet.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 500px;
    height: 500px;
    text-indent: -9999px;
    overflow: hidden;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    animation: bouquetFloat 3s ease-in-out infinite;
    pointer-events: none;
}

/* Gift Box Click Effects */
.gift-box.clicked {
    animation: giftShake 0.5s ease-in-out;
}

@keyframes giftShake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

.gift-box.revealed {
    animation: giftReveal 1s ease-out forwards;
}

@keyframes giftReveal {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        filter: brightness(1.2);
    }
}

/* Photo Gallery Styles */
.gallery-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 1.5rem;
    color: #ff6b6b;
    text-shadow: 3px 3px 0px #000;
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: 3px;
}

.gallery-subtitle {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    color: #4ecdc4;
    text-shadow: 1px 1px 0px #000;
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

/* Photo Carousel Styles */
.photo-carousel {
    margin: 2rem 0;
    position: relative;
}

.carousel-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    position: relative;
}

.photo-display {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 400px;
    overflow: hidden;
}

.photo-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.5s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.photo-item.active {
    opacity: 1;
    transform: translateX(0);
}

.photo-item.prev {
    transform: translateX(-100%);
}

.carousel-btn {
    background: #ff6b6b;
    border: 3px solid #000;
    color: #fff;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Press Start 2P', monospace;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 4px 4px 0px #000;
    z-index: 10;
}

.carousel-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px #000;
    background: #ff5252;
}

.carousel-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #000;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.indicator {
    width: 12px;
    height: 12px;
    background: #2c2c54;
    border: 2px solid #000;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 2px 2px 0px #000;
}

.indicator:hover {
    background: #4ecdc4;
    transform: scale(1.1);
}

.indicator.active {
    background: #ff6b6b;
    transform: scale(1.2);
}

.photo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.photo-frame {
    background: #2c2c54;
    border: 4px solid #000;
    border-radius: 0;
    padding: 2rem;
    text-align: center;
    box-shadow: 
        inset 4px 4px 0px #4ecdc4,
        inset -4px -4px 0px #1a1a2e,
        8px 8px 0px #000;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.photo-frame:hover {
    transform: translateY(-5px);
    box-shadow: 
        inset 4px 4px 0px #4ecdc4,
        inset -4px -4px 0px #1a1a2e,
        12px 12px 0px #000;
}

.photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.photo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 2px solid #000;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.photo-icon {
    font-size: 3rem;
    animation: photoPulse 2s ease-in-out infinite;
}

@keyframes photoPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.photo-text {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    color: #96ceb4;
    text-shadow: 1px 1px 0px #000;
}

.photo-description {
    background: #f8f8f8;
    border: 3px solid #000;
    border-radius: 0;
    padding: 1.5rem;
    max-width: 300px;
    box-shadow: 
        inset 3px 3px 0px #4ecdc4,
        inset -3px -3px 0px #1a1a2e,
        6px 6px 0px #000;
}

.photo-description h3 {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    color: #ff6b6b;
    text-shadow: 1px 1px 0px #000;
    margin-bottom: 1rem;
    text-align: center;
}

.photo-description p {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.4rem;
    color: #333;
    line-height: 1.6;
    text-align: justify;
}

/* Responsive Letter */
@media (max-width: 768px) {
    .letter-paper {
        padding: 2rem;
        margin: 1rem;
    }
    
    .letter-title {
        font-size: 0.8rem;
    }
    
    .letter-paragraph {
        font-size: 0.4rem;
    }
    
    .letter-greeting {
        font-size: 0.6rem;
    }
    
    .button-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .photo-display {
        max-width: 500px;
        height: 350px;
    }
    
    .carousel-container {
        gap: 1rem;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .gallery-title {
        font-size: 1.2rem;
    }
    
    .gift-title {
        font-size: 1.2rem;
    }
    
    .gift-box {
        transform: scale(0.8);
    }
    
    .gift-lid {
        width: 160px;
        height: 32px;
    }
    
    .gift-body {
        width: 160px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .letter-paper {
        padding: 1.5rem;
        margin: 0.5rem;
    }
    
    .letter-title {
        font-size: 0.6rem;
    }
    
    .letter-paragraph {
        font-size: 0.3rem;
    }
    
    .letter-greeting {
        font-size: 0.5rem;
    }
    
    .gallery-title {
        font-size: 1rem;
    }
    
    .gallery-subtitle {
        font-size: 0.5rem;
    }
    
    .photo-display {
        max-width: 300px;
        height: 250px;
    }
    
    .carousel-container {
        gap: 0.5rem;
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .photo-frame {
        padding: 1.5rem;
        min-height: 150px;
    }
    
    .photo-icon {
        font-size: 2rem;
    }
    
    .photo-text {
        font-size: 0.5rem;
    }
    
    .photo-description {
        padding: 1rem;
    }
    
    .photo-description h3 {
        font-size: 0.6rem;
    }
    
    .photo-description p {
        font-size: 0.3rem;
    }
    
    .gift-title {
        font-size: 1rem;
    }
    
    .gift-subtitle {
        font-size: 0.5rem;
    }
    
    .gift-box {
        transform: scale(0.6);
    }
    
    .gift-lid {
        width: 120px;
        height: 24px;
    }
    
    .gift-body {
        width: 120px;
        height: 90px;
    }
    
    .gift-instruction p {
        font-size: 0.4rem;
    }
    
    .flower {
        font-size: 1.5rem;
    }
}

/* Floating Hearts Background */
.floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-heart {
    position: absolute;
    width: 32px;
    height: 32px;
    background-image: url('asset/asset/heart.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.3;
    animation: floatHeart 15s linear infinite;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.floating-heart:nth-child(odd) {
    opacity: 0.2;
    animation-duration: 20s;
}

.floating-heart:nth-child(3n) {
    opacity: 0.4;
    animation-duration: 25s;
}

@keyframes floatHeart {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100px) translateX(50px) rotate(360deg);
        opacity: 0;
    }
}

.page {
    display: none;
    min-height: 100vh;
    position: relative;
    z-index: 10;
}

.page.active {
    display: block;
}

.page.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
    position: relative;
}

/* Pixel Hearts Animation */
.pixel-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.pixel-heart {
    position: absolute;
    width: 48px;
    height: 48px;
    background-image: url('asset/asset/heart.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: pixelFloat 4s ease-in-out infinite;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.pixel-heart:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.pixel-heart:nth-child(2) {
    top: 60%;
    left: 80%;
    animation-delay: 1s;
}

.pixel-heart:nth-child(3) {
    top: 80%;
    left: 20%;
    animation-delay: 2s;
}

.pixel-heart:nth-child(4) {
    top: 30%;
    left: 70%;
    animation-delay: 0.5s;
}

.pixel-heart:nth-child(5) {
    top: 70%;
    left: 50%;
    animation-delay: 1.5s;
}

@keyframes pixelFloat {
    0%, 100% {
        transform: translateY(0px) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-20px) scale(1.2);
        opacity: 1;
    }
}

/* Pixel Title */
.pixel-title {
    position: relative;
    margin-bottom: 2rem;
}

.title {
    font-size: 2.5rem;
    color: #ff6b6b;
    text-shadow: 4px 4px 0px #000, 8px 8px 0px rgba(0,0,0,0.3);
    margin-bottom: 1rem;
    animation: pixelGlow 2s ease-in-out infinite alternate;
}

@keyframes pixelGlow {
    from {
        text-shadow: 4px 4px 0px #000, 8px 8px 0px rgba(0,0,0,0.3), 0 0 20px #ff6b6b;
    }
    to {
        text-shadow: 4px 4px 0px #000, 8px 8px 0px rgba(0,0,0,0.3), 0 0 30px #ff6b6b, 0 0 40px #ff6b6b;
    }
}

.pixel-border {
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57, #ff6b6b);
    background-size: 200% 100%;
    animation: pixelBorderMove 3s linear infinite;
    border: 2px solid #000;
    box-shadow: 0 4px 0px #000;
}

@keyframes pixelBorderMove {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.subtitle {
    font-size: 0.8rem;
    color: #4ecdc4;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 0px #000;
    line-height: 1.5;
}

/* Pixel Container */
.pixel-container {
    margin: 2rem 0;
}

.pixel-frame {
    background: #2c2c54;
    border: 4px solid #000;
    border-radius: 0;
    padding: 2rem;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 
        inset 4px 4px 0px #4ecdc4,
        inset -4px -4px 0px #1a1a2e,
        8px 8px 0px #000;
    position: relative;
}

.pixel-frame::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    z-index: -1;
    border-radius: 0;
}

/* Pixel Input */
.pixel-input {
    width: 100%;
    padding: 1rem;
    border: 3px solid #000;
    background: #1a1a2e;
    color: #fff;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    margin-bottom: 1.5rem;
    text-align: center;
    box-shadow: inset 2px 2px 0px #4ecdc4;
}

.pixel-input:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: inset 2px 2px 0px #ff6b6b, 0 0 20px rgba(255, 107, 107, 0.5);
}

/* Pixel Button */
.pixel-btn {
    background: #ff6b6b;
    border: 3px solid #000;
    color: #fff;
    padding: 1rem 2rem;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    cursor: pointer;
    position: relative;
    transition: all 0.1s ease;
    box-shadow: 4px 4px 0px #000;
    text-transform: uppercase;
}

.pixel-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px #000;
    background: #ff5252;
}

.pixel-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #000;
}

.pixel-btn-border {
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 2px solid #4ecdc4;
    z-index: -1;
}

/* Pixel Error */
.pixel-error {
    color: #ff6b6b;
    font-size: 0.6rem;
    margin-top: 1rem;
    padding: 0.5rem;
    background: #1a1a2e;
    border: 2px solid #ff6b6b;
    box-shadow: 4px 4px 0px #000;
    display: none;
    text-shadow: 1px 1px 0px #000;
}

/* Page 2 Styles */
.memory-title {
    font-size: 2rem;
    color: #4ecdc4;
    text-shadow: 3px 3px 0px #000, 6px 6px 0px rgba(0,0,0,0.3);
    margin-bottom: 1rem;
}

.memory-subtitle {
    font-size: 0.7rem;
    color: #96ceb4;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 0px #000;
}

/* Pixel Grid */
.pixel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.pixel-memory {
    position: relative;
}

.pixel-frame-small {
    background: #2c2c54;
    border: 3px solid #000;
    padding: 1.5rem;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 
        inset 3px 3px 0px #4ecdc4,
        inset -3px -3px 0px #1a1a2e,
        6px 6px 0px #000;
    transition: all 0.1s ease;
    cursor: pointer;
}

.pixel-frame-small:hover {
    transform: translate(-2px, -2px);
    box-shadow: 
        inset 3px 3px 0px #ff6b6b,
        inset -3px -3px 0px #1a1a2e,
        8px 8px 0px #000;
}

.pixel-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 0px #000;
}

.pixel-text {
    font-size: 0.6rem;
    color: #fff;
    text-shadow: 1px 1px 0px #000;
    text-align: center;
    line-height: 1.4;
}

/* Pixel Message */
.pixel-message {
    margin: 3rem 0;
}

.pixel-frame-large {
    background: #2c2c54;
    border: 4px solid #000;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 
        inset 4px 4px 0px #4ecdc4,
        inset -4px -4px 0px #1a1a2e,
        8px 8px 0px #000;
    position: relative;
}

.pixel-message-title {
    font-size: 1.2rem;
    color: #ff6b6b;
    text-shadow: 2px 2px 0px #000;
    margin-bottom: 1rem;
}

.pixel-border-small {
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    background-size: 200% 100%;
    animation: pixelBorderMove 3s linear infinite;
    border: 1px solid #000;
    margin-bottom: 1.5rem;
}

.pixel-message-text {
    font-size: 0.6rem;
    color: #fff;
    line-height: 1.8;
    text-shadow: 1px 1px 0px #000;
    margin-bottom: 1.5rem;
}

.pixel-signature {
    font-size: 0.7rem;
    color: #4ecdc4;
    text-shadow: 1px 1px 0px #000;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .title {
        font-size: 1.8rem;
    }
    
    .memory-title {
        font-size: 1.5rem;
    }
    
    .container {
        padding: 1rem;
    }
    
    .pixel-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .pixel-frame {
        padding: 1.5rem;
    }
    
    .pixel-frame-large {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.4rem;
    }
    
    .memory-title {
        font-size: 1.2rem;
    }
    
    .subtitle {
        font-size: 0.6rem;
    }
    
    .memory-subtitle {
        font-size: 0.6rem;
    }
    
    .pixel-input {
        font-size: 0.6rem;
    }
    
    .pixel-btn {
        font-size: 0.6rem;
        padding: 0.8rem 1.5rem;
    }
}

/* Pixel Art Effects */
.pixel-memory:nth-child(odd) {
    animation: pixelSlideIn 0.6s ease-out;
}

.pixel-memory:nth-child(even) {
    animation: pixelSlideIn 0.6s ease-out 0.2s both;
}

@keyframes pixelSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Pixel Cursor */
body {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><rect width="16" height="16" fill="%23ff6b6b"/><rect x="2" y="2" width="12" height="12" fill="%23000"/><rect x="4" y="4" width="8" height="8" fill="%23ff6b6b"/></svg>'), auto;
}

.pixel-btn:hover {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><rect width="16" height="16" fill="%234ecdc4"/><rect x="2" y="2" width="12" height="12" fill="%23000"/><rect x="4" y="4" width="8" height="8" fill="%234ecdc4"/></svg>'), auto;
}