/* --- Общие стили --- */
body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #ffb6c1, #ffe4e1);
    background-size: 400% 400%;
    animation: gradient 10s ease infinite;
    margin: 0;
    padding: 0;
    text-align: center;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.title-love {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    background: linear-gradient(135deg, #ff6f91, #ffb6c1, #ffe4e1);
    background-size: 300% 300%;
    animation: title-gradient 6s ease infinite;
    color: white;
    font-size: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

@keyframes title-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.untitle-love {
    font-size: 1.2rem;
    margin-top: 10px;
    color: #b22222;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

h1,h2,h3 { margin: 10px 0; }

/* --- Галерея --- */
.gallery { padding: 30px; }

.img-love {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
    gap: 15px;
    margin-top: 20px;
}

.imglove {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s, opacity 1s ease-in;
    opacity: 0;
    animation: fadeIn 1s forwards;
    cursor: pointer;
}

.imglove:nth-child(odd) { animation-delay: 0.3s; }
.imglove:nth-child(even) { animation-delay: 0.6s; }

@keyframes fadeIn { to { opacity: 1; } }

.imglove:hover { transform: scale(1.05); box-shadow: 0 6px 15px rgba(0,0,0,0.3); }

/* --- Lightbox --- */
.lightbox { display:none; position:fixed; z-index:1000; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.6); justify-content:center; align-items:center; }
.lightbox-content { max-width:600px; max-height:400px; border-radius:10px; box-shadow:0 4px 20px rgba(0,0,0,0.5); object-fit:cover; transition: transform 0.3s; }
.close { position:absolute; top:20px; right:40px; color:white; font-size:30px; font-weight:bold; cursor:pointer; user-select:none; }

/* --- Кнопка вверх --- */
.scrollTop {
    position: fixed; bottom: 20px; right: 20px;
    background: #b22222; color:white; border:none; border-radius:50%; padding:15px; font-size:18px; cursor:pointer; box-shadow:0 4px 10px rgba(0,0,0,0.3); transition:0.3s;
}
.scrollTop:hover { background:#8b0000; }

/* --- Видео --- */
.video-section,.video-slider-section { padding:30px; text-align:center; }
.video-section h2,.video-slider-section h2 { color:#b22222; text-shadow:1px 1px 3px rgba(0,0,0,0.2); margin-bottom:15px; }
.love-video { max-width:500px; height:300px; border-radius:15px; box-shadow:0 4px 15px rgba(0,0,0,0.3); margin:0 10px; transition:0.3s; }
.love-video:hover { transform:scale(1.05); box-shadow:0 6px 20px rgba(0,0,0,0.4); }

.video-slider { position:relative; max-width:600px; margin:20px auto; overflow:hidden; border-radius:15px; }
.slider-track { display:flex; transition:transform 0.5s ease-in-out; }
.slider-btn { position:absolute; top:50%; transform:translateY(-50%); background:rgba(178,34,34,0.7); border:none; color:white; font-size:2rem; padding:10px; cursor:pointer; border-radius:50%; z-index:10; }
.slider-btn:hover { background:#b22222; }
.prev { left:10px; } .next { right:10px; }

/* --- Дни вместе --- */
.days-together { margin:30px 0; font-size:1.5rem; color:#b22222; text-shadow:1px 1px 3px rgba(0,0,0,0.2); }

/* --- Сердечки --- */
.heart {
    position:absolute; width:20px; height:20px; background-color:#ff69b4; transform:rotate(45deg); animation:floatUp 2s ease-out forwards; pointer-events:none; z-index:1000;
}
.heart::before,.heart::after { content:""; position:absolute; width:20px; height:20px; background-color:#ff69b4; border-radius:50%; }
.heart::before { top:-10px; left:0; } .heart::after { left:-10px; top:0; }
@keyframes floatUp { 0%{transform:translateY(0) rotate(45deg);opacity:1;} 100%{transform:translateY(-150px) rotate(45deg);opacity:0;} }

/* --- Мини-игра --- */
.game-section { padding:30px; text-align:center; }
.game-section h2 { color:#b22222; text-shadow:1px 1px 3px rgba(0,0,0,0.2); margin-bottom:15px; }
.game-container { margin-top:20px; }
.photo { width:300px; height:200px; object-fit:cover; border-radius:15px; box-shadow:0 4px 10px rgba(0,0,0,0.3); margin-bottom:20px; }
.options button { margin:10px; padding:10px 20px; font-size:16px; border-radius:8px; border:none; cursor:pointer; background-color:#b22222; color:white; transition:0.3s; }
.options button:hover { background-color:#8b0000; }
.result { margin-top:20px; font-size:20px; font-weight:bold; }
.next-btn { margin-top:20px; padding:10px 20px; font-size:16px; border-radius:8px; border:none; cursor:pointer; background-color:#ff69b4; color:white; transition:0.3s; }
.next-btn:hover { background-color:#ff1493; }

.favorites-section, .top5-section {padding: 30px; text-align: center; background: rgba(255,255,255,0.3); margin: 20px auto; border-radius: 15px; max-width: 800px; box-shadow: 0 4px 15px rgba(0,0,0,0.2);}
.favorites-container {display: flex; justify-content: space-around; flex-wrap: wrap; gap: 20px;margin-top: 20px;}
.likes, .dislikes {background: rgba(255,182,193,0.4); padding: 20px; border-radius: 15px; flex: 1 1 300px;}
.likes h3, .dislikes h3 {color: #b22222; margin-bottom: 15px;}
.likes ul, .dislikes ul, .top5-section ol {text-align: left; font-size: 1.1rem; line-height: 1.5; padding-left: 20px;}
.top5-section h2 {color: #b22222; text-shadow: 1px 1px 3px rgba(0,0,0,0.2); margin-bottom: 20px;}

.hidden {display: none;}

.love-story { margin: 40px auto; max-width: 800px; background: #fff0f6; padding: 25px 30px; border-radius: 20px; box-shadow: 0 5px 20px rgba(255, 105, 180, 0.3); font-family: "Georgia", serif; line-height: 1.7; color: #444; animation: fadeIn 1.5s ease-in-out;}
.love-story h2 {text-align: center; color: #b22222; margin-bottom: 20px; font-size: 28px;}
.story-entry {margin-bottom: 30px;}
.story-entry h3 {color: #ff4d6d; margin-bottom: 10px; font-size: 20px;}
.story-entry p {font-size: 18px; margin-bottom: 12px;}
.final-thanks {text-align: center; font-weight: bold; font-size: 20px; color: #d6336c;}
@keyframes fadeIn {from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); }}


































/* --- Адаптация под Samsung S23 FE --- */
@media screen and (max-width: 480px) {
    .title-love { font-size: 1.6rem; padding: 10px; height: auto; text-align: center; }
    .untitle-love { font-size: 0.95rem; margin-top: 5px; text-align: center; }
    .img-love { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-top: 15px; }
    .imglove { height: 110px; border-radius: 10px; object-fit: cover; }
    .love-video { max-width: 100%; height: auto; border-radius: 10px; }
    .video-slider .slider-track { display: flex; overflow-x: auto; scroll-behavior: smooth; }
    .video-slider .slider-track video { flex: 0 0 auto; width: 85%; margin-right: 10px; }
    .slider-btn { display: none; }
    footer { font-size: 0.9rem; padding: 12px; text-align: center; }
    .days-together { font-size: 0.9rem; text-align: center; }
    .game-container img.photo { width: 100%; height: auto; border-radius: 10px; }
    .options button, .next-btn { padding: 8px 10px; font-size: 0.85rem; margin: 4px; border-radius: 8px; }
    .scrollTop { padding: 10px; font-size: 16px; right: 15px; bottom: 15px; }
    .love-story { padding: 15px; font-size: 0.9rem; }
    .love-story h2 { font-size: 1.4rem; }
    .story-entry h3 { font-size: 1.1rem; }
}

/* --- Адаптация под iPhone 11 Pro --- */
@media screen and (max-width: 414px) {
    .title-love { font-size: 1.8rem; padding: 10px; height: auto; text-align: center; }
    .untitle-love { font-size: 1rem; margin-top: 5px; text-align: center; }
    .img-love { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 15px; }
    .imglove { height: 120px; border-radius: 10px; object-fit: cover; }
    .love-video { max-width: 100%; height: auto; border-radius: 10px; }
    .video-slider .slider-track { display: flex; overflow-x: auto; scroll-behavior: smooth; }
    .video-slider .slider-track video { flex: 0 0 auto; width: 90%; margin-right: 10px; }
    .slider-btn { display: none; }
    footer { font-size: 0.9rem; padding: 12px; text-align: center; }
    .days-together { font-size: 1rem; text-align: center; }
    .game-container img.photo { width: 100%; height: auto; border-radius: 10px; }
    .options button, .next-btn { padding: 8px 10px; font-size: 0.85rem; margin: 4px; border-radius: 8px; }
    .scrollTop { padding: 10px; font-size: 16px; right: 15px; bottom: 15px; }
    .love-story { padding: 15px; font-size: 0.9rem; }
    .love-story h2 { font-size: 1.5rem; }
    .story-entry h3 { font-size: 1.1rem; }
}