:root {
    --primary-red: #ff3366;
    --primary-pink: #ff6b81;
    --soft-pink: #fff0f3;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
    --gradient-bg: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
    --font-heading: 'Pacifico', cursive;
    --font-body: 'Quicksand', sans-serif;
    --font-poem: 'Dancing Script', cursive;
    --shadow-soft: 0 10px 30px rgba(255, 51, 102, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    background: var(--gradient-bg);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* === FLOATING HEARTS BACKGROUND === */
.hearts-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.heart {
    position: absolute;
    font-size: 2rem;
    opacity: 0;
    animation: floatHeart 10s infinite ease-in-out;
}

.heart:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.heart:nth-child(2) {
    left: 25%;
    animation-delay: 2s;
}

.heart:nth-child(3) {
    left: 40%;
    animation-delay: 4s;
}

.heart:nth-child(4) {
    left: 55%;
    animation-delay: 1s;
}

.heart:nth-child(5) {
    left: 70%;
    animation-delay: 3s;
}

.heart:nth-child(6) {
    left: 85%;
    animation-delay: 5s;
}

.heart:nth-child(7) {
    left: 15%;
    animation-delay: 6s;
}

.heart:nth-child(8) {
    left: 90%;
    animation-delay: 7s;
}

@keyframes floatHeart {
    0% {
        bottom: -10%;
        opacity: 0;
        transform: translateX(0) rotate(0deg);
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        bottom: 110%;
        opacity: 0;
        transform: translateX(50px) rotate(360deg);
    }
}

/* === MAIN MENU === */
.main-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 200;
    transition: opacity 0.5s, transform 0.5s;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
}

.main-menu.active {
    opacity: 1;
    pointer-events: all;
    transform: scale(1);
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.big-btn {
    font-size: 1.3rem;
    padding: 18px 45px;
    min-width: 280px;
}

.title {
    font-family: var(--font-heading);
    color: var(--primary-red);
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-main {
    background: linear-gradient(45deg, var(--primary-red), var(--primary-pink));
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(255, 51, 102, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: var(--font-body);
}

.btn-main:active {
    transform: scale(0.95);
    box-shadow: 0 2px 10px rgba(255, 51, 102, 0.3);
}

/* === JOURNEY CONTAINER === */
.journey-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #a18cd1 0%, #fbc2eb 50%, #fad0c4 100%);
    display: none;
    flex-direction: column;
    z-index: 150;
}

.journey-container.active {
    display: flex;
}

/* Journey Header */
.journey-header {
    position: relative;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.home-btn {
    position: absolute;
    left: 15px;
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
}

.home-btn:active {
    transform: scale(0.9);
}

.journey-title {
    font-family: var(--font-heading);
    color: white;
    font-size: 1.3rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Journey Scroll Area */
.journey-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

/* Journey Path */
.journey-path {
    position: relative;
    min-height: 100%;
    padding: 40px 20px 100px;
}

/* Station Container */
.station-container {
    position: relative;
    margin-bottom: 80px;
    animation: fadeInUp 0.6s ease-out backwards;
}

.station-container:nth-child(1) {
    animation-delay: 0.1s;
}

.station-container:nth-child(2) {
    animation-delay: 0.2s;
}

.station-container:nth-child(3) {
    animation-delay: 0.3s;
}

.station-container:nth-child(4) {
    animation-delay: 0.4s;
}

.station-container:nth-child(5) {
    animation-delay: 0.5s;
}

.station-container:nth-child(6) {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Track Lines (Zigzag) */
.track-line {
    position: absolute;
    top: 50%;
    width: 40%;
    height: 4px;
    background: linear-gradient(90deg, #8d6e63 0%, #5d4037 50%, #8d6e63 100%);
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.track-line.left {
    left: 0;
    transform: translateY(-50%);
}

.track-line.right {
    right: 0;
    transform: translateY(-50%);
}

/* Station Card */
.station-card {
    position: relative;
    width: 140px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.station-card:hover,
.station-card:active {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(255, 51, 102, 0.3);
    background: rgba(255, 255, 255, 0.35);
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(255, 107, 157, 0.7);
    }

    50% {
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15), 0 0 0 10px rgba(255, 107, 157, 0);
    }
}

.station-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.station-year {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-red);
    margin-bottom: 5px;
}

.station-name {
    font-size: 0.9rem;
    color: #444;
    font-weight: 600;
}

/* Train */
.train {
    position: fixed;
    left: 50%;
    top: 20%;
    transform: translateX(-50%);
    z-index: 100;
    font-size: 4rem;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
    animation: trainBounce 1s infinite ease-in-out;
    pointer-events: none;
}

@keyframes trainBounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-5px);
    }
}

.train-emoji {
    display: inline-block;
}

.train-smoke {
    position: absolute;
    top: -20px;
    left: -10px;
    font-size: 1.5rem;
    opacity: 0;
    animation: smoke 2s infinite;
}

@keyframes smoke {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.5);
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 0;
        transform: translateY(-30px) scale(1.2);
    }
}

/* Quote Modal */
.quote-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 300;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.quote-modal.active {
    display: flex;
}

.quote-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.quote-content {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(25px);
    border-radius: 30px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.quote-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
    animation: heartBeat 1.5s infinite;
}

@keyframes heartBeat {

    0%,
    100% {
        transform: scale(1);
    }

    10%,
    30% {
        transform: scale(1.1);
    }

    20%,
    40% {
        transform: scale(1);
    }
}

.quote-year {
    font-size: 1rem;
    color: #FFB6C1;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.quote-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: white;
    margin-bottom: 20px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.quote-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    font-style: italic;
    margin-bottom: 25px;
}

.quote-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.quote-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #FFB6C1, #FF69B4);
    box-shadow: 0 0 10px #FFB6C1;
    transition: width 12s linear;
}

/* Continue Button */
.continue-btn {
    margin-top: 20px;
    padding: 12px 30px;
    background: linear-gradient(45deg, var(--primary-red), var(--primary-pink));
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 51, 102, 0.4);
    transition: transform 0.2s;
}

.continue-btn:active {
    transform: scale(0.95);
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Celebration Effects */
.celebration-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 250;
    overflow: hidden;
}

.celebration-particle {
    position: absolute;
    font-size: 2rem;
    animation: explode 1.5s ease-out forwards;
}

@keyframes explode {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0);
        opacity: 0;
    }
}

/* Click Prompt */
.click-prompt {
    position: absolute;
    display: none;
    flex-direction: column;
    align-items: center;
    transform: translateX(-50%);
    z-index: 200;
    animation: bounce 1s infinite;
}

.click-prompt-text {
    background: linear-gradient(45deg, var(--primary-red), var(--primary-pink));
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 5px 15px rgba(255, 51, 102, 0.5);
    margin-bottom: 5px;
}

.click-prompt-arrow {
    font-size: 2rem;
    animation: bounce 0.8s infinite;
}

/* === GAME CONTAINER (Existing) === */
.game-container {
    width: 95%;
    max-width: 450px;
    min-height: 500px;
    height: 95vh;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: var(--glass-border);
    border-radius: 30px;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

.game-container.hidden {
    display: none;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
    background: transparent;
    z-index: 1;
}

.screen.active {
    opacity: 1;
    pointer-events: all;
    z-index: 5;
}

.subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

.btn-secondary {
    background: #fff;
    color: #444;
    border: 1px solid #ccc;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
}

.level-card {
    background: rgba(255, 255, 255, 0.6);
    padding: 10px 20px;
    border-radius: 15px;
    margin-bottom: 10px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.level-icon {
    font-size: 1.5rem;
}

.level-text {
    font-weight: 600;
    color: #444;
}

.game-hud {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    color: var(--primary-red);
    z-index: 10;
    font-size: 1.1rem;
}

.skip-btn {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--primary-pink);
    color: var(--primary-red);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.skip-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 1);
}

.game-area {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.mobile-controls {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.control-btn {
    pointer-events: all;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid white;
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--primary-red);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    transition: background 0.1s;
}

.control-btn:active {
    background: rgba(255, 255, 255, 0.8);
}

#proposal-screen {
    z-index: 100;
    background: var(--glass-bg);
}

.big-question {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--primary-red);
    margin: 2rem 0;
}

.buttons-container {
    position: relative;
    width: 100%;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-yes {
    background: #2ecc71;
    color: white;
    box-shadow: 0 5px 0 #27ae60;
    z-index: 20;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    position: absolute;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
}

.btn-no {
    background: #ff4757;
    color: white;
    box-shadow: 0 5px 0 #e84118;
    z-index: 21;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    position: absolute;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
}

.poem-text {
    font-family: var(--font-poem);
    font-size: 1.6rem;
    line-height: 1.6;
    color: #444;
    white-space: pre-line;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .title {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .level-card {
        padding: 8px 15px;
    }

    .btn-main {
        padding: 12px 30px;
        font-size: 1.1rem;
    }

    .game-hud {
        top: 10px;
        left: 10px;
        right: 10px;
        font-size: 1rem;
    }

    .mobile-controls {
        bottom: 20px;
        padding: 0 20px;
    }

    .btn-yes {
        font-size: 1.1rem;
        padding: 12px 30px;
    }

    .btn-no {
        font-size: 0.9rem;
        padding: 10px 20px;
    }

    .quote-title {
        font-size: 1.6rem;
    }

    .quote-text {
        font-size: 1rem;
    }

    .quote-content {
        padding: 30px 20px;
    }

    .train {
        font-size: 3rem;
    }

    .station-card {
        width: 120px;
        padding: 15px;
    }

    .station-icon {
        font-size: 2.5rem;
    }
}