* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: #333;
line-height: 1.6;
padding-bottom: 80px;
}

.container {
max-width: 1400px;
margin: 0 auto;
padding: 20px;
}

header {
text-align: center;
margin-bottom: 25px;
color: white;
padding: 30px 20px;
background: rgba(0, 0, 0, 0.2);
border-radius: 15px;
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

header h1 {
font-size: 2.8rem;
margin-bottom: 15px;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
font-size: 1.3rem;
opacity: 0.95;
font-weight: 300;
}

/* Горизонтальный скролл категорий */
.categories-wrapper {
overflow-x: auto;
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
scrollbar-width: thin;
scrollbar-color: rgba(102, 126, 234, 0.5) transparent;
margin-bottom: 25px;
padding-bottom: 10px;
width: 100%;
}

.categories-wrapper::-webkit-scrollbar {
height: 8px;
}

.categories-wrapper::-webkit-scrollbar-track {
background: transparent;
}

.categories-wrapper::-webkit-scrollbar-thumb {
background: rgba(102, 126, 234, 0.5);
border-radius: 4px;
}

.categories-wrapper::-webkit-scrollbar-thumb:hover {
background: rgba(102, 126, 234, 0.8);
}

.categories-list {
display: flex;
flex-wrap: nowrap;
gap: 10px;
padding: 10px 5px;
min-width: max-content;
white-space: nowrap;
}

.category-link {
display: inline-block;
padding: 10px 20px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
text-decoration: none;
border-radius: 25px;
font-size: 0.95rem;
font-weight: 500;
transition: all 0.3s ease;
white-space: nowrap;
box-shadow: 0 3px 8px rgba(102, 126, 234, 0.3);
flex-shrink: 0;
}

.category-link:hover {
transform: translateY(-2px);
box-shadow: 0 5px 12px rgba(102, 126, 234, 0.5);
}

.category-link.active {
background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
box-shadow: 0 4px 10px rgba(118, 75, 162, 0.4);
transform: scale(1.05);
}

/* Сетка логотипов - МАКСИМУМ 6, МИНИМУМ 3 */
.stations-grid {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 12px;
padding-bottom: 100px;
}

.station-logo {
background: white;
border-radius: 12px;
overflow: hidden;
transition: all 0.3s ease;
position: relative;
aspect-ratio: 1/1;
display: block;
cursor: pointer;
box-shadow: none;
}

.station-logo:hover {
transform: translateY(-5px);
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.station-logo img {
width: 100%;
height: 100%;
object-fit: contain;
display: block;
padding: 15px;
background: #f5f5f5;
transition: transform 0.3s ease;
border-radius: 8px;
}

.station-logo:hover img {
transform: scale(1.1);
}

.station-name-overlay {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background: rgba(102, 126, 234, 0.9);
color: white;
padding: 8px;
font-size: 0.85rem;
font-weight: 500;
text-align: center;
opacity: 0;
transition: opacity 0.3s ease;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.station-logo:hover .station-name-overlay {
opacity: 1;
}

.error {
color: white;
text-align: center;
font-size: 1.2rem;
padding: 40px;
}

/* Фиксированный футер с плеером - ТЕМНЫЙ ФОН */
.player-footer {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.4);
z-index: 1000;
transition: transform 0.3s ease;
}

.player-footer.hidden {
transform: translateY(100%);
}

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

.player-left {
display: flex;
align-items: center;
gap: 15px;
flex: 1;
min-width: 250px;
cursor: pointer;
}

.player-logo {
width: 70px;
height: 70px;
border-radius: 50%;
object-fit: cover;
border: 4px solid #667eea;
background: rgba(255, 255, 255, 0.1);
transition: transform 0.3s ease;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.player-logo-expandable:hover {
transform: scale(1.15);
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.player-info {
flex: 1;
}

.player-name {
font-size: 1.2rem;
font-weight: 700;
color: white;
margin-bottom: 4px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.player-category {
font-size: 0.95rem;
color: #a8b1ff;
font-weight: 500;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.player-center {
flex: 0 0 auto;
}

.player-control {
width: 70px;
height: 70px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
border-radius: 50%;
font-size: 2rem;
font-weight: bold;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.player-control:hover {
transform: scale(1.1);
box-shadow: 0 8px 25px rgba(102, 126, 234, 0.7);
}

/* Полноэкранный режим футера - ТЕМНЫЙ ФОН */
.player-fullscreen {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
z-index: 2000;
display: flex;
align-items: center;
justify-content: center;
transition: opacity 0.3s ease;
}

.player-fullscreen.hidden {
display: none;
}

.fullscreen-container {
width: 100%;
max-width: 600px;
padding: 40px 20px;
text-align: center;
}

.fullscreen-close {
position: absolute;
top: 20px;
right: 20px;
width: 50px;
height: 50px;
background: rgba(244, 67, 54, 0.9);
color: white;
border: none;
border-radius: 50%;
font-size: 2rem;
font-weight: bold;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 4px 15px rgba(244, 67, 54, 0.5);
}

.fullscreen-close:hover {
background: rgba(211, 47, 47, 0.95);
transform: rotate(90deg) scale(1.1);
}

.fullscreen-content {
display: flex;
flex-direction: column;
align-items: center;
gap: 35px;
}

.fullscreen-logo {
width: 350px;
height: 350px;
border-radius: 50%;
object-fit: contain;
background: rgba(255, 255, 255, 0.08);
padding: 30px;
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
border: 6px solid #667eea;
transition: transform 0.3s ease;
}

/* Анимация вращения */
@keyframes rotate {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}

.fullscreen-logo.rotating {
animation: rotate 20s linear infinite;
}

.fullscreen-name {
font-size: 2.2rem;
font-weight: 800;
color: white;
text-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

.fullscreen-category {
font-size: 1.3rem;
color: #a8b1ff;
font-weight: 500;
margin-bottom: 15px;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Блок текущего трека */
.current-track {
background: rgba(255, 255, 255, 0.08);
border-radius: 15px;
padding: 25px;
width: 100%;
border: 2px solid rgba(102, 126, 234, 0.3);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.current-track-title {
font-size: 1.6rem;
font-weight: 700;
color: white;
margin-bottom: 10px;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.current-track-info {
font-size: 1rem;
color: #a8b1ff;
font-weight: 400;
}

.fullscreen-control {
width: 90px;
height: 90px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
border-radius: 50%;
font-size: 2.5rem;
font-weight: bold;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.fullscreen-control:hover {
transform: scale(1.15);
box-shadow: 0 10px 30px rgba(102, 126, 234, 0.8);
}

/* Адаптивность - сетка станций */
@media (max-width: 1600px) {
.stations-grid {
grid-template-columns: repeat(6, 1fr);
}
.player-container {
padding: 12px 15px;
}
.player-logo {
width: 65px;
height: 65px;
}
.player-control {
width: 65px;
height: 65px;
font-size: 1.9rem;
}
.fullscreen-logo {
width: 330px;
height: 330px;
}
}

@media (max-width: 1400px) {
.stations-grid {
grid-template-columns: repeat(5, 1fr);
}
.player-left {
min-width: 220px;
}
}

@media (max-width: 1200px) {
.stations-grid {
grid-template-columns: repeat(4, 1fr);
}
.player-left {
min-width: 200px;
}
.player-name {
font-size: 1.1rem;
}
.player-category {
font-size: 0.9rem;
}
.player-logo {
width: 60px;
height: 60px;
}
.player-control {
width: 60px;
height: 60px;
font-size: 1.8rem;
}
.fullscreen-logo {
width: 300px;
height: 300px;
}
.fullscreen-name {
font-size: 2rem;
}
.fullscreen-category {
font-size: 1.2rem;
}
.current-track {
padding: 20px;
}
.current-track-title {
font-size: 1.5rem;
}
.current-track-info {
font-size: 0.95rem;
}
}

@media (max-width: 992px) {
.stations-grid {
grid-template-columns: repeat(4, 1fr);
}
.player-left {
min-width: 180px;
}
.fullscreen-logo {
width: 280px;
height: 280px;
}
.fullscreen-name {
font-size: 1.8rem;
}
.fullscreen-category {
font-size: 1.1rem;
}
.fullscreen-control {
width: 80px;
height: 80px;
font-size: 2.2rem;
}
}

@media (max-width: 768px) {
body {
padding-bottom: 80px;
}
header h1 {
font-size: 2.2rem;
}
header p {
font-size: 1rem;
}
.stations-grid {
grid-template-columns: repeat(3, 1fr);
}
.player-left {
min-width: 160px;
}
.player-name {
font-size: 1rem;
}
.player-category {
font-size: 0.85rem;
}
.player-logo {
width: 55px;
height: 55px;
}
.player-control {
width: 55px;
height: 55px;
font-size: 1.7rem;
}
.fullscreen-logo {
width: 250px;
height: 250px;
}
.fullscreen-name {
font-size: 1.6rem;
}
.fullscreen-category {
font-size: 1rem;
}
.fullscreen-control {
width: 75px;
height: 75px;
font-size: 2rem;
}
.current-track {
padding: 18px;
}
.current-track-title {
font-size: 1.4rem;
}
.current-track-info {
font-size: 0.9rem;
}
}

@media (max-width: 576px) {
.stations-grid {
grid-template-columns: repeat(3, 1fr);
}
header h1 {
font-size: 1.8rem;
}
.player-left {
min-width: 140px;
gap: 12px;
}
.player-logo {
width: 50px;
height: 50px;
}
.player-name {
font-size: 0.95rem;
}
.player-category {
font-size: 0.8rem;
}
.player-control {
width: 50px;
height: 50px;
font-size: 1.6rem;
}
.station-logo img {
padding: 10px;
}
.categories-list {
gap: 8px;
}
.category-link {
padding: 8px 16px;
font-size: 0.9rem;
}
.fullscreen-logo {
width: 220px;
height: 220px;
}
.fullscreen-name {
font-size: 1.5rem;
}
.fullscreen-category {
font-size: 0.95rem;
}
.fullscreen-control {
width: 70px;
height: 70px;
font-size: 1.9rem;
}
.current-track {
padding: 15px;
}
.current-track-title {
font-size: 1.3rem;
}
.current-track-info {
font-size: 0.85rem;
}
}

@media (max-width: 360px) {
.stations-grid {
grid-template-columns: repeat(3, 1fr);
gap: 8px;
}
.player-left {
min-width: 120px;
gap: 10px;
}
.player-logo {
width: 45px;
height: 45px;
}
.player-name {
font-size: 0.9rem;
}
.player-category {
font-size: 0.75rem;
}
.player-control {
width: 45px;
height: 45px;
font-size: 1.5rem;
}
.fullscreen-logo {
width: 200px;
height: 200px;
}
.fullscreen-name {
font-size: 1.4rem;
}
.fullscreen-category {
font-size: 0.9rem;
}
.fullscreen-control {
width: 65px;
height: 65px;
font-size: 1.8rem;
}
.current-track {
padding: 12px;
}
.current-track-title {
font-size: 1.2rem;
}
.current-track-info {
font-size: 0.8rem;
}
}