/* ===== ПЕРЕМЕННЫЕ ===== */
:root {
    --pink: #ff6b9d;
    --pink-light: #ffb6c1;
    --pink-dark: #e91e8c;
    --rose: #ff4081;
    --lavender: #e8b4f8;
    --peach: #ffccbc;
    --cream: #fff5f7;
    --white: #ffffff;
    --text: #4a2040;
    --text-light: #7a4070;
    --shadow: rgba(255, 107, 157, 0.3);
    --glow: 0 0 30px rgba(255, 107, 157, 0.4);
    --font-cursive: 'Dancing Script', cursive;
    --font-body: 'Nunito', sans-serif;
    --font-handwrite: 'Caveat', cursive;
}

/* ===== СБРОС ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 30%, #f48fb1 60%, #f06292 100%);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== CANVAS ЧАСТИЦЫ ===== */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ===== ЭКРАНЫ ===== */
.screen {
    display: none;
    min-height: 100vh;
    width: 100%;
    position: relative;
    z-index: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.screen.active {
    display: flex;
}

/* ===== АНИМАЦИИ ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes heartbeat {

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

    15% {
        transform: scale(1.15);
    }

    30% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.1);
    }
}

@keyframes bounce {

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

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

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(-2deg);
    }

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

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(255, 107, 157, 0.4);
    }

    50% {
        box-shadow: 0 0 40px rgba(255, 107, 157, 0.8), 0 0 80px rgba(255, 64, 129, 0.3);
    }
}

@keyframes sparkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }

    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes flyUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-120vh) scale(0.3);
    }
}

@keyframes wiggle {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-5deg);
    }

    75% {
        transform: rotate(5deg);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes firework {
    0% {
        opacity: 1;
        transform: scale(0);
    }

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

    100% {
        opacity: 0;
        transform: scale(1.5);
    }
}

/* ===== ЭКРАН 1: СТАРТ ===== */
#start-screen {
    background: radial-gradient(ellipse at center, #fff0f5 0%, #fce4ec 40%, #f8bbd0 100%);
    padding: 30px;
}

.start-content {
    text-align: center;
    animation: fadeInUp 1.5s ease;
}

.hamster-pair {
    font-size: 4rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.hamster-bounce {
    animation: bounce 2s ease-in-out infinite;
    display: inline-block;
}

.hamster-bounce.delay {
    animation-delay: 0.5s;
}

.heart-between {
    animation: heartbeat 1.5s ease-in-out infinite;
    font-size: 3rem;
}

.start-title {
    font-family: var(--font-cursive);
    font-size: clamp(2rem, 6vw, 4rem);
    color: var(--pink-dark);
    margin-bottom: 15px;
    line-height: 1.3;
    text-shadow: 2px 2px 10px rgba(233, 30, 140, 0.15);
}

.start-subtitle {
    font-size: clamp(1rem, 3vw, 1.4rem);
    color: var(--text-light);
    margin-bottom: 40px;
    font-style: italic;
}

/* ===== КНОПКИ ===== */
.btn-magic {
    background: linear-gradient(135deg, var(--pink) 0%, var(--rose) 50%, var(--pink-dark) 100%);
    color: white;
    border: none;
    padding: 18px 45px;
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    font-family: var(--font-cursive);
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: pulse-glow 2s ease-in-out infinite;
    letter-spacing: 1px;
}

.btn-magic:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 30px rgba(255, 64, 129, 0.5);
}

.btn-magic:active {
    transform: scale(0.96);
}

.btn-sparkle {
    animation: sparkle 2s ease-in-out infinite;
}

.btn-big-magic {
    padding: 25px 60px;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
}

.btn-huge {
    padding: 30px 80px;
    font-size: clamp(1.8rem, 5vw, 2.8rem);
}

/* ===== ЭКРАН 2: ПУТЕШЕСТВИЕ ===== */
#journey-screen {
    background: radial-gradient(ellipse at top, #fff5f7 0%, #fce4ec 50%, #f8bbd0 100%);
    padding: 20px 15px;
    justify-content: flex-start;
    min-height: 100vh;
}

.journey-wrapper {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 20px;
}

/* Прогресс бар */
.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    margin: 10px 0 20px;
    position: relative;
    overflow: visible;
    flex-shrink: 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--pink), var(--rose), var(--pink-dark));
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-heart {
    position: absolute;
    top: -10px;
    left: 0%;
    transition: left 0.5s ease;
    font-size: 1.2rem;
    transform: translateX(-50%);
}

/* Секция воспоминания */
.memory-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.8s ease;
    width: 100%;
}

.memory-title {
    font-family: var(--font-cursive);
    font-size: clamp(1.6rem, 5vw, 2.8rem);
    color: var(--pink-dark);
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 1px 1px 8px rgba(233, 30, 140, 0.12);
    animation: fadeInUp 0.8s ease;
    flex-shrink: 0;
}

/* Фотки */
.memory-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 20px;
}

.photo-card {
    background: white;
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(255, 107, 157, 0.2);
    animation: scaleIn 0.6s ease;
    transition: transform 0.3s ease;
    max-width: 100%;
}

.photo-card:hover {
    transform: rotate(-1deg) scale(1.02);
}

.photo-card img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    max-height: 60vh;
    object-fit: contain;
}

/* Если одна фотка - побольше */
.memory-photos.single-photo .photo-card {
    max-width: min(100%, 500px);
}

.memory-photos.single-photo .photo-card img {
    max-height: 65vh;
}

/* Если 2 фотки */
.memory-photos.two-photos .photo-card {
    max-width: min(48%, 400px);
}

.memory-photos.two-photos .photo-card img {
    max-height: 55vh;
}

/* Если 3+ фоток */
.memory-photos.multi-photos .photo-card {
    max-width: min(48%, 350px);
}

.memory-photos.multi-photos .photo-card img {
    max-height: 45vh;
}

/* Много фоток (5+) */
.memory-photos.many-photos .photo-card {
    max-width: min(31%, 280px);
}

.memory-photos.many-photos .photo-card img {
    max-height: 35vh;
}

/* Навигация */
.navigation-btns {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: auto;
    padding-top: 15px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.btn-nav {
    background: white;
    color: var(--pink);
    border: 2px solid var(--pink);
    padding: 12px 28px;
    font-size: 1rem;
    font-family: var(--font-body);
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-nav:hover {
    background: var(--pink);
    color: white;
    transform: scale(1.05);
}

.btn-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.memory-counter {
    font-family: var(--font-cursive);
    font-size: 1.3rem;
    color: var(--pink-dark);
}

/* ===== ЭКРАН ЦИТАТЫ ===== */
#quote-screen {
    background: radial-gradient(ellipse at center, #fff5f7 0%, #fce4ec 50%, #f8bbd0 100%);
    padding: 40px;
}

.quote-content {
    text-align: center;
    max-width: 700px;
    animation: fadeIn 1s ease;
}

.quote-mark {
    font-size: 5rem;
    color: var(--pink-light);
    line-height: 1;
    margin-bottom: 10px;
}

.quote-text {
    font-family: var(--font-handwrite);
    font-size: clamp(1.4rem, 4vw, 2.2rem);
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 15px;
    font-style: italic;
}

.quote-author {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--text-light);
}

.quote-hearts {
    font-size: 2rem;
    margin-top: 15px;
    animation: heartbeat 1.5s infinite;
}

/* ===== ЭКРАН ПОЗДРАВЛЕНИЯ ===== */
#congrats-screen {
    background: radial-gradient(ellipse at center, #fff0f5 0%, #fce4ec 40%, #f8bbd0 100%);
    padding: 40px 20px;
}

.congrats-content {
    text-align: center;
    animation: fadeInUp 1.2s ease;
}

.congrats-title {
    font-family: var(--font-cursive);
    font-size: clamp(2.2rem, 6vw, 4rem);
    color: var(--pink-dark);
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(233, 30, 140, 0.15);
}

.congrats-divider {
    font-size: 2.5rem;
    margin: 20px 0;
    animation: wiggle 3s ease-in-out infinite;
}

.congrats-text {
    font-family: var(--font-handwrite);
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 30px;
}

.hamster-love-scene {
    font-size: 3.5rem;
    margin: 20px 0 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.love-hearts {
    animation: heartbeat 1.5s infinite;
}

/* ===== ЭКРАН ДВА ГОДА ===== */
#two-years-screen {
    background: radial-gradient(ellipse at center, #fff0f5 0%, #fce4ec 40%, #f8bbd0 100%);
    padding: 40px 20px;
}

.two-years-content {
    text-align: center;
    animation: fadeInUp 1.2s ease;
}

.two-years-title {
    font-family: var(--font-cursive);
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--pink-dark);
    margin-bottom: 30px;
}

.two-years-emoji {
    font-size: 4rem;
    margin-bottom: 40px;
    animation: heartbeat 1.5s infinite;
}

/* ===== ЭКРАН СЕРДЕЧКИ ===== */
#hearts-screen {
    background: radial-gradient(ellipse at center, #fff0f5 0%, #fce4ec 40%, #f8bbd0 100%);
    padding: 0;
    overflow: hidden;
    position: relative;
}

.hearts-launch-area {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* SVG сердечко с фоткой */
.flying-heart {
    position: absolute;
    width: 120px;
    height: 110px;
    animation: flyUp 4s ease-in forwards;
    pointer-events: none;
    z-index: 5;
}

.flying-heart svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 12px rgba(255, 107, 157, 0.5));
}

/* ===== ЭКРАН СПАСИБО ===== */
#thanks-screen {
    background: radial-gradient(ellipse at center, #fff0f5 0%, #fce4ec 40%, #f8bbd0 100%);
    padding: 40px 20px;
}

.thanks-content {
    text-align: center;
    animation: fadeInUp 1.2s ease;
}

.thanks-title {
    font-family: var(--font-cursive);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: var(--pink-dark);
    margin-bottom: 20px;
}

.thanks-subtitle {
    font-family: var(--font-handwrite);
    font-size: clamp(1.3rem, 3vw, 2rem);
    color: var(--text-light);
    margin-bottom: 30px;
}

.thanks-hamster {
    font-size: 4rem;
    margin-bottom: 30px;
    animation: bounce 2s infinite;
}

/* ===== ЭКРАН ВОПРОС ===== */
#question-screen {
    background: radial-gradient(ellipse at center, #fff0f5 0%, #fce4ec 40%, #f8bbd0 100%);
    padding: 40px 20px;
}

.question-content {
    text-align: center;
    animation: fadeInUp 1s ease;
    position: relative;
    width: 100%;
    max-width: 600px;
    min-height: 300px;
}

.question-title {
    font-family: var(--font-cursive);
    font-size: clamp(2rem, 6vw, 3.5rem);
    color: var(--pink-dark);
    margin-bottom: 50px;
}

.question-buttons {
    position: relative;
    min-height: 80px;
    display: flex;
    justify-content: center;
}

.btn-no {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 16px 40px;
    font-size: 1.3rem;
    font-family: var(--font-body);
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: absolute;
}

/* ===== ПЛАВАЮЩИЕ ЛЮБОВНЫЕ ФРАЗЫ ===== */
.floating-phrases {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.love-phrase {
    position: absolute;
    bottom: -60px;
    font-family: var(--font-handwrite);
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    color: var(--pink-dark);
    white-space: nowrap;
    opacity: 0;
    animation: floatPhrase 12s linear forwards;
    text-shadow: 1px 1px 6px rgba(233, 30, 140, 0.15);
    pointer-events: none;
}

@keyframes floatPhrase {
    0% {
        bottom: -60px;
        opacity: 0;
    }

    5% {
        opacity: 0.85;
    }

    85% {
        opacity: 0.85;
    }

    100% {
        bottom: 110%;
        opacity: 0;
    }
}

/* ===== ЭКРАН ФИНАЛ ===== */
#final-screen {
    background: radial-gradient(ellipse at center, #fff0f5 0%, #fce4ec 30%, #f48fb1 70%, #ec407a 100%);
    padding: 40px 20px;
}

.final-content {
    text-align: center;
    animation: fadeInUp 1.5s ease;
    position: relative;
}

.final-title {
    font-family: var(--font-cursive);
    font-size: clamp(2.5rem, 7vw, 5rem);
    color: white;
    text-shadow: 2px 2px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 25px;
}

.final-text {
    font-family: var(--font-handwrite);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    margin-bottom: 30px;
}

.final-big-heart {
    font-size: 8rem;
    animation: heartbeat 1.5s infinite;
}

/* Фейерверк */
.firework-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: firework 1.5s ease-out forwards;
    pointer-events: none;
}

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

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 600px) {
    .hamster-pair {
        font-size: 3rem;
    }

    .btn-magic {
        padding: 15px 35px;
    }

    .btn-big-magic {
        padding: 20px 45px;
    }

    .btn-huge {
        padding: 22px 50px;
    }

    .memory-photos.two-photos .photo-card,
    .memory-photos.multi-photos .photo-card {
        max-width: 100%;
    }

    .memory-photos.many-photos .photo-card {
        max-width: 48%;
    }

    .navigation-btns {
        gap: 10px;
    }

    .flying-heart {
        width: 90px;
        height: 82px;
    }

    .final-big-heart {
        font-size: 5rem;
    }
}
