body {
    background-color: #0a0a0a;
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    font-family: 'Arial', sans-serif;
    color: white;
}

/* ===== ФОНОВОЕ ФОТО ===== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('photo.jpg');
    background-size: cover;
    background-position: center 80%;
    background-repeat: no-repeat;
    filter: grayscale(100%) contrast(1.1) brightness(0.35);
    box-shadow: inset 0 0 150px rgba(0,0,0,0.9);
    z-index: -1;
}

@media (max-width: 768px) {
    body::before { background-position: center 70%; }
}

/* ===== ЭКРАН ПРИВЕТСТВИЯ ===== */
#startScreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(8px);
    transition: opacity 1s ease;
}

#startScreen h1 {
    color: #fff;
    font-size: 36px;
    margin-bottom: 10px;
    text-shadow: 0 0 20px #ffb3c6;
    animation: fadeInText 2s ease;
}

#startScreen p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    margin-bottom: 30px;
    animation: fadeInText 2s ease 0.3s backwards;
}

@keyframes fadeInText {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

#startBtn {
    width: 100px;
    height: 100px;
    font-size: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 179, 198, 0.6);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(255, 179, 198, 0.3), inset 0 0 20px rgba(255, 179, 198, 0.2);
    transition: all 0.4s ease;
    animation: heartBeat 1.5s ease-in-out infinite;
    backdrop-filter: blur(5px);
}

#startBtn:hover {
    transform: scale(1.15);
    background: rgba(255, 179, 198, 0.2);
    box-shadow: 0 0 60px rgba(255, 179, 198, 0.6), inset 0 0 30px rgba(255, 179, 198, 0.4);
    border-color: #fff;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

#startScreen.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* ===== СЕРДЕЧКО ИЗ ТЕКСТА ===== */
#ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 1.5s ease;
    z-index: 5;
}

#ui.visible { opacity: 1; }

.love {
    position: absolute;
    left: 50%;
    top: 50%;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
    text-shadow: 0 0 10px #ffb3c6, 0 0 20px #ff4d6d;
    will-change: transform, opacity;
}

/* ===== КНОПКА В ЦЕНТРЕ (💖) ===== */
#nextBtn {
    position: absolute;
    top: 52%;
    left: 52%;
    width: 80px;
    height: 80px;
    font-size: 40px;
    background-color: rgba(0, 0, 0, 0.4);
    border: 2px solid #ffb3c6;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(255, 179, 198, 0.5), inset 0 0 20px rgba(255, 179, 198, 0.3);
    z-index: 15;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -50%) scale(0.5);
    transition: opacity 0.8s ease, visibility 0.8s ease, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, background-color 0.3s ease;
}

#nextBtn.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

#nextBtn:hover {
    transform: translate(-50%, -50%) scale(1.15);
    background-color: rgba(255, 179, 198, 0.2);
    box-shadow: 0 0 50px rgba(255, 179, 198, 0.8), inset 0 0 30px rgba(255, 179, 198, 0.5);
    border-color: #fff;
}

/* ===== ВСПЛЫВАЮЩЕЕ СООБЩЕНИЕ ===== */
#messageBox {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(20, 20, 20, 0.75);
    border: 1px solid rgba(255, 179, 198, 0.5);
    padding: 35px 30px;
    border-radius: 25px;
    text-align: left;
    color: white;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 179, 198, 0.3), inset 0 0 20px rgba(255, 255, 255, 0.05);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 20;
    backdrop-filter: blur(15px);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#messageBox.show {
    transform: translate(-50%, -50%) scale(1);
}

#messageText {
    font-size: 19px;
    font-weight: 300;
    letter-spacing: 0.5px;
    margin: 0;
    line-height: 1.7;
    text-shadow: 0 0 15px rgba(255, 179, 198, 0.7);
    color: #fff;
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px; /* Отступ между абзацами */
}

/* Готовый абзац плавно появляется */
/* .paragraph {
    animation: fadeInParagraph 1.2s ease-out;
    text-align: center;
    line-height: 1.7;
}

@keyframes fadeInParagraph {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
} */

/* Активная строка, которая печатается */
.current-line {
    text-align: center;
    line-height: 1.7;
}

/* Мигающий курсор после текста */
/* Плавно дышащий курсор */
.cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background-color: #ffb3c6;
    margin-left: 3px;
    vertical-align: middle;
    box-shadow: 0 0 10px #ffb3c6;
    animation: breathe 1.6s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { 
        opacity: 1; 
        transform: scaleY(1);
    }
    50% { 
        opacity: 0.15; 
        transform: scaleY(0.9);
    }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ===== КНОПКА "ЕЩЁ КОЕ-ЧТО" ===== */
#moreBtn {
    margin-top: 25px;
    padding: 12px 25px;
    font-size: 16px;
    color: #fff;
    background: rgba(255, 179, 198, 0.15);
    border: 1.5px solid #ffb3c6;
    border-radius: 30px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 15px rgba(255, 179, 198, 0.4);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    transform: translateY(20px);
}

#moreBtn.show {
    opacity: 1;
    transform: translateY(0);
}

#moreBtn:hover {
    background: rgba(255, 179, 198, 0.35);
    box-shadow: 0 0 25px rgba(255, 179, 198, 0.8);
    transform: translateY(0) scale(1.05);
}

/* ===== САЛЮТ ИЗ СЕРДЕЧЕК ===== */
#confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 30;
    overflow: hidden;
}

.confetti-heart {
    position: absolute;
    top: -50px;
    font-size: 24px;
    animation: fall linear forwards;
    opacity: 0.9;
    filter: drop-shadow(0 0 8px rgba(255, 107, 157, 0.8));
}

@keyframes fall {
    0% {
        transform: translateY(0) rotate(0deg) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) rotate(720deg) scale(1.2);
        opacity: 0;
    }
}

/* ===== ВТОРОЙ СЮРПРИЗ ===== */
#surpriseBox {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(255, 179, 198, 0.5);
    padding: 30px;
    border-radius: 25px;
    text-align: center;
    color: white;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 179, 198, 0.3), inset 0 0 20px rgba(255, 255, 255, 0.05);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 25;
    backdrop-filter: blur(15px);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#surpriseBox.show {
    transform: translate(-50%, -50%) scale(1);
}

.surprise-photo {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 3px solid #ffb3c6;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 179, 198, 0.5);
    filter: contrast(1.05) brightness(0.95);
    transition: filter 0.5s ease, transform 0.5s ease;
}

.surprise-photo:hover {
    filter: contrast(1.1) brightness(1);
    transform: scale(1.03);
}

#surpriseText {
    font-size: 18px;
    font-weight: 300;
    line-height: 1.6;
    margin: 0;
    color: #fff;
    text-shadow: 0 0 12px rgba(255, 179, 198, 0.7);
}

.hidden { display: none !important; }

/* ===== ЭКРАН-ЗАМОК ===== */
#lockScreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200; /* Выше остальных */
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(15px);
    transition: opacity 1s ease;
}

#lockScreen.unlocked {
    opacity: 0;
    pointer-events: none;
}

.lock-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 50px 40px;
    background: rgba(20, 20, 20, 0.7);
    border: 1px solid rgba(255, 179, 198, 0.5);
    border-radius: 25px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 179, 198, 0.3), inset 0 0 20px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    max-width: 90%;
    animation: fadeInText 1.5s ease;
}

.lock-icon {
    font-size: 60px;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 20px rgba(255, 179, 198, 0.8));
    animation: heartBeat 2s ease-in-out infinite;
}

.lock-content h2 {
    color: #fff;
    font-size: 26px;
    margin: 0 0 10px 0;
    text-shadow: 0 0 15px #ffb3c6;
    font-weight: 300;
    letter-spacing: 1px;
}

.lock-content p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    margin: 0 0 25px 0;
}

#passwordInput {
    width: 100%;
    max-width: 280px;
    padding: 14px 20px;
    font-size: 16px;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 179, 198, 0.4);
    border-radius: 30px;
    outline: none;
    text-align: center;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    font-family: 'Arial', sans-serif;
}

#passwordInput::placeholder {
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0;
}

#passwordInput:focus {
    border-color: #ffb3c6;
    box-shadow: 0 0 25px rgba(255, 179, 198, 0.6);
    background: rgba(255, 255, 255, 0.08);
}

#unlockBtn {
    margin-top: 20px;
    padding: 14px 40px;
    font-size: 17px;
    color: #fff;
    background: rgba(255, 179, 198, 0.15);
    border: 1.5px solid #ffb3c6;
    border-radius: 30px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(255, 179, 198, 0.4);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: 'Arial', sans-serif;
    letter-spacing: 1px;
}

#unlockBtn:hover {
    background: rgba(255, 179, 198, 0.35);
    box-shadow: 0 0 35px rgba(255, 179, 198, 0.9);
    transform: scale(1.05);
}

.error {
    color: #ff4d6d !important;
    font-size: 14px !important;
    margin-top: 15px !important;
    margin-bottom: 0 !important;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-shadow: 0 0 10px rgba(255, 77, 109, 0.8);
}

.error.show {
    opacity: 1;
}

/* Анимация тряски при неверном пароле */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
}

.shake {
    animation: shake 0.5s ease;
}