/* Reset и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #121212;
    --bg-tertiary: #1a1a1a;
    --bg-hover: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-tertiary: #6a6a6a;
    --accent-red: #ff2a2a;
    --accent-dark: #cc0000;
    --player-height-mobile: 100px;
    --player-height-desktop: 90px;
    --header-height: 80px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --border-radius: 8px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Roboto', sans-serif;
    overflow-x: hidden;
    height: 100vh;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
}

/* Анимированный фон */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 42, 42, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 42, 42, 0.02) 0%, transparent 50%),
        linear-gradient(135deg, #0a0a0a 0%, #1a0a0a 100%);
    z-index: -2;
    animation: pulse 20s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255, 42, 42, 0.05) 1px, transparent 1px),
        radial-gradient(circle at 90% 80%, rgba(255, 42, 42, 0.03) 1px, transparent 1px);
    background-size: 50px 50px, 100px 100px;
    animation: particlesMove 100s linear infinite;
}

@keyframes particlesMove {
    0% { background-position: 0 0, 0 0; }
    100% { background-position: 1000px 1000px, 500px 500px; }
}

/* Контейнер приложения */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding-bottom: var(--player-height-desktop);
}

/* Шапка */
.main-header {
    height: var(--header-height);
    background: linear-gradient(180deg, rgba(10,10,10,0.95) 0%, rgba(10,10,10,0.8) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0 var(--spacing-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.band-name {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 900;
    background: linear-gradient(45deg, var(--accent-red), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    text-transform: uppercase;
    line-height: 1.2;
}

.band-tagline {
    color: var(--text-secondary);
    font-size: clamp(0.7rem, 2.5vw, 0.9rem);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* ========== КНОПКА ДОНАТОВ ========== */
.donate-btn {
    background: linear-gradient(45deg, var(--accent-red), #ff6b6b);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(255, 42, 42, 0.3);
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: rgba(255, 42, 42, 0.3);
    touch-action: manipulation;
}

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

.donate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 42, 42, 0.4);
    background: linear-gradient(45deg, var(--accent-dark), var(--accent-red));
}

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

.donate-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 42, 42, 0.4);
}

.donate-btn i {
    font-size: 1rem;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.donate-text {
    white-space: nowrap;
}

/* Кнопка сканирования */
.scan-btn {
    background: rgba(255, 42, 42, 0.1);
    border: 1px solid rgba(255, 42, 42, 0.3);
    color: var(--accent-red);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    -webkit-tap-highlight-color: rgba(255, 42, 42, 0.3);
    touch-action: manipulation;
}

.scan-btn:hover {
    background: rgba(255, 42, 42, 0.2);
    transform: rotate(180deg);
}

/* ========== ПОИСК ========== */
.header-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.search-container {
    position: relative;
    width: 300px;
    max-width: 100%;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 0.9rem;
    z-index: 2;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 40px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: 'Roboto', sans-serif;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-red);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 2px rgba(255, 42, 42, 0.1);
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 2;
}

.search-clear.visible {
    opacity: 1;
    visibility: visible;
}

.search-clear:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.track-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Основной контент */
.content {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-xl);
    padding-bottom: calc(var(--player-height-desktop) + var(--spacing-lg));
    -webkit-overflow-scrolling: touch;
}

.tracks-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.tracks-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    line-height: 1.2;
}

.tracks-header h2 i {
    color: var(--accent-red);
}

/* Список треков */
.tracks-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-sm);
}

.track-item {
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
    border: 1px solid transparent;
    -webkit-tap-highlight-color: rgba(255, 42, 42, 0.1);
    touch-action: manipulation;
    min-height: 70px;
}

.track-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 42, 42, 0.03), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.track-item:hover, .track-item:active {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    border-color: rgba(255, 42, 42, 0.2);
}

.track-item:hover::before {
    opacity: 1;
}

.track-item.active {
    background: rgba(255, 42, 42, 0.15);
    border-color: var(--accent-red);
}

.track-item.active::before {
    opacity: 1;
    background: linear-gradient(45deg, transparent, rgba(255, 42, 42, 0.15), transparent);
}

.track-item.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 42, 42, 0.05);
    z-index: 1;
}

.track-number {
    color: var(--text-secondary);
    font-size: 0.9rem;
    min-width: 25px;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    z-index: 2;
    position: relative;
}

/* Аватарка трека */
.track-cover {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.track-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.track-item:hover .track-cover img {
    transform: scale(1.05);
}

/* Треугольник воспроизведения на обложке */
.track-playing-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: rgba(255, 42, 42, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 42, 42, 0.5);
    z-index: 3;
}

.track-item.active .track-playing-indicator {
    opacity: 1;
}

.track-playing-indicator::before {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 0 6px 10px;
    border-color: transparent transparent transparent white;
    margin-left: 2px;
}

.track-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    z-index: 2;
    position: relative;
}

.track-title {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1rem;
    line-height: 1.2;
}

.track-artist {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-album {
    color: var(--text-tertiary);
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-duration {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    margin-left: var(--spacing-md);
    flex-shrink: 0;
    z-index: 2;
    position: relative;
}

.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-secondary);
}

.loading i {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    color: var(--accent-red);
}

/* Состояние "ничего не найдено" */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-secondary);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-tertiary);
}

.no-results h3 {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

/* Подсветка поиска */
.search-highlight {
    background-color: rgba(255, 42, 42, 0.3);
    color: var(--accent-red);
    padding: 0 2px;
    border-radius: 2px;
    font-weight: bold;
}

/* ========== ФИКСИРОВАННЫЙ ПЛЕЕР ========== */
.player-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--player-height-desktop);
    background: linear-gradient(180deg, rgba(18,18,18,0.95) 0%, rgba(18,18,18,0.98) 100%);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
    padding: 0 var(--spacing-xl);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
}

.player-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1600px;
    margin: 0 auto;
}

.player-main {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
    width: 100%;
}

.now-playing-cover {
    width: 56px;
    height: 56px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.now-playing-cover:hover {
    transform: scale(1.05);
}

.now-playing-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,42,42,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.now-playing-cover:hover .cover-overlay {
    opacity: 1;
}

.now-playing-info {
    min-width: 200px;
    flex-shrink: 0;
    overflow: hidden;
}

.player-main .track-title {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-main .track-artist {
    color: var(--text-secondary);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-shrink: 0;
}

.control-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    font-size: 1rem;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
    touch-action: manipulation;
}

.control-btn:hover, .control-btn:active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.control-btn.active {
    color: var(--accent-red);
}

.control-btn.play-btn {
    width: 48px;
    height: 48px;
    background: var(--accent-red);
    color: white;
}

.control-btn.play-btn:hover, .control-btn.play-btn:active {
    background: var(--accent-dark);
    transform: scale(1.05);
}

.progress-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    max-width: 600px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.progress-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.05);
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    background: var(--accent-red);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.progress-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 16px;
    height: 16px;
    background: var(--accent-red);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: 0 0 10px rgba(255, 42, 42, 0.5);
}

.progress-bar:hover .progress-thumb,
.progress-bar:active .progress-thumb {
    opacity: 1;
}

.time-current,
.time-total {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
    min-width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.player-extra {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-shrink: 0;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

#volumeIcon {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.volume-slider-container {
    width: 100px;
}

.volume-slider {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent-red);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(255, 42, 42, 0.5);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--accent-red);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 5px rgba(255, 42, 42, 0.5);
}

/* Анимация вращения */
.fa-spin {
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Индикатор на основном плеере */
.playing-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.is-playing .playing-indicator {
    opacity: 1;
}

.equalizer {
    display: flex;
    align-items: flex-end;
    height: 20px;
    gap: 2px;
}

.equalizer .bar {
    width: 3px;
    background: var(--accent-red);
    border-radius: 1px;
    animation: equalizer 1.5s ease-in-out infinite;
}

.equalizer .bar:nth-child(1) { animation-delay: 0s; height: 60%; }
.equalizer .bar:nth-child(2) { animation-delay: 0.2s; height: 80%; }
.equalizer .bar:nth-child(3) { animation-delay: 0.4s; height: 40%; }
.equalizer .bar:nth-child(4) { animation-delay: 0.6s; height: 70%; }

@keyframes equalizer {
    0%, 100% {
        transform: scaleY(1);
    }
    50% {
        transform: scaleY(0.3);
    }
}

/* ========== МОБИЛЬНАЯ ВЕРСИЯ ========== */
@media (max-width: 1200px) {
    .tracks-container {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 900px) {
    .player-main {
        gap: var(--spacing-md);
    }

    .progress-container {
        max-width: 400px;
    }

    .volume-slider-container {
        width: 70px;
    }

    .now-playing-info {
        min-width: 150px;
    }
}

/* Мобильные телефоны (портретная ориентация) */
@media (max-width: 768px) {
    :root {
        --player-height-mobile: 100px;
        --header-height: 70px;
        --spacing-xl: 16px;
        --spacing-lg: 16px;
    }

    .app-container {
        padding-bottom: var(--player-height-mobile);
    }

    .main-header {
        padding: 0 var(--spacing-md);
        height: var(--header-height);
    }

    .header-content {
        flex: 1;
        min-width: 0;
    }

    .band-name {
        font-size: 1.6rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .band-tagline {
        font-size: 0.75rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .header-actions {
        gap: 8px;
    }

    .donate-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
        height: 36px;
    }

    .donate-text {
        display: none;
    }

    .donate-btn i {
        margin: 0;
        font-size: 1rem;
    }

    .scan-btn {
        width: 36px;
        height: 36px;
    }

    .content {
        padding: var(--spacing-md);
        padding-bottom: calc(var(--player-height-mobile) + var(--spacing-md));
    }

    .tracks-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 16px;
    }

    .tracks-header h2 {
        font-size: 1.2rem;
    }

    .header-right {
        width: 100%;
        order: 2;
        margin-top: 0;
    }

    .search-container {
        width: 100%;
    }

    .search-input {
        padding: 10px 36px 10px 36px;
        font-size: 0.85rem;
    }

    #trackCount {
        text-align: right;
        font-size: 0.8rem;
        margin-top: 4px;
    }

    .tracks-container {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .track-item {
        padding: 12px;
        gap: 12px;
        min-height: 65px;
    }

    .track-cover {
        width: 44px;
        height: 44px;
        flex-shrink: 0;
    }

    .track-info {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }

    .track-title {
        font-size: 0.95rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .track-artist {
        font-size: 0.8rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .track-album {
        font-size: 0.75rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .track-duration {
        font-size: 0.8rem;
        margin-left: 8px;
        flex-shrink: 0;
        min-width: 40px;
        text-align: right;
    }

    .track-playing-indicator {
        width: 20px;
        height: 20px;
    }

    .track-playing-indicator::before {
        border-width: 5px 0 5px 8px;
        margin-left: 1px;
    }

    /* ========== КОМПАКТНЫЙ ПЛЕЕР ДЛЯ МОБИЛЬНЫХ ========== */
    .player-wrapper {
        height: var(--player-height-mobile);
        padding: 0;
        background: linear-gradient(180deg, rgba(10,10,10,0.98) 0%, rgba(10,10,10,0.95) 100%);
        border-top: 1px solid rgba(255, 42, 42, 0.3);
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
    }

    .player-container {
        width: 100%;
        height: 100%;
        padding: 0 var(--spacing-md);
    }

    .player-main {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 100%;
        gap: var(--spacing-md);
        width: 100%;
    }

    /* Обложка слева */
    .now-playing-cover {
        width: 60px;
        height: 60px;
        border-radius: 6px;
        border: 2px solid rgba(255, 42, 42, 0.3);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    }

    /* Скрываем название трека и исполнителя на мобильных */
    .now-playing-info {
        display: none;
    }

    /* Кнопки управления по центру */
    .player-controls {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        flex: 1;
        order: 2;
    }

    .control-btn {
        width: 44px;
        height: 44px;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 1rem;
    }

    .control-btn.play-btn {
        width: 50px;
        height: 50px;
        background: var(--accent-red);
        border: none;
        font-size: 1.2rem;
        box-shadow: 0 4px 12px rgba(255, 42, 42, 0.3);
    }

    .control-btn:active {
        background: rgba(255, 42, 42, 0.2);
        transform: scale(0.95);
    }

    .control-btn.play-btn:active {
        background: var(--accent-dark);
        transform: scale(0.95);
    }

    /* Прогресс-бар вверху */
    .progress-container {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        display: flex;
        align-items: center;
        gap: 0;
        max-width: none;
        order: 1;
        width: 100%;
    }

    .progress-bar {
        height: 100%;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 0;
    }

    .progress-fill {
        border-radius: 0;
        height: 100%;
    }

    .progress-thumb {
        display: none;
    }

    /* Время скрываем на мобильных */
    .time-current,
    .time-total {
        display: none;
    }

    /* Дополнительные элементы управления */
    .player-extra {
        display: none;
    }
}

/* Очень маленькие экраны (меньше 360px) */
@media (max-width: 360px) {
    :root {
        --player-height-mobile: 90px;
    }

    .band-name {
        font-size: 1.4rem;
    }

    .track-item {
        padding: 10px;
        gap: 10px;
    }

    .track-cover {
        width: 40px;
        height: 40px;
    }

    .track-duration {
        display: none;
    }

    .now-playing-cover {
        width: 50px;
        height: 50px;
    }

    .control-btn {
        width: 40px;
        height: 40px;
    }

    .control-btn.play-btn {
        width: 44px;
        height: 44px;
    }

    .player-controls {
        gap: 6px;
    }

    .donate-btn {
        width: 36px;
        height: 36px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
    }

    .donate-btn i {
        font-size: 0.9rem;
    }
}

/* Ландшафтная ориентация телефона */
@media (max-width: 900px) and (orientation: landscape) {
    :root {
        --player-height-mobile: 80px;
        --header-height: 60px;
    }

    .app-container {
        padding-bottom: var(--player-height-mobile);
    }

    .content {
        padding-bottom: calc(var(--player-height-mobile) + var(--spacing-md));
    }

    .main-header {
        height: var(--header-height);
        padding: 0 12px;
    }

    .band-name {
        font-size: 1.4rem;
    }

    .band-tagline {
        font-size: 0.7rem;
    }

    .tracks-header {
        flex-direction: row;
        align-items: center;
    }

    .header-right {
        width: auto;
        order: 0;
        margin-top: 0;
        flex-direction: row;
        align-items: center;
    }

    .search-container {
        width: 180px;
    }

    #trackCount {
        margin-top: 0;
    }

    .tracks-container {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 8px;
    }

    .player-wrapper {
        height: var(--player-height-mobile);
    }

    .player-container {
        padding: 0 12px;
    }

    .now-playing-cover {
        width: 50px;
        height: 50px;
    }

    .control-btn {
        width: 36px;
        height: 36px;
    }

    .control-btn.play-btn {
        width: 40px;
        height: 40px;
    }

    .player-controls {
        gap: 6px;
    }
}

/* Для iOS Safari */
@supports (-webkit-touch-callout: none) {
    .player-wrapper {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Поддержка больших пальцев на мобильных */
@media (hover: none) and (pointer: coarse) {
    .control-btn,
    .track-item,
    .scan-btn,
    .donate-btn {
        min-height: 44px;
        min-width: 44px;
    }

    .progress-bar {
        height: 6px;
    }
}

/* Полоса прокрутки */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 42, 42, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 42, 42, 0.5);
}

/* Улучшение скролла на iOS */
.content {
    -webkit-overflow-scrolling: touch;
}

/* Предотвращение выделения при касании */
.no-select {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* ========== ПОЛНОЭКРАННЫЙ ПЛЕЕР ========== */
.fullscreen-player {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(0px);
}

.fullscreen-player.active {
    opacity: 1;
    visibility: visible;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
}

.fullscreen-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
        rgba(255, 42, 42, 0.05) 0%,
        rgba(10, 10, 10, 0.95) 50%,
        rgba(255, 42, 42, 0.05) 100%);
    z-index: -1;
}

.fullscreen-content {
    width: 100%;
    max-width: 500px;
    padding: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xl);
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.fullscreen-player.active .fullscreen-content {
    transform: translateY(0);
    opacity: 1;
}

.fullscreen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.fullscreen-close:hover {
    background: rgba(255, 42, 42, 0.3);
    transform: rotate(90deg);
}

.fullscreen-cover {
    width: 280px;
    height: 280px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 42, 42, 0.3),
        0 0 60px rgba(255, 42, 42, 0.2);
    animation: coverFloat 3s ease-in-out infinite;
}

@keyframes coverFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.02); }
}

.fullscreen-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fullscreen-playing-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fullscreen-player.playing .fullscreen-playing-indicator {
    opacity: 1;
}

.fullscreen-equalizer {
    display: flex;
    align-items: flex-end;
    height: 30px;
    gap: 4px;
}

.fullscreen-equalizer .bar {
    width: 4px;
    background: var(--accent-red);
    border-radius: 2px;
    animation: equalizer 1.5s ease-in-out infinite;
}

.fullscreen-equalizer .bar:nth-child(1) { animation-delay: 0s; height: 60%; }
.fullscreen-equalizer .bar:nth-child(2) { animation-delay: 0.2s; height: 80%; }
.fullscreen-equalizer .bar:nth-child(3) { animation-delay: 0.4s; height: 40%; }
.fullscreen-equalizer .bar:nth-child(4) { animation-delay: 0.6s; height: 70%; }

.fullscreen-info {
    text-align: center;
    padding: 0 var(--spacing-xl);
}

.fullscreen-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(255, 42, 42, 0.3);
}

.fullscreen-artist {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 1px;
}

.fullscreen-progress {
    width: 100%;
    padding: 0 var(--spacing-xl);
}

.fullscreen-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    margin-bottom: var(--spacing-md);
    overflow: hidden;
}

.fullscreen-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    background: linear-gradient(90deg, var(--accent-red), #ff6b6b);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(255, 42, 42, 0.3);
}

.fullscreen-progress-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 20px;
    height: 20px;
    background: var(--accent-red);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: 0 0 15px rgba(255, 42, 42, 0.5);
    cursor: pointer;
}

.fullscreen-progress-bar:hover .fullscreen-progress-thumb {
    opacity: 1;
}

.fullscreen-time {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
}

.fullscreen-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-lg);
    width: 100%;
    padding: 0 var(--spacing-xl);
}

.fullscreen-control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-secondary);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.fullscreen-control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    transform: scale(1.1);
}

.fullscreen-control-btn.active {
    background: rgba(255, 42, 42, 0.3);
    color: var(--accent-red);
}

.fullscreen-control-btn.fullscreen-play-btn {
    width: 70px;
    height: 70px;
    background: var(--accent-red);
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 10px 20px rgba(255, 42, 42, 0.3);
}

.fullscreen-control-btn.fullscreen-play-btn:hover {
    background: var(--accent-dark);
    transform: scale(1.1);
}

/* Адаптивность полноэкранного плеера */
@media (max-width: 768px) {
    .fullscreen-cover {
        width: 220px;
        height: 220px;
    }

    .fullscreen-title {
        font-size: 1.6rem;
    }

    .fullscreen-artist {
        font-size: 1rem;
    }

    .fullscreen-controls {
        gap: var(--spacing-md);
    }

    .fullscreen-control-btn {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
    }

    .fullscreen-control-btn.fullscreen-play-btn {
        width: 60px;
        height: 60px;
        font-size: 1.3rem;
    }

    .fullscreen-content {
        padding: var(--spacing-lg);
    }
}

@media (max-width: 480px) {
    .fullscreen-cover {
        width: 180px;
        height: 180px;
    }

    .fullscreen-title {
        font-size: 1.4rem;
    }

    .fullscreen-controls {
        gap: var(--spacing-sm);
    }

    .fullscreen-control-btn {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .fullscreen-control-btn.fullscreen-play-btn {
        width: 52px;
        height: 52px;
        font-size: 1.2rem;
    }
}

/* ========== МОДАЛЬНОЕ ОКНО ДОНАТОВ ========== */
.donate-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(0px);
}

.donate-modal.active {
    opacity: 1;
    visibility: visible;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.donate-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.donate-modal-content {
    background: linear-gradient(135deg, #121212 0%, #1a1a1a 100%);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid rgba(255, 42, 42, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 60px rgba(255, 42, 42, 0.1);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 30px;
}

.donate-modal.active .donate-modal-content {
    transform: scale(1) translateY(0);
}

.donate-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.donate-modal-close:hover {
    background: rgba(255, 42, 42, 0.3);
    color: white;
    transform: rotate(90deg);
}

.donate-modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.donate-modal-icon {
    font-size: 3rem;
    color: var(--accent-red);
    margin-bottom: 15px;
    display: block;
    animation: heartbeat 1.5s ease-in-out infinite;
}

.donate-modal-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.donate-modal-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.donate-methods {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.donate-method {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.donate-method:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 42, 42, 0.3);
    transform: translateY(-2px);
}

.method-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 42, 42, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.method-icon i {
    font-size: 1.5rem;
    color: var(--accent-red);
}

.method-info {
    flex: 1;
    min-width: 0;
}

.method-info h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-family: 'Orbitron', sans-serif;
}

.method-info p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.method-select {
    background: linear-gradient(45deg, var(--accent-red), #ff6b6b);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.method-select:hover {
    background: linear-gradient(45deg, var(--accent-dark), var(--accent-red));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 42, 42, 0.3);
}

.crypto-addresses {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    display: none;
    border: 1px solid rgba(255, 42, 42, 0.2);
}

.crypto-addresses.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.crypto-address {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.crypto-address:last-child {
    margin-bottom: 0;
}

.crypto-name {
    color: var(--text-secondary);
    font-size: 0.85rem;
    min-width: 120px;
}

.crypto-code {
    flex: 1;
    color: var(--text-primary);
    font-family: monospace;
    font-size: 0.8rem;
    word-break: break-all;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.crypto-copy {
    background: rgba(255, 42, 42, 0.1);
    border: 1px solid rgba(255, 42, 42, 0.3);
    color: var(--accent-red);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.crypto-copy:hover {
    background: rgba(255, 42, 42, 0.2);
    transform: scale(1.1);
}

.crypto-copy.copied {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.5);
    color: #4CAF50;
}

.donate-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.donate-footer p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.donate-footer p:last-child {
    margin-bottom: 0;
}

.donate-footer i {
    color: #FFD700;
    font-size: 0.9rem;
}

/* Адаптивность модального окна */
@media (max-width: 768px) {
    .donate-modal-content {
        width: 95%;
        padding: 20px;
        max-height: 85vh;
    }
    
    .donate-modal-header h2 {
        font-size: 1.5rem;
    }
    
    .donate-method {
        padding: 15px;
        gap: 12px;
    }
    
    .method-icon {
        width: 40px;
        height: 40px;
    }
    
    .method-icon i {
        font-size: 1.2rem;
    }
    
    .method-info h3 {
        font-size: 1rem;
    }
    
    .method-select {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
    
    .crypto-address {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .crypto-name {
        min-width: auto;
    }
    
    .crypto-code {
        width: 100%;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .donate-modal-content {
        padding: 15px;
    }
    
    .donate-modal-header h2 {
        font-size: 1.3rem;
    }
    
    .donate-modal-header p {
        font-size: 0.85rem;
    }
    
    .method-icon {
        width: 36px;
        height: 36px;
    }
    
    .method-icon i {
        font-size: 1rem;
    }
    
    .method-info h3 {
        font-size: 0.9rem;
    }
    
    .method-info p {
        font-size: 0.75rem;
    }
    
    .method-select {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
}