* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    font-family: "Pixelify Sans", sans-serif;
    overflow-x: hidden;
    position: relative;
}

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

.heart {
    position: absolute;
    font-size: 20px;
    animation: floatUp 6s ease-in infinite;
    opacity: 0.6;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.6;
    }

    90% {
        opacity: 0.6;
    }

    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Music Button */
.music-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255, 182, 193, 0.5);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
}

.music-btn:hover {
    background: rgba(255, 182, 193, 0.3);
    transform: scale(1.1);
}

/* Envelope Screen */
#envelope-container {
    text-align: center;
    cursor: pointer;
    z-index: 1;
    animation: fadeIn 1s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.intro-text {
    font-family: "Caveat", cursive;
    font-size: 28px;
    color: #ffb6c1;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(255, 182, 193, 0.5);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(255, 105, 180, 0.5));
    }

    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 25px rgba(255, 105, 180, 0.8));
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(255, 105, 180, 0.5));
    }
}

#envelope {
    width: 180px;
    animation: pulse 1.5s infinite;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#envelope:hover {
    transform: scale(1.15);
}

#envelope-container p {
    font-size: 24px;
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 182, 193, 0.7);
    margin-top: 15px;
}

/* Letter Container */
#letter-container {
    display: none;
    position: fixed;
    inset: 0;
    justify-content: center;
    align-items: center;
    z-index: 10;
    padding: 20px;
}

.letter-window {
    width: 95vw;
    max-width: 700px;
    min-height: 400px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(145deg, rgba(255, 240, 245, 0.95), rgba(255, 228, 235, 0.95));
    border-radius: 20px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(255, 105, 180, 0.3),
        inset 0 0 30px rgba(255, 182, 193, 0.2);
    gap: 15px;
    transform: scale(1.2);
    opacity: 0;
    transition: transform 0.6s ease, opacity 0.6s ease;
}

.letter-window.open {
    transform: scale(1);
    opacity: 1;
}

h1 {
    font-size: clamp(20px, 4.5vw, 28px);
    margin: 0;
    color: #d63384;
    text-shadow: 0 2px 10px rgba(214, 51, 132, 0.3);
    padding: 0 10px;
}

/* Cat */
.cat {
    width: min(200px, 45vw);
    margin: 10px 0;
    transition: all 0.4s ease;
    border-radius: 10px;
}

/* Evet/Hayır Buttons */
.buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    position: relative;
}

.no-wrapper {
    position: relative;
    width: 130px;
    height: 55px;
}

.btn {
    padding: 15px 35px;
    font-size: clamp(16px, 4vw, 20px);
    font-family: inherit;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.yes-btn {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: #fff;
    box-shadow: 0 5px 20px rgba(34, 197, 94, 0.4);
}

.yes-btn:hover {
    box-shadow: 0 8px 30px rgba(34, 197, 94, 0.6);
}

.no-btn {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    color: #fff;
    box-shadow: 0 5px 20px rgba(239, 68, 68, 0.4);
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.2s ease;
}

/* ============ QUIZ STYLES ============ */
#quiz-container {
    display: none;
    position: fixed;
    inset: 0;
    justify-content: center;
    align-items: center;
    z-index: 20;
    padding: 15px;
    overflow-y: auto;
}

.quiz-window {
    width: 95vw;
    max-width: 600px;
    padding: 25px 20px;
    background: linear-gradient(145deg, rgba(255, 240, 245, 0.98), rgba(255, 228, 235, 0.98));
    border-radius: 20px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(255, 105, 180, 0.3);
    text-align: center;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#quiz-title {
    font-size: clamp(22px, 5vw, 30px);
    color: #d63384;
    margin: 0 0 10px 0;
}

#quiz-subtitle {
    font-size: clamp(14px, 3.5vw, 18px);
    color: #666;
    margin: 0 0 20px 0;
    font-family: "Caveat", cursive;
}

#quiz-question {
    font-size: clamp(16px, 4vw, 22px);
    color: #333;
    margin: 15px 0;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.quiz-option {
    padding: 14px 20px;
    background: linear-gradient(135deg, #fff 0%, #ffeef2 100%);
    border: 2px solid #ffb6c1;
    border-radius: 12px;
    font-size: clamp(14px, 3.5vw, 18px);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    color: #333;
}

.quiz-option:hover {
    background: linear-gradient(135deg, #ffb6c1 0%, #ff69b4 100%);
    color: #fff;
    transform: translateX(5px);
    border-color: #ff69b4;
}

.quiz-option.correct {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: #fff;
    border-color: #22c55e;
}

.quiz-option.wrong {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    color: #fff;
    border-color: #ef4444;
    animation: shake 0.5s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

/* Correct Screen */
.correct-screen {
    animation: fadeInUp 0.6s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.couple-photo {
    width: min(180px, 45vw);
    height: min(180px, 45vw);
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #ff69b4;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.2),
        0 0 30px rgba(255, 105, 180, 0.4);
    margin: 15px 0;
}

.correct-text {
    font-size: clamp(16px, 4vw, 22px);
    color: #22c55e;
    font-family: "Caveat", cursive;
    margin: 10px 0 5px 0;
}

.correct-subtext {
    font-size: clamp(14px, 3.5vw, 18px);
    color: #666;
    font-family: "Caveat", cursive;
    margin: 0 0 15px 0;
    font-style: italic;
}

.next-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #ff69b4 0%, #d63384 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 18px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.next-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(255, 105, 180, 0.5);
}

/* Wrong Screen */
.wrong-screen {
    color: #ef4444;
    font-size: 18px;
    animation: fadeIn 0.3s ease;
}

/* ============ LETTER ENVELOPE ANIMATION ============ */
#final-container {
    display: none;
    position: fixed;
    inset: 0;
    justify-content: center;
    align-items: center;
    z-index: 30;
    padding: 20px;
    overflow-y: auto;
}

.letter-envelope {
    width: min(300px, 80vw);
    height: min(200px, 50vw);
    background: linear-gradient(145deg, #fff5f5, #ffe4e8);
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    animation: floatEnvelope 2s ease-in-out infinite;
}

@keyframes floatEnvelope {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.letter-envelope:hover {
    transform: scale(1.05);
}

.letter-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(135deg, #ffb6c1, #ff69b4);
    clip-path: polygon(0 0, 50% 100%, 100% 0);
    transform-origin: top;
    transition: transform 0.8s ease;
    z-index: 2;
}

.letter-envelope.opened .letter-flap {
    transform: rotateX(180deg);
}

.letter-content {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.tap-text {
    font-family: "Caveat", cursive;
    font-size: clamp(18px, 4vw, 24px);
    color: #d63384;
    animation: pulse 1.5s infinite;
}

/* ============ FINAL SCREEN ============ */
.final-window {
    width: 95vw;
    max-width: 600px;
    padding: 30px 20px;
    margin: 20px 0;
    background: linear-gradient(145deg, rgba(255, 240, 245, 0.98), rgba(255, 228, 235, 0.98));
    border-radius: 20px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(255, 105, 180, 0.3);
    text-align: center;
    animation: slideIn 0.6s ease;
}

.cat-final {
    width: min(120px, 30vw);
    margin-bottom: 10px;
}

.final-window h1 {
    font-size: clamp(28px, 6vw, 40px);
    margin: 0 0 15px 0;
}

/* Handwriting Animation */
.handwriting-container {
    margin: 20px 0;
    min-height: 40px;
}

.handwriting {
    font-family: "Dancing Script", cursive;
    font-size: clamp(24px, 5vw, 32px);
    color: #d63384;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid #d63384;
    animation: typing 3s steps(30) forwards, blink 0.7s step-end infinite;
    width: 0;
    display: inline-block;
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* Şahsi Sapık Badge */
.badge-container {
    margin: 15px 0;
}

.badge {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #333;
    border-radius: 20px;
    font-size: clamp(12px, 3vw, 16px);
    font-weight: bold;
    box-shadow: 0 3px 15px rgba(255, 215, 0, 0.5);
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 3px 15px rgba(255, 215, 0, 0.5);
    }

    50% {
        box-shadow: 0 3px 25px rgba(255, 215, 0, 0.8);
    }
}

/* Song Lyrics */
.lyrics-container {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    border-left: 4px solid #d63384;
}

.lyrics-title {
    font-size: clamp(14px, 3.5vw, 18px);
    color: #888;
    margin: 0 0 10px 0;
}

.lyrics {
    font-family: "Caveat", cursive;
    font-size: clamp(16px, 4vw, 22px);
    color: #555;
    line-height: 1.8;
    margin: 0;
}

.lyrics .highlight {
    color: #d63384;
    font-weight: bold;
    font-size: clamp(18px, 4.5vw, 24px);
}

/* Photo Gallery */
.photo-gallery {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.gallery-photo {
    width: min(100px, 28vw);
    height: min(100px, 28vw);
    object-fit: cover;
    border-radius: 15px;
    border: 3px solid #ff69b4;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.gallery-photo:hover {
    transform: scale(1.1);
    z-index: 10;
}

/* Countdown Timer */
.countdown-container {
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 105, 180, 0.1), rgba(214, 51, 132, 0.1));
    border-radius: 20px;
}

.countdown-title {
    font-size: clamp(16px, 4vw, 20px);
    color: #d63384;
    margin: 0 0 15px 0;
}

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

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.countdown-number {
    font-size: clamp(28px, 6vw, 40px);
    font-weight: bold;
    color: #d63384;
    background: linear-gradient(135deg, #fff, #ffeef2);
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.countdown-label {
    font-size: clamp(12px, 3vw, 14px);
    color: #888;
    margin-top: 5px;
}

.countdown-date {
    font-family: "Caveat", cursive;
    font-size: clamp(18px, 4.5vw, 24px);
    color: #666;
    margin: 15px 0 0 0;
}

.final-text {
    font-size: clamp(16px, 4vw, 20px);
    line-height: 1.6;
    padding: 15px 25px;
    background: linear-gradient(135deg, rgba(255, 182, 193, 0.4), rgba(255, 105, 180, 0.2));
    border-radius: 15px;
    color: #333;
    display: inline-block;
    margin: 15px 0;
}

.romantic-note {
    font-size: clamp(14px, 3.5vw, 18px);
    color: #888;
    font-family: "Caveat", cursive;
    line-height: 1.8;
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    font-style: italic;
}

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

/* Mobile Optimizations */
@media (max-width: 480px) {

    .letter-window,
    .quiz-window,
    .final-window {
        padding: 20px 15px;
    }

    .intro-text {
        font-size: 24px;
    }

    #envelope-container p {
        font-size: 20px;
    }

    .music-btn {
        width: 45px;
        height: 45px;
        font-size: 20px;
        top: 15px;
        right: 15px;
    }

    .quiz-option {
        padding: 12px 15px;
    }

    .gallery-photo {
        width: 80px;
        height: 80px;
    }

    .countdown-item {
        min-width: 50px;
    }

    .countdown-number {
        padding: 8px 12px;
    }
}

/* Prevent scroll on mobile */
html,
body {
    overscroll-behavior: none;
}

/* ============ MINI GAME STYLES ============ */
.mini-game-section {
    margin-top: 25px;
}

.play-game-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #ff69b4 0%, #d63384 100%);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: clamp(16px, 4vw, 20px);
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
    box-shadow: 0 5px 25px rgba(255, 105, 180, 0.5);
}

.play-game-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 35px rgba(255, 105, 180, 0.7);
}

/* Game Overlay */
.game-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    z-index: 200;
    flex-direction: column;
}

.game-overlay.active {
    display: flex;
}

.game-header {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.love-counter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.love-label {
    color: #ffb6c1;
    font-size: clamp(14px, 3.5vw, 18px);
}

.love-number {
    font-size: clamp(28px, 6vw, 40px);
    font-weight: bold;
    color: #ff69b4;
    text-shadow: 0 0 20px rgba(255, 105, 180, 0.8);
    min-width: 80px;
    text-align: center;
}

.love-emoji {
    font-size: clamp(24px, 5vw, 32px);
    animation: heartbeat 1s infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.game-message {
    color: #fff;
    font-family: "Caveat", cursive;
    font-size: clamp(16px, 4vw, 22px);
    margin: 0;
    text-align: center;
    flex: 1;
    animation: fadeIn 0.5s ease;
}

.close-game-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-game-btn:hover {
    background: rgba(255, 105, 180, 0.5);
    border-color: #ff69b4;
}

#game-canvas {
    flex: 1;
    width: 100%;
    touch-action: none;
}

.game-instructions {
    padding: 10px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: clamp(12px, 3vw, 16px);
}