:root {
    --bg-dark: #120e18;
    --card-bg: rgba(29, 22, 40, 0.85);
    --accent-pink: #ff477e;
    --accent-purple: #9d4edd;
    --accent-gold: #ffb703;
    --text-light: #f8f9fa;
    --text-muted: #b8b0c8;
}

body {
    margin: 0;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    background: radial-gradient(circle at top, #241432 0%, var(--bg-dark) 100%);
    color: var(--text-light);
    min-height: 100vh;
    padding-bottom: 3rem;
}

/* Навигация */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    background: rgba(18, 14, 24, 0.95);
    border-bottom: 1px solid rgba(255, 71, 126, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--accent-pink);
}

.logo span {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: normal;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-links a.active, .nav-links a:hover {
    color: var(--accent-pink);
    text-shadow: 0 0 8px rgba(255, 71, 126, 0.5);
}

/* Контейнеры и заголовки */
.container {
    max-width: 850px;
    margin: 2.5rem auto 0;
    padding: 0 1.5rem;
}

.page-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, var(--accent-pink), var(--accent-gold));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(255, 71, 126, 0.15);
    border: 1px solid var(--accent-pink);
    border-radius: 20px;
    color: var(--accent-pink);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.glow-text {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Кнопки */
.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 25px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: inline-block;
}

.primary-btn {
    background: linear-gradient(45deg, var(--accent-pink), var(--accent-purple));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 71, 126, 0.4);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 71, 126, 0.6);
}

.secret-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    opacity: 0.4;
    transition: all 0.3s;
}

.secret-btn:hover {
    opacity: 1;
    transform: scale(1.3);
}

/* Карточки и таймер */
.timer-card, .interactive-card {
    background: var(--card-bg);
    border: 1px solid rgba(157, 78, 221, 0.3);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.timer-display {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.time-box {
    background: rgba(18, 14, 24, 0.6);
    padding: 1rem;
    border-radius: 12px;
    min-width: 80px;
    border: 1px solid rgba(255, 183, 3, 0.3);
}

.time-box span {
    display: block;
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--accent-gold);
}

.time-box label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.timer-subtext {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Timeline (Хронология) */
.timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid var(--accent-purple);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-badge {
    position: absolute;
    left: -3.1rem;
    top: 0;
    background: var(--bg-dark);
    border: 2px solid var(--accent-pink);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.timeline-content {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.timeline-content h3 {
    margin: 0.5rem 0;
    color: var(--accent-pink);
}

.timeline-content .date {
    color: var(--accent-gold);
    font-size: 0.85rem;
    font-weight: bold;
}

.timeline-content p {
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Ежедневные карточки */
.daily-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.daily-card {
    background: var(--card-bg);
    padding: 1.8rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.daily-card.locked {
    opacity: 0.6;
    background: rgba(20, 15, 28, 0.5);
}

.daily-card.unlocked {
    border-color: var(--accent-pink);
    box-shadow: 0 4px 20px rgba(255, 71, 126, 0.2);
}

.daily-card h3 {
    margin-top: 0;
    color: var(--accent-gold);
}

.daily-card p {
    line-height: 1.6;
    color: #e2e2e2;
}

/* Достижения */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.ach-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #161022;
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.ach-card.locked {
    opacity: 0.45;
    filter: grayscale(0.8);
    background: rgba(20, 15, 30, 0.6);
}

.ach-card.unlocked {
    opacity: 1;
    filter: grayscale(0);
    border-color: var(--accent-gold);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
    background: linear-gradient(135deg, #1f1430, #161022);
}

.ach-icon {
    font-size: 2.2rem;
    min-width: 50px;
    text-align: center;
}

.ach-info {
    text-align: left;
}

.ach-info h3 {
    margin: 0 0 0.3rem 0;
    font-size: 1.05rem;
    color: white;
}

.ach-desc {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.ach-card.unlocked .ach-info h3 {
    color: var(--accent-gold);
}

/* 100 причин */
.reasons-stats {
    background: var(--card-bg);
    padding: 0.8rem 1.5rem;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 2rem;
    border: 1px solid var(--accent-pink);
}

.reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
}

.reason-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 71, 126, 0.3);
    border-radius: 12px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    color: inherit;
}

.reason-card.closed {
    background: rgba(157, 78, 221, 0.2);
    font-weight: bold;
    color: var(--accent-gold);
}

.reason-card.opened {
    background: var(--card-bg);
    border-color: var(--accent-pink);
    color: var(--text-light);
}

/* Викторина */
.quiz-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--accent-purple);
    text-align: center;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.quiz-btn {
    background: rgba(18, 14, 24, 0.8);
    border: 1px solid var(--accent-pink);
    color: var(--text-light);
    padding: 1rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.quiz-btn:hover {
    background: var(--accent-pink);
    color: white;
}

.hidden { display: none; }

/* Bucket List */
.bucket-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bucket-item {
    background: var(--card-bg);
    padding: 1.2rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.bucket-item.completed {
    border-color: var(--accent-gold);
    text-decoration: line-through;
    opacity: 0.7;
}

.bucket-checkbox {
    width: 22px;
    height: 22px;
    accent-color: var(--accent-pink);
}

/* Летающие сердечки */
.falling-heart {
    position: fixed;
    top: -20px;
    z-index: 0;
    pointer-events: none;
    opacity: 0.7;
    animation: fall linear forwards;
}

@keyframes fall {
    to {
        transform: translateY(105vh) rotate(360deg);
        opacity: 0;
    }
}

/* Сейф */
.safe-input {
    padding: 0.8rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--accent-pink);
    background: #120e18;
    color: white;
    font-size: 1rem;
    outline: none;
    text-align: center;
}

.locked-card { opacity: 0.5; filter: grayscale(1); }
.unlocked-card { opacity: 1; filter: grayscale(0); border-color: var(--accent-gold) !important; }
.error-msg { color: #ff4d4d; font-size: 0.9rem; margin-top: 0.5rem; }

/* Пульс сердца */
.pulsing-heart { font-size: 3.5rem; animation: pulse 1.2s infinite; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.25); } 100% { transform: scale(1); } }
.countdown-box { font-weight: bold; color: var(--accent-gold); margin-top: 0.5rem; }
.hint-text { font-size: 0.75rem; color: var(--text-muted); display: block; margin-top: 0.3rem; }

/* Интерактивы */
.big-heart-btn { background: none; border: none; font-size: 4rem; cursor: pointer; transition: transform 0.1s; }
.big-heart-btn:active { transform: scale(0.85); }
.reward-box { background: rgba(255, 71, 126, 0.2); padding: 1rem; border-radius: 12px; border: 1px solid var(--accent-pink); margin-top: 1rem; }

/* Страница «Развлечения & Магия» (Звёздное небо и воспоминания) */
.fun-section {
    background: var(--card-bg);
    border: 1px solid rgba(157, 78, 221, 0.3);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    box-sizing: border-box;
    width: 100%;
}

.fun-section h2 {
    margin-top: 0;
    color: var(--accent-pink);
    font-size: 1.5rem;
}

.fun-section p {
    color: var(--text-muted);
    margin: 0;
}

.stars-container, .stars-sky {
    width: 100%;
    height: 180px;
    background: #0a0710;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.star-item {
    position: absolute;
    cursor: pointer;
    transition: transform 0.2s;
    background: transparent;
    border: 0;
    padding: 0.2rem;
}

.star-item:hover {
    transform: scale(1.5);
}

.message-box, .memory-box {
    width: 100%;
    min-height: 50px;
    padding: 1rem;
    background: rgba(18, 14, 24, 0.6);
    border: 1px solid rgba(255, 71, 126, 0.3);
    border-radius: 12px;
    color: var(--accent-gold);
    font-size: 1rem;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Спойлер-письмо */
.spoiler { background: var(--accent-pink); color: transparent; border-radius: 4px; padding: 0 4px; cursor: pointer; transition: all 0.3s; user-select: none; }
.spoiler.revealed { background: transparent; color: var(--accent-gold); font-weight: bold; }

/* Дневник и Записки */
.mood-selector button { background: none; border: none; font-size: 2.2rem; cursor: pointer; transition: transform 0.2s; }
.mood-selector button:hover { transform: scale(1.3); }
.note-textarea { width: 100%; height: 80px; background: #120e18; border: 1px solid var(--accent-purple); border-radius: 10px; color: white; padding: 0.8rem; box-sizing: border-box; }
.notes-list { margin-top: 1rem; text-align: left; display: flex; flex-direction: column; gap: 0.5rem; }
.note-card { background: rgba(255,255,255,0.05); padding: 0.8rem; border-radius: 8px; border-left: 3px solid var(--accent-pink); font-size: 0.9rem; }

/* Глобальный экран блокировки сайта */
#global-lock-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0a0710;
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lock-box {
    background: #161022;
    padding: 2.5rem 2rem;
    border-radius: 20px;
    border: 2px solid var(--accent-pink);
    text-align: center;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 0 30px rgba(255, 71, 126, 0.35);
}

.lock-box h2 {
    margin: 0.8rem 0 0.5rem 0;
    font-size: 1.4rem;
    color: white;
}

.lock-box p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.lock-box input {
    width: 100%;
    padding: 0.8rem;
    margin: 1.2rem 0;
    border-radius: 12px;
    border: 1px solid var(--accent-purple);
    background: #120e18;
    color: white;
    text-align: center;
    font-size: 1.1rem;
    outline: none;
    box-sizing: border-box;
}

.lock-box input:focus {
    border-color: var(--accent-pink);
}

/* Общие правила доступности и элементов */
button, input, textarea { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 3px;
}
textarea { resize: vertical; }

/* Адаптивность (Медиазапросы) */
@media (max-width: 900px) {
    .navbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.8rem;
        padding: 1rem;
    }
    .nav-links {
        width: 100%;
        gap: 0.7rem 1rem;
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
    .container {
        margin-top: 1.5rem;
        padding: 0 1rem;
    }
    .page-title, .glow-text { font-size: 1.8rem; }
    .timer-card, .interactive-card, .quiz-card { padding: 1.25rem; }
    .timer-display { gap: 0.5rem; flex-wrap: wrap; }
    .time-box { min-width: 62px; padding: 0.75rem 0.5rem; }
    .time-box span { font-size: 1.6rem; }
    .reasons-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}