* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #3a0005 0%, #1a0000 100%);
    background-attachment: fixed;
    color: #ffe6e6;
    overflow-x: hidden;
}

.fullscreen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    position: relative;
}

/* Авторизация */
#login-section {
    background: radial-gradient(circle, #4a040a 0%, #110000 100%);
    z-index: 100;
}

.login-container {
    background-color: rgba(30, 0, 5, 0.7);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 100, 100, 0.2);
    max-width: 400px;
    width: 100%;
}

h2 {
    font-family: 'Caveat', cursive;
    font-size: 3rem;
    color: #ffb3b3;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.login-group {
    flex-direction: column;
    align-items: center;
}

input {
    padding: 15px;
    font-size: 1rem;
    border: 1px solid #ff9999;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    outline: none;
    width: 250px;
    font-family: inherit;
    color: #333;
}

.login-group input { width: 100%; margin-bottom: 15px; }
.login-group button { width: 100%; }

button {
    padding: 15px 30px;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    background-color: #ff6666;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
    font-family: inherit;
    box-shadow: 0 4px 15px rgba(255, 100, 100, 0.3);
}

button:hover {
    background-color: #ff4d4d;
    transform: translateY(-2px);
}

#login-error, #error-message {
    color: #ff4d4d;
    margin-top: 15px;
}

/* Лента 16:9 */
#timeline-section {
    padding: 100px 5% 60px;
    max-width: 1600px;
    margin: 0 auto;
}

.year-separator {
    text-align: center;
    font-family: 'Caveat', cursive;
    font-size: 8rem;
    color: #ffb3b3;
    margin: 100px 0;
    text-shadow: 0 0 30px rgba(255, 179, 179, 0.5);
    line-height: 1;
}

.text-only-event h3 {
    font-family: 'Caveat', cursive;
    font-size: 4rem;
    color: #ffe6e6;
    font-weight: normal;
    text-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.timeline-row {
    display: flex;
    justify-content: flex-end; 
    align-items: center;
    background-color: rgba(40, 0, 5, 0.6);
    border-radius: 20px;
    border: 1px solid rgba(255, 150, 150, 0.15);
    padding: 30px;
    margin-bottom: 60px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    gap: 30px; 
}

.media-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    max-width: 75%; 
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: #ff6666 rgba(0,0,0,0.3);
    align-items: center;
}

.media-container::-webkit-scrollbar { height: 8px; }
.media-container::-webkit-scrollbar-track { background: rgba(0,0,0,0.3); border-radius: 4px; }
.media-container::-webkit-scrollbar-thumb { background-color: #ff6666; border-radius: 4px; }

.media-item, .screenshot-img {
    height: 350px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.7);
    object-fit: cover;
    flex-shrink: 0;
}

video.media-item {
    width: auto;
}

.date-container {
    font-family: 'Caveat', cursive;
    font-size: 4.5rem;
    color: #ff9999;
    text-align: right;
    line-height: 1.1;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.6);
    white-space: nowrap; 
    flex-shrink: 0; 
}

/* Кнопка и Пазл внизу */
.action-container {
    text-align: center;
    margin: 80px 0;
}

.puzzle-container {
    margin: 0 auto 100px auto;
    background-color: rgba(30, 0, 5, 0.7);
    padding: 40px;
    border-radius: 15px;
    border: 1px solid rgba(255, 100, 100, 0.2);
    max-width: 700px;
    text-align: center;
}

/* Фиксированный Таймер */
#top-timer-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(20, 0, 0, 0.95);
    border-bottom: 2px solid #ff4d4d;
    z-index: 1000;
    text-align: center;
    padding: 10px 0;
    box-shadow: 0 5px 25px rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.timer-label {
    font-size: 1rem;
    color: #ffb3b3;
    margin-bottom: -5px;
}

#timer {
    font-size: 4rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #ff9999;
    text-shadow: 0 0 15px rgba(255, 153, 153, 0.5);
}

/* Финал (Оверлей) */
#finale-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #2a0005 0%, #000000 100%);
    z-index: 2000;
    display: block; 
    overflow-y: auto; 
    padding: 60px 20px;
    text-align: center;
}

.finale-box {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto; 
    animation: fadeIn 2s forwards;
}

.finale-title {
    font-size: 3.5rem;
    margin-bottom: 30px;
}

#proposal-video {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 100, 100, 0.3);
}

#proposal-container {
    margin-top: 60px; 
    padding-bottom: 100px;
}

.huge-text {
    font-size: 6rem;
    line-height: 1.2;
    margin-bottom: 60px;
    font-family: 'Caveat', cursive;
    color: #ff9999;
    text-shadow: 0 5px 25px rgba(255, 153, 153, 0.4);
}

.button-group {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-large {
    font-size: 2.5rem;
    padding: 25px 70px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.btn-large:hover { transform: scale(1.05); }
.btn-green { background-color: #2e7d32; }
.btn-green:hover { background-color: #1b5e20; box-shadow: 0 10px 40px rgba(46, 125, 50, 0.5); }
.btn-red { background-color: #c62828; }
.btn-red:hover { background-color: #b71c1c; box-shadow: 0 10px 40px rgba(198, 40, 40, 0.5); }

/* Падающие сердечки */
.falling-heart {
    position: fixed;
    top: -10vh;
    z-index: 1;
    pointer-events: none;
    animation: fall linear forwards;
    opacity: 0.8;
}

@keyframes fall {
    0% { transform: translateY(0) rotate(0deg) scale(1); }
    50% { transform: translateY(50vh) rotate(180deg) scale(1.2); }
    100% { transform: translateY(110vh) rotate(360deg) scale(1); }
}

.hidden { display: none !important; }

.fade-element {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-element.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 1024px) {
    .timeline-row { flex-direction: column-reverse; justify-content: center; gap: 20px; }
    .media-container { max-width: 100%; justify-content: center; margin-left: 0; }
    .date-container { text-align: center; font-size: 3.5rem; white-space: normal; width: 100%; }
    .huge-text { font-size: 4rem; }
    .year-separator { font-size: 5rem; margin: 60px 0; }
}
