/* ========================================
   MUUDM.RU - Основные стили
   ======================================== */

:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: #252542;
    --bg-hover: #2d2d4a;
    --accent-primary: #8b5cf6;
    --accent-secondary: #06b6d4;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --border-radius: 12px;
    --player-height: 80px;
    --header-height: 70px;
}

/* === ОБНУЛЕНИЕ === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    color: var(--text-main);
    min-height: 100vh;
    padding-bottom: var(--player-height);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-primary);
}

ul {
    list-style: none;
}

/* === ШАПКА === */
.header {
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    height: var(--header-height);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    display: flex;
    flex-direction: column;
}

.logo span {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 1px;
    -webkit-text-fill-color: var(--text-muted);
}

.nav-menu {
    display: flex;
    gap: 25px;
}

.nav-menu a {
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    font-size: 14px;
}

.nav-menu a:hover {
    background: rgba(139, 92, 246, 0.2);
    color: var(--accent-primary);
}

.auth-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn {
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
}

.btn-outline:hover {
    background: var(--accent-primary);
    color: white;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* === ОСНОВНОЙ КОНТЕНТ === */
#app-content {
    min-height: calc(100vh - var(--header-height) - var(--player-height));
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Загрузчик */
.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: var(--text-muted);
}

.loader i {
    font-size: 48px;
    color: var(--accent-primary);
    margin-bottom: 15px;
}

/* Ошибка */
.error {
    text-align: center;
    padding: 50px;
    color: var(--text-muted);
}

/* === ГЛАВНЫЙ БАННЕР === */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.15), transparent);
    border-radius: var(--border-radius);
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 15px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.hero .btn {
    margin: 0 10px;
}

/* === СЕТКА КОНТЕНТА === */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
    border-color: var(--accent-primary);
}

.card-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.card-artist {
    color: var(--text-muted);
    font-size: 13px;
}

/* ========================================
   GHOST PLAYER STYLES v2.0 👻
   ======================================== */

.player-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    background: rgba(20, 20, 35, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px 20px 0 0;
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: var(--player-height);
    
    /* Ghost Mode по умолчанию */
    opacity: 0.15;
    box-shadow: none;
}

.player-container:hover,
.player-container:active {
    opacity: 1 !important;
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.4), 
                0 0 60px rgba(139, 92, 246, 0.15) !important;
    transform: scale(1.02) !important;
}

.player-container.player-expanded {
    height: 480px !important;
    opacity: 1 !important;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.4) !important;
    transform: none !important;
}

/* Бар плеера */
.player-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
    height: var(--player-height);
    cursor: grab;
    user-select: none;
    position: relative;
    z-index: 2;
}

.player-bar:active {
    cursor: grabbing;
}

/* Информация о треке */
.player-info-mini {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 35%;
    min-width: 200px;
    max-width: 300px;
}

.player-cover-mini {
    width: 55px;
    height: 55px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--bg-card);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.player-cover-mini:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.player-text-mini div:first-child {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    color: var(--text-main);
}

.player-text-mini div:last-child {
    font-size: 13px;
    color: var(--text-muted);
}

/* Контролы */
.player-controls-mini {
    display: flex;
    align-items: center;
    gap: 18px;
}

.p-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 10px;
    border-radius: 50%;
    position: relative;
}

.p-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3), transparent 70%);
    opacity: 0;
    transition: opacity 0.2s;
}

.p-btn:hover {
    color: var(--text-main);
    transform: scale(1.1);
}

.p-btn:hover::after {
    opacity: 1;
}

.play-pause {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.4);
    transition: all 0.2s ease;
}

.play-pause:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.6);
}

.play-pause:active {
    transform: scale(0.95);
}

/* Громкость */
.volume-control-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 20%;
    justify-content: flex-end;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.volume-control-mini:hover {
    opacity: 1;
}

.volume-control-mini input[type="range"] {
    width: 90px;
    accent-color: var(--accent-primary);
    cursor: pointer;
    height: 4px;
}

/* Полный вид плеера */
.player-full {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    height: 400px;
    position: relative;
    z-index: 1;
}

.player-full-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    color: var(--text-muted);
}

.player-full-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 500px;
}

.player-cover-full {
    width: 220px;
    height: 220px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
    background: var(--bg-card);
    transition: all 0.4s ease;
}

.player-cover-full:hover {
    transform: scale(1.03);
    box-shadow: 0 25px 70px rgba(139, 92, 246, 0.4);
}

.player-full-info {
    text-align: center;
    margin-bottom: 30px;
}

.player-full-info h2 {
    font-size: 22px;
    margin-bottom: 8px;
    color: var(--text-main);
}

.player-full-info p {
    color: var(--text-muted);
    font-size: 15px;
}

/* Прогресс бар */
.progress-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    color: var(--text-muted);
    font-size: 13px;
}

.progress-container input[type="range"] {
    flex: 1;
    accent-color: var(--accent-primary);
    cursor: pointer;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
}

.progress-container input[type="range"]::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.progress-container input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--accent-secondary);
}

/* Контролы полного плеера */
.player-full-controls {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
}

.play-pause-large {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.5);
    transition: all 0.2s ease;
}

.play-pause-large:hover {
    transform: scale(1.08);
    box-shadow: 0 15px 50px rgba(139, 92, 246, 0.7);
}

.play-pause-large:active {
    transform: scale(0.98);
}

/* Громкость в полном режиме */
.volume-container {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 13px;
}

.volume-container input[type="range"] {
    width: 120px;
    accent-color: var(--accent-primary);
}

/* Адаптив */
@media (max-width: 768px) {
    .player-container {
        border-radius: 16px 16px 0 0;
    }
    
    .player-bar {
        padding: 0 15px;
    }
    
    .player-info-mini {
        width: 55%;
    }
    
    .player-text-mini div:first-child {
        max-width: 120px;
        font-size: 14px;
    }
    
    .player-controls-mini .p-btn:not(.play-pause):not(:last-child) {
        display: none;
    }
    
    .volume-control-mini {
        display: none;
    }
    
    .player-full {
        height: 420px;
    }
    
    .player-cover-full {
        width: 180px;
        height: 180px;
    }
}

/* Анимации */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

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

/* Утилиты */
.player-container.dragging {
    cursor: grabbing !important;
    opacity: 0.9 !important;
    transition: none !important;
}

/* === АДАПТИВ (Планшеты и Мобильные) === */
@media (max-width: 992px) {
    .nav-menu {
        gap: 15px;
    }
    
    .volume-control-mini {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 15px;
    }
    
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 20px;
        gap: 10px;
        display: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .auth-buttons {
        gap: 8px;
    }
    
    .auth-buttons .btn {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    .logo {
        font-size: 22px;
    }
    
    .logo span {
        font-size: 10px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero p {
        font-size: 14px;
    }
    
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .card-image {
        height: 130px;
        font-size: 36px;
    }
    
    .player-info-mini {
        width: 50%;
    }
    
    .player-text-mini div:first-child {
        max-width: 100px;
        font-size: 13px;
    }
    
    .player-controls-mini .p-btn:not(.play-pause):not(:nth-child(4)) {
        display: none;
    }
    
    .player-full {
        height: 350px;
    }
    
    .player-cover-full {
        width: 160px;
        height: 160px;
    }
}

@media (max-width: 480px) {
    .auth-buttons .btn span {
        display: none;
    }
    
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .player-container.player-expanded {
        height: 380px;
    }
}

/* === ФОРМЫ (для страниц входа/регистрации) === */
.form-container {
    max-width: 400px;
    margin: 50px auto;
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--accent-primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: var(--text-main);
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.form-submit {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
}