/* ========================================
   Mehrona Gift Site - Styles
   Modern, Romantic, Glassmorphism Design
   ======================================== */

:root {
    --color-primary: #ff6b9d;
    --color-secondary: #c44569;
    --color-accent: #ffa8cd;
    --color-bg: #fef5f7;
    --color-text: #2d3436;
    --color-text-light: #636e72;
    --color-white: #ffffff;
    --color-glass: rgba(255, 255, 255, 0.25);
    --color-glass-border: rgba(255, 255, 255, 0.18);
    --shadow-sm: 0 2px 10px rgba(255, 107, 157, 0.1);
    --shadow-md: 0 8px 32px rgba(255, 107, 157, 0.15);
    --shadow-lg: 0 15px 50px rgba(255, 107, 157, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
@media (max-width: 768px) {
    .modal-content {
        height: 100vh;
        max-height: 100vh;
        overflow-y: auto;          /* 👈 ВОТ ГДЕ СКРОЛЛ */
        -webkit-overflow-scrolling: touch;
        border-radius: 0;
    }

    .modal-body {
        flex-direction: column;
        height: auto;
    }
}
@media (max-width: 768px) {
    .modal-photo {
        position: relative;   /* 👈 важно */
        padding: 12px;
        background: #f8f9fa;
    }

    .modal-photo img {
        max-height: none;     /* 👈 НЕ ограничиваем */
        width: 100%;
        object-fit: contain;
    }
}
@media (max-width: 768px) {
    .modal-sidebar {
        width: 100%;
        overflow: visible;    /* 👈 скролл НЕ тут */
        max-height: none;
    }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

body.desktop {
    cursor: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Cat Cursor (Desktop Only)
   ======================================== */
.cat-cursor {
    position: fixed;
    width: 40px;
    height: 40px;
    pointer-events: none;
    z-index: 10000;
    display: none;
    transform: translate(-50%, -50%);
}

.cat-svg {
    width: 100%;
    height: 100%;
}

/* Цвета */
.face { fill: #222; }
.ear { fill: #222; }
.eye { fill: #fff; }
.nose { fill: #ff8fa3; }
.tail { stroke: #222; }

/* Hover по интерактивным элементам */
body.cat-hover .eye {
    transform: scaleY(0.3);
    transform-origin: center;
}

body.cat-hover .tail {
    animation: wag 0.4s infinite alternate ease-in-out;
}

/* Клик */
.cat-cursor.clicking {
    transform: translate(-50%, -50%) scale(1.2) rotate(-8deg);
}

/* Desktop only */
@media (min-width: 992px) {
    body.desktop .cat-cursor {
        display: block;
    }
}

@keyframes wag {
    from { transform: rotate(0deg); }
    to   { transform: rotate(15deg); }
}


/* ========================================
   Music Player
   ======================================== */
.music-player {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.music-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 50px rgba(255, 107, 157, 0.4);
}

.music-toggle:active {
    transform: scale(0.95);
}

.music-toggle.playing .play-icon {
    display: none;
}

.music-toggle.playing .pause-icon {
    display: block;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('/assets/img/hero_mehrona.jpg') center/cover no-repeat;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.7), rgba(196, 69, 105, 0.7));
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: float 10s infinite;
}

@keyframes float {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(1);
    }
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
    animation: fadeInUp 1s ease;
}

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

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.title-name {
    display: inline-block;
    animation: bounce 2s ease infinite;
}

.title-heart {
    display: inline-block;
    animation: heartbeat 1.5s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.15); }
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    margin-bottom: 40px;
    opacity: 0.95;
    animation: fadeIn 1.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Social Links */
.social-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 60px;
}

.social-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--color-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--color-glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
    text-decoration: none;
}

.social-btn:hover {
    transform: translateY(-5px) scale(1.1);
    background: rgba(255, 255, 255, 0.4);
    box-shadow: var(--shadow-lg);
}

.social-btn.instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-btn.telegram:hover {
    background: #0088cc;
}

.social-btn.tiktok:hover {
    background: #000000;
}

/* Scroll Down */
.scroll-down {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: var(--transition);
    animation: floatUpDown 2s ease infinite;
}

@keyframes floatUpDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.scroll-down:hover {
    opacity: 0.8;
}

/* ========================================
   Gallery Section
   ======================================== */
.gallery-section {
    padding: 100px 0;
    background: linear-gradient(to bottom, var(--color-bg), #fff5f8);
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    text-align: center;
    margin-bottom: 60px;
    color: var(--color-secondary);
    animation: fadeInUp 0.8s ease;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.photo-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    animation: fadeInScale 0.5s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.photo-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.photo-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: var(--transition);
}

.photo-card:hover img {
    transform: scale(1.05);
}

.photo-info {
    padding: 20px;
}

.photo-reactions {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.reaction-display {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.95rem;
    color: var(--color-text-light);
}

.reaction-display span:first-child {
    font-size: 1.3rem;
}

.photo-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* Loading */
.loading-indicator {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--color-accent);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.no-more {
    text-align: center;
    padding: 40px;
    font-size: 1.2rem;
    color: var(--color-secondary);
}

/* ========================================
   About Section
   ======================================== */
.about-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #ffeef4, #ffe6f0);
}

.about-card {
    max-width: 800px;
    margin: 0 auto;
    background: var(--color-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--color-glass-border);
    border-radius: 30px;
    padding: 60px 40px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 1s ease;
}

.about-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    color: var(--color-secondary);
    margin-bottom: 30px;
}

.about-content p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-content strong {
    color: var(--color-primary);
}

.signature {
    text-align: right;
    font-style: italic;
    color: var(--color-secondary);
    margin-top: 30px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.btn-back:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   Modals
   ======================================== */
.modal, .lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal.active, .lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close, .lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.modal-close:hover, .lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Lightbox */
.lightbox-content {
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
}

/* Photo Modal */
.modal-content {
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    animation: slideUp 0.3s ease;
}

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

.modal-body {
    display: flex;
    height: 80vh;
}

.modal-photo {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    padding: 20px;
}

.modal-photo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.modal-sidebar {
    width: 400px;
    display: flex;
    flex-direction: column;
    background: white;
    overflow-y: auto;
}

/* Reactions Bar */
.reactions-bar {
    display: flex;
    gap: 10px;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.reaction-btn {
    flex: 1;
    padding: 15px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.reaction-btn:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.reaction-btn.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-color: var(--color-primary);
    color: white;
}

.reaction-emoji {
    font-size: 1.5rem;
}

.reaction-count {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Comments Section */
.comments-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.comments-section h3 {
    margin-bottom: 20px;
    color: var(--color-secondary);
}

.comments-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.comment-item {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    animation: fadeInScale 0.3s ease;
}

.comment-author {
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 5px;
}

.comment-body {
    margin-bottom: 5px;
    line-height: 1.5;
}

.comment-date {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment-form input,
.comment-form textarea {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.btn-submit {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Minigame Modal */
.minigame-modal .modal-content {
    max-width: 800px;
    padding: 40px;
}

.minigame-header {
    text-align: center;
    margin-bottom: 30px;
}

.minigame-header h2 {
    color: var(--color-secondary);
    margin-bottom: 10px;
}

.minigame-subtitle {
    color: var(--color-text-light);
}

.minigame-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.minigame-photo {
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    border: 3px solid transparent;
}

.minigame-photo:hover {
    transform: scale(1.05);
}

.minigame-photo.selected {
    border-color: var(--color-primary);
    transform: scale(0.95);
}

.minigame-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.minigame-footer {
    text-align: center;
}

.minigame-counter {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--color-secondary);
}
#minigameModal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
}

#minigameModal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}
.minigame-footer {
    position: sticky;
    bottom: 0;
    background: white;
    padding-top: 12px;
    box-shadow: 0 -8px 20px rgba(0,0,0,0.08);
}
/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .modal-body {
        flex-direction: column;
        height: auto;
    }
    
    .modal-sidebar {
        width: 100%;
        max-height: 50vh;
    }
    
    .social-links {
        gap: 15px;
    }
    
    .social-btn {
        width: 50px;
        height: 50px;
    }
    
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .about-card {
        padding: 40px 30px;
    }
    
    .minigame-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .music-player {
        bottom: 20px;
        right: 20px;
    }
    
    .music-toggle {
        width: 50px;
        height: 50px;
    }
    
    .photo-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Like Animation (Double Tap)
   ======================================== */

.like-heart {
    position: absolute;
    top: 50%;
    left: 50%;
    font-size: 90px;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    animation: heartPop 0.9s cubic-bezier(.17,.67,.45,1.32) forwards;
    z-index: 20;
}

@keyframes heartPop {
    0% {
        transform: translate(-50%, -50%) scale(0.2);
        opacity: 0;
    }
    30% {
        transform: translate(-50%, -60%) scale(1.4);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -120%) scale(1);
        opacity: 0;
    }
}


/* ========================================
   Beauty Gate (Age-style Modal)
   ======================================== */

.beauty-gate {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.beauty-card {
    background: white;
    border-radius: 25px;
    padding: 40px 30px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0,0,0,0.3);
    animation: beautyPop 0.4s ease;
}

.beauty-card h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #c44569;
}

.beauty-card p {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.beauty-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.beauty-btn {
    padding: 14px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.beauty-btn.primary {
    background: linear-gradient(135deg, #ff6b9d, #ffa8cd);
    color: white;
}

.beauty-btn.secondary {
    background: #f1f2f6;
    color: #2d3436;
}

.beauty-btn:hover {
    transform: translateY(-2px) scale(1.03);
}

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


/* ========================================
   Beauty Gate FIX
   ======================================== */

.beauty-gate {
    display: none; /* по умолчанию скрыт */
}

.beauty-gate.active {
    display: flex; /* показываем когда active */
    overflow-y: auto; /* 👈 ВАЖНО: можно прокручивать */
}

.beauty-card {
    margin: auto; /* 👈 центрируем */
}

/* ========================================
   Minigame Modal FIX - добавить прокрутку
   ======================================== */

#minigameModal {
    overflow-y: auto; /* 👈 можно прокручивать */
}

#minigameModal .modal-content {
    margin: 20px auto; /* 👈 отступы сверху/снизу */
    max-height: none; /* 👈 убираем ограничение высоты */
}
/* Анимация скрытия */
.beauty-gate.hiding {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}
