/* ============================================
   Karen's Love Game - Enhanced Style System
   Premium romantic pink-themed design
   ============================================ */

/* CSS Variables */
:root {
    --pink-50: #fdf2f8;
    --pink-100: #fce7f3;
    --pink-200: #fbcfe8;
    --pink-300: #f9a8d4;
    --pink-400: #f472b6;
    --pink-500: #ec4899;
    --pink-600: #db2777;
    --pink-700: #be185d;
    --pink-800: #9d174d;
    --pink-light: #ffd6e7;
    --pink-main: #ff6b9d;
    --pink-dark: #e91e63;
    --pink-deep: #c2185b;
    --rose-gold: #b76e79;
    --gold: #ffd700;
    --gold-light: #fff4cc;
    --purple: #9333ea;
    --purple-light: #e9d5ff;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.2);
    --glass-bg-strong: rgba(255, 255, 255, 0.35);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow-pink: rgba(233, 30, 99, 0.3);
    --shadow-strong: rgba(233, 30, 99, 0.5);
    --gradient-main: linear-gradient(135deg, #ffecd2 0%, #fcb69f 25%, #ff9a9e 50%, #fecfef 75%, #ffecd2 100%);
    --gradient-dark: linear-gradient(135deg, #ff6b9d 0%, #c2185b 100%);
    --gradient-gold: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    --gradient-rainbow: linear-gradient(90deg, #ff6b9d, #ff9a9e, #ffd700, #ff9a9e, #ff6b9d);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: none;
}

body {
    font-family: 'Quicksand', sans-serif;
    background: var(--gradient-main);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    background-attachment: fixed;
    color: var(--pink-deep);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.floating-hearts {
    position: absolute;
    width: 100%;
    height: 100%;
}

.floating-heart {
    position: absolute;
    font-size: 20px;
    animation: floatUp 10s ease-in-out infinite;
    opacity: 0.5;
    filter: blur(0.5px);
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg) scale(0.5);
        opacity: 0;
    }

    10% {
        opacity: 0.5;
    }

    90% {
        opacity: 0.5;
    }

    100% {
        transform: translateY(-100px) rotate(720deg) scale(1);
        opacity: 0;
    }
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
}

.star {
    position: absolute;
    font-size: 12px;
    animation: twinkle 2s ease-in-out infinite;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.3);
    }
}

.sparkles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    animation: sparkleFloat 4s ease-in-out infinite;
}

@keyframes sparkleFloat {

    0%,
    100% {
        opacity: 0;
        transform: translateY(0) scale(0);
    }

    50% {
        opacity: 1;
        transform: translateY(-20px) scale(1);
    }
}

/* Screen System */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.screen.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
}

/* ==================== WELCOME SCREEN ==================== */
.welcome-container {
    text-align: center;
    padding: 30px;
    max-width: 420px;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.heart-logo {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.heart-main {
    font-size: 80px;
    animation: heartbeat 1.5s ease-in-out infinite;
    filter: drop-shadow(0 10px 30px var(--shadow-pink));
    z-index: 2;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    15% {
        transform: scale(1.15);
    }

    30% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.1);
    }
}

.heart-orbit {
    position: absolute;
    font-size: 24px;
    animation: orbit 4s linear infinite;
}

.heart-orbit-1 {
    animation-delay: 0s;
}

.heart-orbit-2 {
    animation-delay: -1.33s;
}

.heart-orbit-3 {
    animation-delay: -2.66s;
}

@keyframes orbit {
    from {
        transform: rotate(0deg) translateX(50px) rotate(0deg);
    }

    to {
        transform: rotate(360deg) translateX(50px) rotate(-360deg);
    }
}

.welcome-title {
    margin: 20px 0;
    position: relative;
}

.title-line {
    display: block;
    font-size: 22px;
    font-weight: 500;
    color: var(--pink-dark);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.name-line {
    display: block;
    font-family: 'Pacifico', cursive;
    font-size: 72px;
    background: var(--gradient-dark);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(3px 3px 6px var(--shadow-pink));
    animation: shimmer 3s ease-in-out infinite;
    line-height: 1.2;
}

@keyframes shimmer {

    0%,
    100% {
        filter: drop-shadow(3px 3px 6px var(--shadow-pink)) brightness(1);
    }

    50% {
        filter: drop-shadow(3px 3px 12px var(--shadow-strong)) brightness(1.1);
    }
}

.heart-decoration {
    font-size: 24px;
    animation: float 2s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.welcome-subtitle {
    font-size: 16px;
    color: var(--rose-gold);
    margin-bottom: 15px;
    font-weight: 500;
}

.love-quote {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 18px 28px;
    font-size: 15px;
    color: var(--pink-deep);
    margin-bottom: 20px;
    font-style: italic;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.daily-love-note {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--pink-100) 100%);
    border: 2px solid var(--gold);
    border-radius: 20px;
    padding: 15px 25px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
    animation: noteGlow 3s ease-in-out infinite;
}

@keyframes noteGlow {

    0%,
    100% {
        box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
    }

    50% {
        box-shadow: 0 8px 30px rgba(255, 215, 0, 0.5);
    }
}

.note-icon {
    font-size: 28px;
    animation: wiggle 2s ease-in-out infinite;
}

@keyframes wiggle {

    0%,
    100% {
        transform: rotate(-5deg);
    }

    50% {
        transform: rotate(5deg);
    }
}

.daily-love-note p {
    font-size: 14px;
    color: var(--pink-deep);
    font-weight: 500;
    text-align: left;
}

.btn-start {
    background: var(--gradient-dark);
    color: var(--white);
    border: none;
    padding: 20px 55px;
    font-size: 20px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 40px var(--shadow-pink);
    transition: all 0.3s ease;
    animation: pulse 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.btn-start::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: btnShine 3s ease-in-out infinite;
}

@keyframes btnShine {

    0%,
    100% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(100%);
    }
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 10px 40px var(--shadow-pink);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 15px 50px var(--shadow-strong);
        transform: scale(1.02);
    }
}

.btn-start:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 50px var(--shadow-strong);
}

.btn-start:active {
    transform: translateY(0) scale(0.98);
}

.btn-icon {
    font-size: 26px;
}

.btn-sparkle {
    font-size: 20px;
    animation: sparkleRotate 2s linear infinite;
}

@keyframes sparkleRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.instructions {
    margin-top: 25px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 20px;
}

.instruction-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 13px;
    color: var(--pink-dark);
}

.instruction-icon {
    font-size: 18px;
    width: 25px;
    text-align: center;
}

.high-score-display {
    margin-top: 20px;
    font-size: 14px;
    color: var(--gold);
    font-weight: 600;
}

#menuHighScore {
    font-size: 18px;
}

/* ==================== GAME SCREEN ==================== */
#gameScreen {
    flex-direction: column;
}

.game-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px 15px;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4) 0%, transparent 100%);
}

.stat-box {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.stat-box:hover {
    transform: scale(1.05);
}

.level-box {
    flex-direction: column;
    gap: 4px;
    padding: 10px 25px;
}

.stat-icon {
    font-size: 22px;
}

.stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--pink-dark);
    font-weight: 600;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--pink-deep);
}

.level-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}

.level-progress-bar {
    height: 100%;
    background: var(--gradient-gold);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
}

/* Combo Display */
.combo-display {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--gradient-gold);
    padding: 12px 25px;
    border-radius: 30px;
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.5);
    z-index: 150;
    animation: comboPop 0.3s ease;
}

.combo-display.hidden {
    display: none;
}

@keyframes comboPop {
    0% {
        transform: translateX(-50%) scale(0);
    }

    50% {
        transform: translateX(-50%) scale(1.2);
    }

    100% {
        transform: translateX(-50%) scale(1);
    }
}

.combo-count {
    font-size: 32px;
    font-weight: 700;
    color: var(--pink-deep);
}

.combo-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--pink-deep);
    letter-spacing: 2px;
}

.combo-multiplier {
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    background: var(--pink-dark);
    padding: 5px 12px;
    border-radius: 15px;
}

/* Power-up Indicators */
.powerup-indicators {
    position: fixed;
    top: 100px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.powerup-indicator {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(15px);
    border: 2px solid var(--gold);
    border-radius: 15px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: powerupPulse 1s ease-in-out infinite;
}

.powerup-indicator.hidden {
    display: none;
}

@keyframes powerupPulse {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    }
}

.powerup-icon {
    font-size: 24px;
}

.powerup-timer {
    width: 40px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.powerup-timer::after {
    content: '';
    display: block;
    height: 100%;
    background: var(--gold);
    border-radius: 3px;
    width: 100%;
    animation: timerDrain 5s linear forwards;
}

@keyframes timerDrain {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

/* Score Popups */
.score-popups {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 90;
}

.score-popup {
    position: absolute;
    font-size: 24px;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: scoreFloat 1s ease-out forwards;
    pointer-events: none;
}

@keyframes scoreFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-60px) scale(1.5);
    }
}

.pause-btn {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 55px;
    height: 55px;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    z-index: 100;
}

.pause-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.pause-btn:active {
    transform: scale(0.95);
}

/* Message Popup - Toast style at top */
.message-popup {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    opacity: 0;
    z-index: 200;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
}

.message-popup.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.message-content {
    background: linear-gradient(135deg, var(--white) 0%, var(--pink-100) 100%);
    border-radius: 30px;
    padding: 6px 12px;
    box-shadow: 0 4px 12px var(--shadow-pink);
    max-width: 85vw;
    border: 1px solid var(--pink-300);
    display: flex;
    align-items: center;
    gap: 6px;
}

.message-heart {
    font-size: 14px;
    flex-shrink: 0;
}

.message-text {
    font-size: 10px;
    color: var(--pink-deep);
    line-height: 1.2;
    font-weight: 600;
    margin: 0;
}

.message-sparkles {
    font-size: 10px;
    flex-shrink: 0;
}

@keyframes sparkle {
    from {
        opacity: 0.5;
        transform: scale(0.9) rotate(-10deg);
    }

    to {
        opacity: 1;
        transform: scale(1.1) rotate(10deg);
    }
}

/* Achievement Popup */
.achievement-popup {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    opacity: 0;
    z-index: 250;
    pointer-events: none;
    transition: all 0.4s ease;
}

.achievement-popup.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.achievement-content {
    background: var(--gradient-gold);
    padding: 15px 30px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.5);
    animation: achievementShine 2s ease-in-out infinite;
}

@keyframes achievementShine {

    0%,
    100% {
        box-shadow: 0 10px 40px rgba(255, 215, 0, 0.5);
    }

    50% {
        box-shadow: 0 15px 50px rgba(255, 215, 0, 0.8);
    }
}

.achievement-icon {
    font-size: 28px;
}

.achievement-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--pink-deep);
}

/* ==================== GAME OVER SCREEN ==================== */
.gameover-container {
    text-align: center;
    padding: 25px;
    max-width: 420px;
    animation: fadeInUp 0.8s ease;
}

.gameover-hearts {
    font-size: 70px;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0) rotate(0);
    }

    25% {
        transform: translateX(-10px) rotate(-5deg);
    }

    75% {
        transform: translateX(10px) rotate(5deg);
    }
}

.gameover-title {
    font-size: 38px;
    color: var(--pink-deep);
    margin: 15px 0 25px;
    font-weight: 700;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 18px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: scale(1.05);
}

.stat-card-icon {
    font-size: 28px;
}

.stat-card-label {
    font-size: 11px;
    color: var(--pink-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--pink-deep);
}

.high-score-card {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--pink-100) 100%);
    border: 2px solid var(--gold);
    border-radius: 25px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
}

.high-label {
    display: block;
    font-size: 14px;
    color: var(--pink-deep);
    margin-bottom: 8px;
    font-weight: 600;
}

.high-value {
    font-size: 42px;
    font-weight: 700;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.new-record {
    display: inline-block;
    background: var(--pink-dark);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-top: 10px;
    animation: recordPulse 1s ease-in-out infinite;
}

.new-record.hidden {
    display: none;
}

@keyframes recordPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.final-message {
    font-size: 18px;
    color: var(--pink-deep);
    margin-bottom: 25px;
    font-style: italic;
    font-weight: 500;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-restart,
.btn-home {
    background: var(--gradient-dark);
    color: var(--white);
    border: none;
    padding: 16px 45px;
    font-size: 17px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 30px var(--shadow-pink);
    transition: all 0.3s ease;
}

.btn-home {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid var(--glass-border);
    color: var(--pink-deep);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.btn-restart:hover,
.btn-home:hover {
    transform: translateY(-3px) scale(1.02);
}

.btn-restart:active,
.btn-home:active {
    transform: translateY(0) scale(0.98);
}

/* ==================== LEVEL UP SCREEN ==================== */
.levelup-container {
    text-align: center;
    padding: 30px;
    animation: levelUpBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes levelUpBounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.levelup-stars {
    font-size: 55px;
    animation: starRotate 2s linear infinite;
}

@keyframes starRotate {
    0% {
        transform: rotate(-5deg) scale(1);
    }

    50% {
        transform: rotate(5deg) scale(1.1);
    }

    100% {
        transform: rotate(-5deg) scale(1);
    }
}

.levelup-title {
    font-size: 36px;
    color: var(--pink-deep);
    margin: 20px 0;
    font-weight: 700;
}

.new-level {
    background: var(--gradient-gold);
    border-radius: 25px;
    padding: 25px 50px;
    display: inline-block;
    margin: 20px 0;
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.5);
}

.level-label {
    display: block;
    font-size: 14px;
    color: var(--pink-deep);
    margin-bottom: 5px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.level-number {
    font-size: 70px;
    font-weight: 700;
    color: var(--pink-deep);
    line-height: 1;
}

.levelup-message {
    font-size: 20px;
    color: var(--pink-dark);
    margin-top: 20px;
    font-weight: 500;
}

.levelup-bonus {
    margin-top: 20px;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(15px);
    padding: 12px 25px;
    border-radius: 30px;
    display: inline-block;
    font-size: 16px;
    color: var(--pink-deep);
    font-weight: 600;
    border: 2px solid var(--pink-300);
    animation: bonusPulse 1.5s ease-in-out infinite;
}

@keyframes bonusPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(233, 30, 99, 0);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(233, 30, 99, 0.3);
    }
}

/* ==================== PAUSE SCREEN ==================== */
.pause-container {
    text-align: center;
    padding: 40px;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 35px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
}

.pause-icon {
    font-size: 60px;
    animation: pauseFloat 2s ease-in-out infinite;
}

@keyframes pauseFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.pause-title {
    font-size: 32px;
    color: var(--pink-deep);
    margin: 15px 0 10px;
    font-weight: 700;
}

.pause-subtitle {
    font-size: 16px;
    color: var(--pink-dark);
    margin-bottom: 25px;
}

.btn-resume {
    background: var(--gradient-dark);
    color: var(--white);
    border: none;
    padding: 16px 45px;
    font-size: 18px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 35px var(--shadow-pink);
    transition: all 0.3s ease;
}

.btn-resume:hover {
    transform: translateY(-3px) scale(1.05);
}

.btn-resume:active {
    transform: translateY(0) scale(0.98);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 480px) {
    .welcome-container {
        padding: 15px 12px;
        max-width: 100%;
    }

    .heart-logo {
        width: 80px;
        height: 80px;
        margin-bottom: 10px;
    }

    .heart-main {
        font-size: 50px;
    }

    .heart-orbit {
        font-size: 14px;
    }

    @keyframes orbit {
        from {
            transform: rotate(0deg) translateX(32px) rotate(0deg);
        }

        to {
            transform: rotate(360deg) translateX(32px) rotate(-360deg);
        }
    }

    .welcome-title {
        margin: 10px 0;
    }

    .name-line {
        font-size: 42px;
    }

    .title-line {
        font-size: 14px;
        letter-spacing: 2px;
    }

    .heart-decoration {
        font-size: 18px;
    }

    .welcome-subtitle {
        font-size: 13px;
        margin-bottom: 10px;
    }

    .love-quote {
        padding: 10px 15px;
        font-size: 12px;
        border-radius: 15px;
        margin-bottom: 12px;
    }

    /* Günlük Aşk Notu - Küçültüldü */
    .daily-love-note {
        padding: 10px 14px;
        margin-bottom: 15px;
        border-radius: 14px;
        gap: 8px;
    }

    .note-icon {
        font-size: 20px;
    }

    .daily-love-note p {
        font-size: 11px;
        line-height: 1.3;
    }

    .btn-start {
        padding: 14px 32px;
        font-size: 16px;
        gap: 8px;
    }

    .btn-icon {
        font-size: 20px;
    }

    .btn-sparkle {
        font-size: 16px;
    }

    .instructions {
        margin-top: 15px;
        padding: 12px;
        border-radius: 18px;
    }

    .instruction-item {
        padding: 5px 0;
        font-size: 11px;
        gap: 8px;
    }

    .instruction-icon {
        font-size: 14px;
        width: 20px;
    }

    .high-score-display {
        margin-top: 12px;
        font-size: 12px;
    }

    #menuHighScore {
        font-size: 14px;
    }

    /* Game Screen */
    .game-header {
        padding: 8px 10px;
    }

    .stat-box {
        padding: 6px 10px;
        border-radius: 12px;
        gap: 5px;
    }

    .stat-value {
        font-size: 16px;
    }

    .stat-icon {
        font-size: 16px;
    }

    .level-box {
        padding: 6px 14px;
    }

    .stat-label {
        font-size: 8px;
    }

    .combo-display {
        top: 70px;
        padding: 8px 16px;
        gap: 6px;
    }

    .combo-count {
        font-size: 22px;
    }

    .combo-text {
        font-size: 12px;
    }

    .combo-multiplier {
        font-size: 18px;
        padding: 4px 10px;
    }

    .powerup-indicators {
        top: 70px;
        right: 8px;
        gap: 6px;
    }

    .powerup-indicator {
        padding: 6px 10px;
        border-radius: 10px;
        gap: 6px;
    }

    .powerup-icon {
        font-size: 18px;
    }

    .powerup-timer {
        width: 30px;
        height: 4px;
    }

    .message-content {
        padding: 25px 30px;
        margin: 0 15px;
        border-radius: 22px;
        max-width: 280px;
    }

    .message-heart {
        font-size: 40px;
    }

    .message-text {
        font-size: 15px;
        margin: 15px 0;
    }

    .message-sparkles {
        font-size: 24px;
    }

    .achievement-content {
        padding: 10px 20px;
    }

    .achievement-icon {
        font-size: 22px;
    }

    .achievement-text {
        font-size: 13px;
    }

    .pause-btn {
        width: 45px;
        height: 45px;
        font-size: 20px;
        bottom: 20px;
        right: 15px;
    }

    /* Game Over Screen */
    .gameover-container {
        padding: 15px 12px;
        max-width: 100%;
    }

    .gameover-hearts {
        font-size: 50px;
    }

    .gameover-title {
        font-size: 26px;
        margin: 10px 0 15px;
    }

    .stats-grid {
        gap: 8px;
        margin-bottom: 12px;
    }

    .stat-card {
        padding: 12px 8px;
        border-radius: 14px;
    }

    .stat-card-icon {
        font-size: 22px;
    }

    .stat-card-label {
        font-size: 9px;
    }

    .stat-card-value {
        font-size: 20px;
    }

    .high-score-card {
        padding: 14px;
        border-radius: 18px;
        margin-bottom: 12px;
    }

    .high-label {
        font-size: 12px;
    }

    .high-value {
        font-size: 32px;
    }

    .new-record {
        font-size: 10px;
        padding: 4px 12px;
    }

    .final-message {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .button-group {
        gap: 10px;
    }

    .btn-restart,
    .btn-home {
        padding: 12px 30px;
        font-size: 14px;
        gap: 8px;
    }

    /* Level Up Screen */
    .levelup-container {
        padding: 20px;
    }

    .levelup-stars {
        font-size: 40px;
    }

    .levelup-title {
        font-size: 28px;
        margin: 15px 0;
    }

    .new-level {
        padding: 18px 35px;
        border-radius: 20px;
    }

    .level-label {
        font-size: 12px;
    }

    .level-number {
        font-size: 50px;
    }

    .levelup-message {
        font-size: 16px;
    }

    .levelup-bonus {
        padding: 10px 20px;
        font-size: 13px;
    }

    /* Pause Screen */
    .pause-container {
        padding: 25px;
        border-radius: 25px;
    }

    .pause-icon {
        font-size: 45px;
    }

    .pause-title {
        font-size: 26px;
    }

    .pause-subtitle {
        font-size: 14px;
    }

    .btn-resume {
        padding: 14px 35px;
        font-size: 16px;
    }
}

@media (max-width: 360px) {
    .welcome-container {
        padding: 10px 8px;
    }

    .heart-logo {
        width: 65px;
        height: 65px;
    }

    .heart-main {
        font-size: 40px;
    }

    .name-line {
        font-size: 36px;
    }

    .title-line {
        font-size: 12px;
    }

    .love-quote {
        padding: 8px 12px;
        font-size: 11px;
    }

    .daily-love-note {
        padding: 8px 12px;
    }

    .daily-love-note p {
        font-size: 10px;
    }

    .btn-start {
        padding: 12px 28px;
        font-size: 14px;
    }

    .instructions {
        padding: 10px;
    }

    .instruction-item {
        font-size: 10px;
    }

    .stat-box {
        padding: 5px 8px;
    }

    .stat-value {
        font-size: 14px;
    }

    .stat-icon {
        font-size: 14px;
    }

    .stats-grid {
        gap: 6px;
    }

    .stat-card {
        padding: 10px 6px;
    }

    .stat-card-value {
        font-size: 18px;
    }

    .gameover-title {
        font-size: 22px;
    }

    .high-value {
        font-size: 28px;
    }
}

@media (max-width: 320px) {
    .name-line {
        font-size: 32px;
    }

    .daily-love-note {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }

    .daily-love-note p {
        text-align: center;
    }
}

/* Safe area for notched phones */
@supports (padding-top: env(safe-area-inset-top)) {
    .game-header {
        padding-top: calc(8px + env(safe-area-inset-top));
    }

    .pause-btn {
        bottom: calc(20px + env(safe-area-inset-bottom));
    }
}

/* Screen shake animation */
@keyframes screenShake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.screen-shake {
    animation: screenShake 0.4s ease-in-out;
}