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

body {
    min-height: 100vh;
    background: #0a0a1a;
    font-family: 'Segoe UI', 'Poppins', 'Quicksand', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow-x: hidden;
    position: relative;
}

/* Переливающийся градиентный фон */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: linear-gradient(125deg, 
        #0a0a1a 0%,
        #1a0a2e 25%,
        #2a0a3e 50%,
        #1a0a2e 75%,
        #0a0a1a 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    opacity: 0.8;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Фоновый визуализатор */
.background-visualizer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    overflow: hidden;
}

#bgCanvas {
    width: 100vw;
    height: 100vh;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

/* Контейнер с милыми частицами */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
    overflow: hidden;
}

/* Вспышка */
.flash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(180, 100, 255, 0.6) 0%, rgba(255, 100, 200, 0.3) 100%);
    pointer-events: none;
    z-index: 15;
    opacity: 0;
    transition: opacity 0.05s ease;
}

.flash-overlay.active {
    opacity: 1;
    animation: flashFade 0.15s ease-out forwards;
}

@keyframes flashFade {
    0% { opacity: 0.8; }
    100% { opacity: 0; }
}

/* Основной контент */
.content {
    position: relative;
    z-index: 20;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Карточка плеера - неоновая тема */
.player-card {
    background: rgba(10, 10, 30, 0.75);
    backdrop-filter: blur(20px);
    border-radius: 48px;
    padding: 48px 40px;
    width: 100%;
    max-width: 550px;
    box-shadow: 0 20px 60px rgba(180, 100, 255, 0.2), 
                0 0 0 1px rgba(180, 100, 255, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    animation: cardFloat 3s ease-in-out infinite;
    border: 1px solid rgba(180, 100, 255, 0.4);
}

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

/* Квадратик со словами */
.word-box {
    position: relative;
    background: linear-gradient(135deg, rgba(20, 10, 40, 0.8) 0%, rgba(30, 15, 50, 0.8) 100%);
    border-radius: 32px;
    padding: 48px 24px;
    margin-bottom: 40px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(180, 100, 255, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(180, 100, 255, 0.4);
    transition: all 0.3s ease;
}

.word-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(180, 100, 255, 0.2);
    border-color: rgba(180, 100, 255, 0.7);
}

.dynamic-word {
    font-size: clamp(3rem, 10vw, 5.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, #c084fc 0%, #a855f7 30%, #ec4899 70%, #f472b6 100%);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 2;
    animation: gradientShift 3s ease infinite, textGlow 2s ease-in-out infinite;
}

@keyframes textGlow {
    0%, 100% { filter: drop-shadow(0 0 5px rgba(168, 85, 247, 0.5)); }
    50% { filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.9)); }
}

.word-pop {
    animation: wordPop 0.4s cubic-bezier(0.34, 1.3, 0.55, 1);
}

@keyframes wordPop {
    0% { transform: scale(0.95) rotate(-2deg); opacity: 0.7; }
    50% { transform: scale(1.08) rotate(2deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.word-shadow {
    position: absolute;
    bottom: -10px;
    left: 10%;
    width: 80%;
    height: 20px;
    background: radial-gradient(ellipse, rgba(168, 85, 247, 0.2) 0%, transparent 70%);
    filter: blur(8px);
    z-index: 1;
}

/* Элементы управления */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.play-btn {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    border: none;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.4), 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    position: relative;
    overflow: hidden;
}

.play-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.play-btn:hover::before {
    left: 100%;
}

.play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 15px 40px rgba(168, 85, 247, 0.6);
}

.play-btn:active {
    transform: scale(0.96);
}

.play-icon {
    font-size: 36px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Регулировка громкости */
.volume-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 20px auto;
    padding: 10px 20px;
    background: rgba(30, 20, 50, 0.6);
    border-radius: 60px;
    backdrop-filter: blur(8px);
    width: fit-content;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.volume-icon {
    font-size: 18px;
    color: #c084fc;
}

.volume-slider {
    width: 150px;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(168, 85, 247, 0.3);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
}

.volume-value {
    font-size: 12px;
    color: #c084fc;
    min-width: 40px;
    text-align: center;
}

.track-name {
    text-align: center;
    font-size: 0.9rem;
    color: #c084fc;
    background: rgba(30, 20, 50, 0.6);
    backdrop-filter: blur(8px);
    width: fit-content;
    margin: 20px auto 0;
    padding: 8px 20px;
    border-radius: 60px;
    font-weight: 500;
    letter-spacing: 0.3px;
    border: 1px solid rgba(168, 85, 247, 0.3);
    animation: gentlePulse 2s ease-in-out infinite;
}

@keyframes gentlePulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Милые индикаторы */
.cute-indicators {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.cute-dot {
    font-size: 20px;
    animation: bounce 1s ease-in-out infinite;
    display: inline-block;
}

.cute-dot:nth-child(1) { animation-delay: 0s; }
.cute-dot:nth-child(2) { animation-delay: 0.15s; }
.cute-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes bounce {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-8px) scale(1.2); }
}

/* Адаптивность */
@media (max-width: 600px) {
    .player-card {
        padding: 32px 24px;
        border-radius: 36px;
    }
    
    .word-box {
        padding: 32px 20px;
        margin-bottom: 30px;
    }
    
    .play-btn {
        width: 65px;
        height: 65px;
    }
    
    .play-icon {
        font-size: 28px;
    }
    
    .volume-slider {
        width: 100px;
    }
}

/* Анимация для карточки при проигрывании */
.player-card.playing {
    animation: cardPulse 0.8s ease-in-out infinite;
}

@keyframes cardPulse {
    0%, 100% { box-shadow: 0 20px 60px rgba(168, 85, 247, 0.2), 0 0 0 1px rgba(168, 85, 247, 0.3); }
    50% { box-shadow: 0 20px 60px rgba(168, 85, 247, 0.5), 0 0 0 2px rgba(168, 85, 247, 0.6); }
}

/* Тряска для бита */
.shake-effect {
    animation: shakeBeat 0.1s ease-in-out 3;
}

@keyframes shakeBeat {
    0%, 100% { transform: translateX(0px) translateY(0px); }
    25% { transform: translateX(-3px) translateY(-3px); }
    75% { transform: translateX(3px) translateY(3px); }
}

/* Анимация ошибки */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}