/* ===== ГЛАВНАЯ СТРАНИЦА ===== */

/* ===== НОВЫЙ КРАСОЧНЫЙ АНИМИРОВАННЫЙ ФОН ===== */
.home-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(255, 50, 50, 0.15), transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 100, 50, 0.12), transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(200, 50, 255, 0.08), transparent 50%),
        radial-gradient(ellipse at 10% 90%, rgba(255, 200, 50, 0.06), transparent 40%),
        radial-gradient(ellipse at 90% 70%, rgba(50, 200, 255, 0.05), transparent 40%),
        #0a0508;
}

/* ===== ОРБЫ С БОЛЬШЕЙ НАСЫЩЕННОСТЬЮ ===== */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: orbFloat 25s ease-in-out infinite;
    will-change: transform;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #ff4444, #ff6b6b, transparent 70%);
    top: -150px;
    right: -100px;
    animation-delay: 0s;
    animation-duration: 22s;
    opacity: 0.6;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #ff6b35, #ff4444, transparent 70%);
    bottom: 50px;
    left: -100px;
    animation-delay: -6s;
    animation-duration: 26s;
    opacity: 0.5;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #ff0080, #ff4444, transparent 70%);
    top: 40%;
    left: 30%;
    animation-delay: -12s;
    animation-duration: 20s;
    opacity: 0.35;
}

.orb-4 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, #ffaa00, #ff6b35, transparent 70%);
    bottom: 30%;
    right: 10%;
    animation-delay: -18s;
    animation-duration: 28s;
    opacity: 0.3;
}

.orb-5 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, #ff3399, #ff0080, transparent 70%);
    top: 15%;
    left: 55%;
    animation-delay: -8s;
    animation-duration: 30s;
    opacity: 0.25;
}

/* ===== ПАРЯЩИЕ ЧАСТИЦЫ ===== */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.6), transparent);
    border-radius: 50%;
    animation: particleFloat linear infinite;
    opacity: 0;
}

.particle:nth-child(1) { left: 10%; animation-duration: 18s; animation-delay: 0s; width: 3px; height: 3px; }
.particle:nth-child(2) { left: 20%; animation-duration: 22s; animation-delay: 2s; width: 5px; height: 5px; }
.particle:nth-child(3) { left: 30%; animation-duration: 16s; animation-delay: 4s; width: 2px; height: 2px; }
.particle:nth-child(4) { left: 40%; animation-duration: 20s; animation-delay: 1s; width: 4px; height: 4px; }
.particle:nth-child(5) { left: 50%; animation-duration: 24s; animation-delay: 3s; width: 6px; height: 6px; }
.particle:nth-child(6) { left: 60%; animation-duration: 19s; animation-delay: 5s; width: 3px; height: 3px; }
.particle:nth-child(7) { left: 70%; animation-duration: 21s; animation-delay: 2s; width: 4px; height: 4px; }
.particle:nth-child(8) { left: 80%; animation-duration: 17s; animation-delay: 4s; width: 2px; height: 2px; }
.particle:nth-child(9) { left: 90%; animation-duration: 23s; animation-delay: 1s; width: 5px; height: 5px; }
.particle:nth-child(10) { left: 15%; animation-duration: 25s; animation-delay: 3s; width: 3px; height: 3px; }
.particle:nth-child(11) { left: 45%; animation-duration: 20s; animation-delay: 0s; width: 4px; height: 4px; }
.particle:nth-child(12) { left: 75%; animation-duration: 22s; animation-delay: 2s; width: 6px; height: 6px; }
.particle:nth-child(13) { left: 5%; animation-duration: 28s; animation-delay: 5s; width: 2px; height: 2px; }
.particle:nth-child(14) { left: 95%; animation-duration: 18s; animation-delay: 3s; width: 3px; height: 3px; }
.particle:nth-child(15) { left: 55%; animation-duration: 26s; animation-delay: 1s; width: 5px; height: 5px; }

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

/* ===== АНИМАЦИЯ ОРБОВ ===== */
@keyframes orbFloat {
    0%, 100% { 
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    20% { 
        transform: translate(40px, -60px) scale(1.1) rotate(5deg);
    }
    40% { 
        transform: translate(-30px, 40px) scale(0.9) rotate(-3deg);
    }
    60% { 
        transform: translate(50px, 30px) scale(1.05) rotate(7deg);
    }
    80% { 
        transform: translate(-20px, -30px) scale(0.95) rotate(-5deg);
    }
}

/* ===== ДОПОЛНИТЕЛЬНЫЙ ЭФФЕКТ МЕРЦАНИЯ ===== */
@keyframes pulseGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.orb-1 { animation-name: orbFloat, pulseGlow; animation-duration: 22s, 4s; }
.orb-2 { animation-name: orbFloat, pulseGlow; animation-duration: 26s, 5s; }
.orb-3 { animation-name: orbFloat, pulseGlow; animation-duration: 20s, 3.5s; }
.orb-4 { animation-name: orbFloat, pulseGlow; animation-duration: 28s, 4.5s; }
.orb-5 { animation-name: orbFloat, pulseGlow; animation-duration: 30s, 6s; }

/* ===== Приветствие ===== */
.home-greeting {
    position: relative;
    z-index: 1;
    padding: 40px 0 20px 0;
    text-align: center;
}

.greeting-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.greeting-text.show {
    opacity: 1;
    transform: translateY(0);
}

.greeting-emoji {
    font-size: 40px;
    animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    75% { transform: rotate(-10deg); }
}

.greeting-text h1 {
    font-size: 32px;
    font-weight: 300;
    color: #f5edf0;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.greeting-text h1 strong {
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b6b, #e63946);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(255, 50, 50, 0.2));
}

.greeting-sub {
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    margin-top: 6px;
    letter-spacing: 0.3px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.greeting-sub.show {
    opacity: 1;
    transform: translateY(0);
}

/* ===== КНОПКИ ===== */
.home-actions {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 0 30px 0;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.home-actions.shifted {
    justify-content: flex-start;
    padding-left: 10px;
    gap: 10px;
}

/* ===== КНОПКА ПЛЕЙ ===== */
.btn-play {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #ff6b6b, #e63946);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 8px 30px rgba(255, 50, 50, 0.3),
        inset 0 -2px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    flex-shrink: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.btn-play::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.4), rgba(230, 57, 70, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.6;
}

.btn-play::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.15), transparent 60%);
    pointer-events: none;
}

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

.btn-play i {
    font-size: 28px;
    transition: all 0.3s ease;
    position: absolute;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.btn-play.playing i {
    opacity: 0;
    transform: scale(0.5);
}

/* ===== ВИЗУАЛИЗАТОР ===== */
.visualizer {
    display: none;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    height: 36px;
    padding: 0 4px;
    opacity: 0;
    transition: opacity 0.4s ease;
    position: relative;
    z-index: 1;
}

.btn-play.playing .visualizer {
    display: flex;
    opacity: 1;
}

.visualizer span {
    display: block;
    width: 5px;
    background: #fff;
    border-radius: 4px;
    animation: vizAnim 0.6s ease-in-out infinite alternate;
    transform-origin: bottom;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.2);
}

.visualizer span:nth-child(1) { height: 12px; animation-delay: 0s; }
.visualizer span:nth-child(2) { height: 24px; animation-delay: 0.1s; }
.visualizer span:nth-child(3) { height: 36px; animation-delay: 0.2s; }
.visualizer span:nth-child(4) { height: 28px; animation-delay: 0.15s; }
.visualizer span:nth-child(5) { height: 18px; animation-delay: 0.25s; }
.visualizer span:nth-child(6) { height: 8px; animation-delay: 0.05s; }

@keyframes vizAnim {
    0% { transform: scaleY(0.3); opacity: 0.4; }
    100% { transform: scaleY(1); opacity: 1; }
}

/* ===== КНОПКА ПРЕДПОЧТЕНИЙ ===== */
.btn-preferences {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    color: #ccb5b5;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-shrink: 0;
    opacity: 0;
    transform: scale(0.8) translateX(-20px);
    pointer-events: none;
    -webkit-font-smoothing: antialiased;
    backface-visibility: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-preferences.show {
    opacity: 1;
    transform: scale(1) translateX(0);
    pointer-events: auto;
}

.btn-preferences:active {
    transform: scale(0.92);
}

.btn-preferences::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.btn-preferences i {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* ===== ПРЕДПОЧТЕНИЯ (ДРОПДАУН) ===== */
.preferences-dropdown {
    position: relative;
    z-index: 3;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.5s ease,
                transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    transform: translateY(-10px);
    margin: 0 10px;
}

.preferences-dropdown.open {
    max-height: 500px;
    opacity: 1;
    transform: translateY(0);
}

.pref-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    margin: 4px 0;
    background: rgba(30, 15, 18, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 50, 50, 0.06);
    border-radius: 16px;
    color: #d0c0c0;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: left center;
    opacity: 0;
    transform: scale(0.9) translateX(-10px);
    -webkit-font-smoothing: antialiased;
    backface-visibility: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
}

.pref-item::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.08), transparent 60%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.pref-item.show {
    opacity: 1;
    transform: scale(1) translateX(0);
}

.pref-item:active {
    transform: scale(0.97);
    background: rgba(255, 50, 50, 0.1);
}

.pref-item i {
    color: #ff6b6b;
    font-size: 20px;
    width: 28px;
    text-align: center;
    filter: drop-shadow(0 2px 4px rgba(255, 50, 50, 0.2));
}

.pref-item:hover {
    background: rgba(255, 50, 50, 0.05);
}

.pref-item.selected {
    background: rgba(255, 50, 50, 0.12);
    border-color: rgba(255, 50, 50, 0.2);
    box-shadow: 0 0 30px rgba(255, 50, 50, 0.05);
}

/* ===== ТОСТ ===== */
.pref-toast {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(20, 8, 10, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 12px 24px;
    border-radius: 30px;
    border: 1px solid rgba(255, 50, 50, 0.2);
    color: #f5edf0;
    font-size: 14px;
    z-index: 200;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    -webkit-font-smoothing: antialiased;
    backface-visibility: hidden;
}

.pref-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== АДАПТИВ ===== */
@media (max-width: 420px) {
    .greeting-text h1 {
        font-size: 26px;
    }
    .greeting-emoji {
        font-size: 32px;
    }
    .btn-play {
        width: 64px;
        height: 64px;
        font-size: 24px;
    }
    .btn-play i {
        font-size: 24px;
    }
    .btn-preferences {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
    .visualizer {
        height: 30px;
        gap: 3px;
    }
    .visualizer span {
        width: 4px;
    }
    .pref-item {
        padding: 12px 16px;
        font-size: 14px;
    }
    .home-actions {
        padding: 16px 0 20px 0;
    }
    .orb-1 { width: 300px; height: 300px; }
    .orb-2 { width: 250px; height: 250px; }
    .orb-3 { width: 200px; height: 200px; }
    .orb-4 { width: 180px; height: 180px; }
    .orb-5 { width: 150px; height: 150px; }
}