:root { 
    --smm-accent: #04ACB4; 
    --smm-dark: #0C0C0C;   
    --smm-text: #fff;
    --smm-sub: #888;
}

/* === ОБЩИЕ СТИЛИ (ГРИД) === */
.smm-front-wrap { width: 100%; position: relative; z-index: 10; }
.smm-front-wrap * { box-sizing: border-box; }
.smm-view-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 30px 20px; }

.smm-card { display: flex; flex-direction: column; cursor: pointer !important; z-index: 1; position: relative; }
.smm-card-cover { width: 100%; aspect-ratio: 1/1; background: #222; border-radius: 8px; overflow: hidden; margin-bottom: 12px; position: relative; }
.smm-card:hover .smm-card-cover { transform: translateY(-4px); transition: 0.2s; }
.smm-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.smm-card-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center; opacity: 0; transition: 0.2s; }
.smm-card:hover .smm-card-overlay { opacity: 1; }

.smm-btn-play { 
    width: 44px; height: 44px; background: var(--smm-accent); border-radius: 50%; color: #fff; 
    display: flex; align-items: center; justify-content: center; 
}
.smm-btn-play svg { width: 24px; height: 24px; }

.smm-card-title { font-weight: 700; font-size: 14px; color: #1e293b; margin-bottom: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.smm-card-tags { font-size: 11px; color: #64748b; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.smm-card-meta { margin-top: auto; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #e2e8f0; padding-top: 8px; }
.smm-price { font-weight: 700; font-size: 13px; color: #1e293b; }
.smm-btn-text { border: 1px solid #ccc; border-radius: 4px; color: #666; font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 4px 10px; text-decoration: none; }
.smm-btn-text:hover { border-color: var(--smm-accent); color: var(--smm-accent); }

/* =========================================
   === ФИНАЛЬНЫЙ ДИЗАЙН ПЛЕЕРА ===
   ========================================= */

#smm-sticky-player {
    position: fixed; bottom: 0; left: 0; width: 100%; height: 72px;
    background: var(--smm-dark); 
    color: var(--smm-text);
    z-index: 2147483647 !important;
    display: none; 
    border-top: 1px solid #1a1a1a;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.8);
    font-family: 'Inter', sans-serif;
    padding: 0 40px; /* Отступы по краям как на референсе */
    box-sizing: border-box;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#smm-sticky-player.active-force { display: flex !important; }

/* КЛАСС ДЛЯ СВОРАЧИВАНИЯ */
#smm-sticky-player.smm-closed {
    transform: translateY(100%);
}

/* ЯЗЫЧОК СВОРАЧИВАНИЯ */
#smm-toggle-player {
    position: absolute;
    top: -24px; /* Высота язычка */
    right: 40px; /* Отступ справа, совпадающий с паддингом */
    width: 40px; height: 24px;
    background: var(--smm-dark);
    border-radius: 6px 6px 0 0;
    border: 1px solid #1a1a1a;
    border-bottom: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: #888;
    transition: color 0.2s;
}
#smm-toggle-player:hover { color: #fff; }
#smm-toggle-player svg { width: 18px; height: 18px; }


.smm-player-container { 
    width: 100%; height: 100%; padding: 0;
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    max-width: 1600px; /* Ограничитель ширины как на сайте */
    margin: 0 auto;
}

/* 1. ЛЕВО (ИНФО) */
.smm-p-left { display: flex; align-items: center; width: 220px; flex-shrink: 0; gap: 15px; }
#smm-player-cover { width: 48px; height: 48px; border-radius: 4px; background: #222; object-fit: cover; }
.smm-p-info { display: flex; flex-direction: column; overflow: hidden; }
.smm-track-title { 
    font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; 
    color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
}
.smm-track-tags { font-size: 11px; color: #666; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; text-transform: uppercase; }

/* 2. ЦЕНТР (КОНТРОЛЫ + ВОЛНА) */
.smm-p-center { 
    flex: 1; display: flex; align-items: center; 
    height: 100%; gap: 25px; max-width: 900px; /* Ограничиваем центр */
}

/* Группа контролов */
.smm-ctrls-group { display: flex; align-items: center; gap: 15px; flex-shrink: 0; }

.smm-ctrl-btn { 
    background: transparent !important; border: none !important; 
    padding: 0; margin: 0; cursor: pointer; 
    display: flex; align-items: center; justify-content: center;
    color: #fff; transition: transform 0.2s;
}
.smm-ctrl-btn:hover { transform: scale(1.1); color: var(--smm-accent); }
.smm-ctrl-btn svg { width: 24px; height: 24px; }
.smm-ctrl-btn.main-play svg { width: 34px; height: 34px; }

/* Таймер */
#smm-current-time, #smm-duration { 
    font-family: monospace; font-size: 12px; color: #666; font-weight: 500; min-width: 35px; text-align: center;
}

/* Волна */
.smm-wave-box { flex: 1; height: 28px; position: relative; min-width: 100px; }
.smm-waveform { width: 100%; height: 100%; opacity: 1; }

/* 3. ДЕЙСТВИЯ СПРАВА */
.smm-p-right { display: flex; align-items: center; gap: 20px; width: auto; justify-content: flex-end; flex-shrink: 0; }

/* Громкость */
.smm-vol-wrap {
    position: relative;
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: #fff; /* Белая иконка как на сайте */
}
.smm-vol-wrap:hover { color: var(--smm-accent); }
.smm-vol-wrap svg { width: 22px; height: 22px; }

/* Выпадающий ползунок */
.smm-vol-slider-container {
    position: absolute;
    bottom: 100%; /* Над иконкой */
    left: 50%; transform: translateX(-50%);
    margin-bottom: 20px;
    width: 36px; height: 110px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    display: none;
    align-items: center; justify-content: center;
    padding: 10px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    z-index: 500;
}
.smm-vol-slider-container:after {
    content: ''; position: absolute; bottom: -5px; left: 50%; margin-left: -5px;
    border-width: 5px 5px 0; border-style: solid;
    border-color: #333 transparent transparent transparent;
}
.smm-vol-wrap:hover .smm-vol-slider-container { display: flex; }

#smm-volume {
    width: 90px; height: 4px;
    transform: rotate(-90deg);
    accent-color: var(--smm-accent);
    cursor: pointer; background: #333;
}

.like-btn { 
    background: none; border: none; padding: 0;
    color: var(--smm-accent);
    font-size: 18px; cursor: pointer; opacity: 0.8; transition: 0.2s;
}
.like-btn:hover { opacity: 1; transform: scale(1.1); }

.smm-cart-btn {
    background: var(--smm-accent); 
    color: #fff; 
    text-decoration: none; 
    font-size: 14px; font-weight: 700; 
    padding: 10px 24px; 
    border-radius: 8px; 
    white-space: nowrap; transition: 0.2s;
    box-shadow: 0 4px 15px rgba(4, 172, 180, 0.2);
}
.smm-cart-btn:hover { 
    background: #039097; 
    box-shadow: 0 4px 20px rgba(4, 172, 180, 0.4);
    transform: translateY(-1px);
}

@media (max-width: 900px) {
    #smm-sticky-player { height: auto; padding: 10px; flex-wrap: wrap; }
    #smm-toggle-player { right: 10px; /* Сдвигаем язычок на мобилке */ }
    
    .smm-player-container { flex-wrap: wrap; justify-content: center; gap: 10px; }
    .smm-p-left { width: 100%; justify-content: center; margin-bottom: 5px; }
    
    .smm-p-center { flex-wrap: wrap; width: 100%; justify-content: center; gap: 10px; }
    .smm-ctrls-group { width: 100%; justify-content: center; margin-bottom: 5px; }
    .smm-vol-wrap { display: none; }
    
    .smm-wave-box { width: 100%; margin: 5px 0; }
    
    .smm-p-right { width: 100%; justify-content: center; }
}