/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none; /* легкая защита от выделения, но не мешает тексту */
}

body {
    font-family: 'Segoe UI', 'Poppins', system-ui, -apple-system, 'Inter', sans-serif;
    background: radial-gradient(circle at 20% 30%, #0a0f2a, #030617);
    min-height: 100vh;
    color: #f5e9ff;
    position: relative;
    overflow-x: hidden;
}

/* звёздный фон (анимированные звёзды) */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* луна с glow эффектом */
.moon-glow {
    position: fixed;
    top: 15%;
    right: 8%;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, #fff9d0, #ffefb0);
    border-radius: 50%;
    box-shadow: 0 0 60px 20px rgba(255, 240, 150, 0.5), 0 0 120px 40px rgba(255, 220, 100, 0.3);
    z-index: 1;
    opacity: 0.9;
    pointer-events: none;
    filter: blur(2px);
    animation: moonFloat 8s infinite ease-in-out;
}

@keyframes moonFloat {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}

/* основной контент поверх фона */
.app-wrapper {
    position: relative;
    z-index: 10;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1.5rem 2rem;
    backdrop-filter: blur(2px);
}

/* header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 0 1.5rem;
    border-bottom: 1px solid rgba(255, 235, 190, 0.25);
    margin-bottom: 1.2rem;
}

.site-name {
    font-size: 1.8rem;
    font-weight: 500;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #ffe6b0, #ffcb77);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.language-selector select {
    background: #1e243f;
    border: 1px solid #ffdfa5;
    border-radius: 40px;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #fae6c3;
    cursor: pointer;
    outline: none;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
}

.language-selector select:hover {
    background: #2d3457;
    border-color: #ffcf8a;
}

/* приветствие */
.greeting-section {
    margin: 1rem 0 2rem;
}

.greeting-card {
    background: rgba(20, 25, 55, 0.6);
    backdrop-filter: blur(12px);
    border-radius: 40px;
    padding: 2rem 1.8rem;
    text-align: center;
    border: 1px solid rgba(255, 225, 160, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.greeting-text {
    font-size: 1.25rem;
    line-height: 1.6;
    font-weight: 400;
    margin-bottom: 1rem;
    color: #fef0da;
}

.greeting-text:first-child {
    font-size: 1.5rem;
    font-weight: 500;
}

/* плеер */
.player-section {
    margin: 2rem 0;
}

.player-card {
    background: rgba(12, 16, 35, 0.8);
    backdrop-filter: blur(16px);
    border-radius: 48px;
    padding: 1.6rem 1.8rem;
    border: 1px solid rgba(255, 215, 135, 0.4);
    transition: all 0.2s;
}

.now-playing-info {
    text-align: center;
    margin-bottom: 1rem;
}

.track-name-display {
    font-size: 1.4rem;
    font-weight: 600;
    background: linear-gradient(135deg, #ffecbc, #ffd48a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    padding: 0.2rem 0;
    letter-spacing: -0.2px;
}

.player-controls {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1.2rem 0 1rem;
    flex-wrap: wrap;
}

.ctrl-btn {
    background: rgba(35, 40, 70, 0.9);
    border: none;
    border-radius: 60px;
    padding: 0.6rem 1.4rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1rem;
    font-weight: 500;
    color: #ffeecb;
    cursor: pointer;
    transition: 0.2s;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 210, 110, 0.5);
}

.ctrl-btn:hover {
    background: #4b3f7c;
    transform: scale(1.02);
    border-color: #ffdd99;
}

.ctrl-icon {
    font-size: 1.3rem;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.time-current, .time-duration {
    font-size: 0.8rem;
    font-family: monospace;
    background: #0a0e1c;
    padding: 0.2rem 0.5rem;
    border-radius: 30px;
    letter-spacing: 0.5px;
}

.progress-bar-bg {
    flex: 1;
    height: 6px;
    background: #2d2e4a;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #ffcf7a, #ffb347);
    border-radius: 12px;
    transition: width 0.05s linear;
    pointer-events: none;
}

/* список треков */
.tracklist-section {
    margin: 2rem 0 1rem;
}

.tracklist-heading {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
    letter-spacing: -0.3px;
    border-left: 5px solid #ffcf7a;
    padding-left: 1rem;
}

.track-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.track-item {
    background: rgba(25, 30, 60, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 60px;
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(255, 215, 130, 0.3);
}

.track-item:hover {
    background: rgba(55, 60, 105, 0.9);
    transform: translateX(5px);
    border-color: #ffd48a;
}

.track-number {
    font-weight: 600;
    background: #ffcf7a30;
    padding: 0.2rem 0.7rem;
    border-radius: 40px;
    font-size: 0.85rem;
}

.track-title {
    font-size: 1.1rem;
    font-weight: 500;
    flex: 1;
    margin-left: 1rem;
}

.active-track {
    background: linear-gradient(95deg, #493e7c, #2f2860);
    border-left: 6px solid #ffcf7a;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* footer */
.main-footer {
    margin-top: 3rem;
    text-align: center;
    padding: 1.5rem 0.5rem;
    border-top: 1px solid rgba(255, 215, 140, 0.2);
    font-size: 0.95rem;
    font-style: italic;
    color: #ffddb0;
}

/* адаптация мобильная */
@media (max-width: 680px) {
    .app-wrapper {
        padding: 0.8rem 1rem 1.5rem;
    }
    .site-name {
        font-size: 1.4rem;
    }
    .greeting-text {
        font-size: 1rem;
    }
    .greeting-text:first-child {
        font-size: 1.25rem;
    }
    .player-controls {
        gap: 0.8rem;
    }
    .ctrl-btn {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }
    .track-title {
        font-size: 0.95rem;
    }
    .track-item {
        padding: 0.7rem 1rem;
    }
    .moon-glow {
        width: 70px;
        height: 70px;
        right: 5%;
        top: 8%;
        opacity: 0.7;
    }
    .track-name-display {
        font-size: 1.1rem;
    }
}

/* добавим анимированные звёзды через JS динамически, но для эстетики добавим CSS-звёзды? в скрипте создадим */