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

html {
    perspective: 1500px;
    -webkit-perspective: 1500px;
}

body {
    font-family: 'Proxima Nova Black', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #000;
    color: white;
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    perspective: 1500px;
    -webkit-perspective: 1500px;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Видео фон с дождем */
.bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2; /* Ниже всех */
    filter: brightness(0.5); /* Более затемнить видео */
    opacity: 0.3; /* Приглушить дождь */
}

/* Темный фон с эффектом поверх видео */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8); /* Более темный оверлей */
    pointer-events: none;
    z-index: -1; /* Поверх видео, но под остальными элементами */
}

/* Glassmorphism класс - полностью прозрачный */
.glass {
    background: rgba(255, 255, 255, 0.02); /* Почти прозрачный */
    backdrop-filter: blur(30px); /* Сильнее размытие */
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1); /* Более прозрачная рамка */
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4); /* Усиленная тень */
}

.btn-glass {
    background: rgba(255, 255, 255, 0.05); /* Более прозрачный для кнопок */
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

/* Звезды */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Эффект дождя (скрыт, так как заменяем на видео) */
.rain-container {
    display: none; /* Скрыть контейнер дождя */
}


/* Сердечки */
.hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
    display: none; /* Изначально скрыты */
}

.heart {
    position: absolute;
    font-size: 2rem;
    color: #ff69b4; /* Розовый цвет для сердечек */
    text-shadow: 0 0 10px rgba(255, 105, 180, 0.7); /* Свечение */
    animation: floatUp 4s ease-out forwards;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0vh) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-100vh) scale(0.5) translateX(var(--random-x)); /* Используем CSS переменную */
    }
}

/* Розовое свечение */
.glow-effect {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 105, 180, 0.6) 0%, rgba(255, 105, 180, 0) 70%);
    filter: blur(80px);
    transform: translate(-50%, -50%);
    opacity: 0;
    z-index: 1;
    transition: width 2s ease-out, height 2s ease-out, opacity 1s ease-out;
}

.glow-effect.active {
    width: 300vh; /* Очень большое, чтобы покрыть экран */
    height: 300vh;
    opacity: 0.7;
}


.main-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    margin: 0 auto;
    justify-content: space-between; /* Распределить элементы по высоте */
    align-items: center;
}

/* Управление музыкой */
.music-control {
    padding: 15px;
    display: none; /* Скрыть интерфейс плеера */
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 800px;
    margin-top: 20px; /* Отступ сверху */
}

.controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-grow: 1; /* Позволяет занимать доступное пространство */
}

.music-control button {
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    border: none;
    background: rgba(255, 255, 255, 0.15); /* Изначальный фон для кнопки */
}

.music-control button:hover {
    background: rgba(255, 255, 255, 0.25);
}

.music-control input[type="range"] {
    width: 100px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.15);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.music-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
}

.music-control input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    border: none;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    min-width: 100px; /* Уменьшаем минимальную ширину */
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.1s;
}

/* Текст песни */
.lyrics-display {
    padding: 30px;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.2rem;
    line-height: 1.6;
    width: 100%;
    max-width: 1000px;
    margin-top: auto;
    margin-bottom: auto;
    min-height: 200px;
    position: relative;
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

#currentLyric {
    font-weight: 900;
    letter-spacing: 1px;
    line-height: 1.8;
    color: white;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    min-height: 1.2em;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    display: inline-block;
    -webkit-font-smoothing: antialiased;
}

/* Карточка */
.card-container {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 450px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 50;
    opacity: 0;
}

#rotatingCard {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}

.card-content {
    position: relative;
    width: 100%;
    height: 100%;
}

.card-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.card-image.active {
    opacity: 1;
}

/* Анимация приближения текста */
@keyframes lyricZoom {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.lyric-beat {
    animation: lyricZoom 0.5s ease-out;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.pulsing-text {
    position: fixed;
    top: 50%;
    left: 50%;
    font-size: 3rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 0 30px rgba(255, 255, 255, 1), 
                 0 0 60px rgba(255, 255, 255, 0.8),
                 0 0 90px rgba(255, 255, 255, 0.6);
    z-index: 100;
    animation: pulse 1.5s ease-in-out infinite;
    text-align: center;
    max-width: 90%;
    cursor: pointer;
    user-select: none;
}

/* Адаптивность */
@media (max-width: 768px) {
    .lyrics-display {
        font-size: 1.2rem;
        padding: 15px;
    }
    .music-control {
        flex-direction: column;
        gap: 10px;
    }
    .controls {
        width: 100%;
    }
    .card-container {
        width: 300px;
        height: 450px;
    }
}

@media (max-width: 480px) {
    .lyrics-display {
        font-size: 1rem;
    }
    .music-control label, .music-control button {
        padding: 6px 12px;
        font-size: 12px;
    }
    .card-container {
        width: 250px;
        height: 375px;
    }
}