/* ========================================
   ROMANTIC GAME - CSS STYLES
   ======================================== */

/* CSS Variables - Renk Paleti */
:root {
    --bg-primary: #FDF2F8;
    --bg-secondary: #FCE7F3;
    --accent-pink: #EC4899;
    --accent-rose: #F43F5E;
    --accent-purple: #A855F7;
    --accent-gold: #F59E0B;
    --text-dark: #831843;
    --text-medium: #9D174D;
    --text-light: #BE185D;
    --white: #FFFFFF;
    --shadow-soft: rgba(236, 72, 153, 0.2);
    --shadow-medium: rgba(236, 72, 153, 0.3);
    --gradient-romantic: linear-gradient(135deg, #FCE7F3 0%, #F5D0FE 50%, #E9D5FF 100%);
    --gradient-button: linear-gradient(135deg, #EC4899 0%, #F43F5E 100%);
    --gradient-gold: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--gradient-romantic);
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text-dark);
}

/* Particles Background */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.3;
    animation: floatParticle 15s infinite ease-in-out;
}

@keyframes floatParticle {
    0%, 100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Screen Base */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.screen.active {
    display: flex;
    opacity: 1;
}

/* ========================================
   INTRO SCREEN
   ======================================== */
.intro-content {
    text-align: center;
    max-width: 500px;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.floating-hearts {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.floating-hearts .heart {
    font-size: 2.5rem;
    animation: floatHeart 3s ease-in-out infinite;
}

.floating-hearts .heart:nth-child(1) { animation-delay: 0s; }
.floating-hearts .heart:nth-child(2) { animation-delay: 0.5s; }
.floating-hearts .heart:nth-child(3) { animation-delay: 1s; }
.floating-hearts .heart:nth-child(4) { animation-delay: 1.5s; }

@keyframes floatHeart {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-15px) scale(1.1);
    }
}

.main-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
    line-height: 1.3;
    text-shadow: 2px 2px 10px var(--shadow-soft);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-medium);
    margin-bottom: 40px;
    font-weight: 400;
}

/* Buttons */
.btn-start {
    background: var(--gradient-button);
    color: var(--white);
    border: none;
    padding: 18px 50px;
    font-size: 1.3rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px var(--shadow-medium);
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.btn-start:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 50px var(--shadow-medium);
}

.btn-start:active {
    transform: translateY(0) scale(0.98);
}

.btn-sparkle {
    position: absolute;
    right: 20px;
    animation: sparkle 1.5s infinite;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2) rotate(180deg);
    }
}

/* ========================================
   GAME SCREENS
   ======================================== */
.game-header {
    text-align: center;
    margin-bottom: 30px;
}

.game-header h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.game-instruction {
    font-size: 1.1rem;
    color: var(--text-medium);
    margin-bottom: 15px;
}

.score-display,
.question-progress,
.pairs-display,
.floating-score {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-pink);
}

/* Game 1: Heart Catching */
.game-area {
    width: 100%;
    max-width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px var(--shadow-soft);
    border: 2px solid rgba(236, 72, 153, 0.2);
}

.catch-heart {
    position: absolute;
    font-size: 2.5rem;
    cursor: pointer;
    transition: transform 0.1s ease;
    animation: popIn 0.3s ease;
    user-select: none;
}

.catch-heart:hover {
    transform: scale(1.2);
}

.catch-heart.caught {
    animation: heartCaught 0.5s ease forwards;
}

@keyframes popIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes heartCaught {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.5);
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* ========================================
   COMPLETION SCREENS
   ======================================== */
.complete-content {
    text-align: center;
    animation: fadeInUp 0.8s ease;
}

.success-heart {
    font-size: 5rem;
    animation: pulse 1s infinite;
    margin-bottom: 20px;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

.complete-content h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.love-message {
    font-size: 1.2rem;
    color: var(--text-medium);
    max-width: 350px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.btn-next {
    background: var(--gradient-button);
    color: var(--white);
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 30px var(--shadow-medium);
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px var(--shadow-medium);
}

/* ========================================
   GAME 2: QUIZ
   ======================================== */
.quiz-container {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    padding: 30px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 10px 40px var(--shadow-soft);
}

.question {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 25px;
    line-height: 1.5;
    font-weight: 500;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn {
    background: var(--white);
    border: 2px solid var(--bg-secondary);
    padding: 15px 20px;
    border-radius: 15px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-family: 'Outfit', sans-serif;
    color: var(--text-dark);
}

.option-btn:hover {
    border-color: var(--accent-pink);
    background: var(--bg-secondary);
    transform: translateX(5px);
}

.option-btn.correct {
    background: linear-gradient(135deg, #10B981 0%, #34D399 100%);
    color: white;
    border-color: #10B981;
    animation: correctPulse 0.5s ease;
}

.option-btn.wrong {
    background: linear-gradient(135deg, #EF4444 0%, #F87171 100%);
    color: white;
    border-color: #EF4444;
    animation: shake 0.5s ease;
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ========================================
   GAME 3: MEMORY GAME
   ======================================== */
.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 350px;
    width: 100%;
}

.memory-card {
    aspect-ratio: 1;
    background: var(--gradient-button);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px var(--shadow-soft);
    position: relative;
    transform-style: preserve-3d;
}

.memory-card .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    backface-visibility: hidden;
}

.memory-card .card-front {
    position: absolute;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    transform: rotateY(180deg);
}

.memory-card:hover {
    transform: scale(1.05);
}

.memory-card.flipped {
    transform: rotateY(180deg);
}

.memory-card.matched {
    animation: matchPulse 0.5s ease;
    opacity: 0.7;
    pointer-events: none;
}

@keyframes matchPulse {
    0%, 100% { transform: rotateY(180deg) scale(1); }
    50% { transform: rotateY(180deg) scale(1.1); }
}

/* ========================================
   GAME 4: FLOATING HEARTS
   ======================================== */
.floating-game-area {
    width: 100%;
    max-width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px var(--shadow-soft);
    border: 2px solid rgba(245, 158, 11, 0.3);
}

.floating-heart {
    position: absolute;
    font-size: 2rem;
    cursor: pointer;
    animation: floatAround 4s ease-in-out infinite;
    transition: transform 0.2s ease;
    user-select: none;
}

.floating-heart:hover {
    transform: scale(1.3);
}

.floating-heart.caught {
    animation: heartCaught 0.5s ease forwards;
}

@keyframes floatAround {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(20px, -20px);
    }
    50% {
        transform: translate(-10px, -30px);
    }
    75% {
        transform: translate(-20px, -10px);
    }
}

/* ========================================
   FINALE SCREEN
   ======================================== */
.finale-content {
    text-align: center;
    z-index: 10;
    animation: fadeInUp 1s ease;
}

.big-heart {
    margin-bottom: 30px;
}

.big-heart span {
    font-size: 8rem;
    display: inline-block;
    animation: bigHeartBeat 1.5s infinite;
    filter: drop-shadow(0 10px 30px var(--shadow-medium));
}

@keyframes bigHeartBeat {
    0%, 100% {
        transform: scale(1);
    }
    15% {
        transform: scale(1.15);
    }
    30% {
        transform: scale(1);
    }
    45% {
        transform: scale(1.1);
    }
}

.finale-title {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 10px;
    font-weight: 600;
}

.finale-subtitle {
    font-size: 2.5rem;
    color: var(--accent-pink);
    margin-bottom: 20px;
    font-weight: 700;
}

.finale-message {
    font-size: 1.5rem;
    color: var(--text-medium);
    margin-bottom: 40px;
    font-weight: 500;
}

.btn-replay {
    background: var(--gradient-gold);
    color: var(--white);
    border: none;
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.3);
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.btn-replay:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(245, 158, 11, 0.4);
}

/* Confetti */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -20px;
    animation: confettiFall 4s linear forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Falling Messages */
.falling-messages {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4;
}

.falling-text {
    position: absolute;
    font-size: 1rem;
    color: var(--accent-pink);
    opacity: 0.7;
    animation: fallText 6s linear forwards;
    white-space: nowrap;
}

@keyframes fallText {
    0% {
        transform: translateY(-50px) rotate(-5deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(100vh) rotate(5deg);
        opacity: 0;
    }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 480px) {
    .main-title {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .btn-start {
        padding: 15px 40px;
        font-size: 1.1rem;
    }
    
    .game-header h2 {
        font-size: 1.5rem;
    }
    
    .game-area,
    .floating-game-area {
        height: 300px;
    }
    
    .memory-grid {
        max-width: 280px;
    }
    
    .memory-card {
        font-size: 1.5rem;
    }

    .big-heart span {
        font-size: 5rem;
    }
    
    .finale-title {
        font-size: 1.3rem;
    }
    
    .finale-subtitle {
        font-size: 1.8rem;
    }
    
    .finale-message {
        font-size: 1.2rem;
    }

    .quiz-container {
        padding: 20px;
    }

    .question {
        font-size: 1.1rem;
    }

    .complete-content h2 {
        font-size: 2rem;
    }

    .success-heart {
        font-size: 4rem;
    }
}

/* ========================================
   UTILITY ANIMATIONS
   ======================================== */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeInUp 0.5s ease;
}
