:root {
    --primary: #01E08F;
    --dark-bg: #212738;
    --card-bg: #303648;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
    --radius: 16px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-bg);
    color: var(--white);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color 0.2s;
}

a:hover {
    color: #00c076;
}

.container {
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.site-header {
    background-color: var(--card-bg);
    color: var(--white);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 12px 0;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 15px;
}

.logo {
    color: var(--primary);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo i {
    font-size: 1.4rem;
    position: relative;
    top: -0.10em;
}

.main-nav {
    display: flex;
    gap: 12px;
    white-space: nowrap;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background: none;
    color: var(--white);
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.dropbtn:hover {
    background-color: rgba(255,255,255,0.1);
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--card-bg);
    min-width: 200px;
    max-height: 500px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 1001;
    border-radius: 10px;
    padding: 8px 0;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: var(--white);
    padding: 10px 16px;
    display: block;
    font-size: 0.95rem;
}

.dropdown-content a:hover {
    background-color: rgba(255,255,255,0.08);
}

/* Search */
.search-form {
    display: flex;
    gap: 6px;
}

.search-form input {
    padding: 9px 14px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    width: 180px;
    font-size: 0.95rem;
    background: rgba(0,0,0,0.2);
    color: white;
    outline: none;
}

.search-form input::placeholder {
    color: rgba(255,255,255,0.6);
}

.search-form input:focus {
    border-color: rgba(255,255,255,0.2);
}

.search-form button {
    background: none;
    color: var(--white);
    border: none;
    width: 42px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
}

.search-form button:hover {
    background: rgba(255,255,255,0.1);
}

/* User menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-menu a {
    color: var(--white);
    font-weight: 500;
}

/* Иконка избранного в десктопном меню */
.user-menu .desktop-favorite {
    color: var(--white);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    transition: background 0.2s;
}

.user-menu .desktop-favorite:hover {
    background: rgba(255,255,255,0.1);
    color: #ff4d4d;
}

/* Мобильные иконки */
.mobile-icons {
    display: none;
    align-items: center;
    gap: 16px;
}

.mobile-icons button,
.mobile-icons a {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.2s;
}

.mobile-icons button:hover,
.mobile-icons a:hover {
    background: rgba(255,255,255,0.1);
}

/* Мобильные панели */
.mobile-search-panel,
.hamburger-menu-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--card-bg);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-search-panel.active,
.hamburger-menu-panel.active {
    opacity: 1;
    visibility: visible;
}

.mobile-search-panel {
    align-items: center;
    justify-content: center;
}

.mobile-search-panel form {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 500px;
    margin-bottom: 30px;
}

.mobile-search-panel input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 30px;
    background: rgba(0,0,0,0.2);
    color: white;
    font-size: 1rem;
}

.mobile-search-panel button[type="submit"] {
    background: var(--primary);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    padding: 0;
}

.mobile-search-panel button[type="submit"]:hover {
    background: #00c076;
    transform: scale(1.05);
}

/* Кнопка закрытия поиска */
.mobile-search-panel .search-close-btn {
    background: none;
    color: #ccc;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 25px;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.mobile-search-panel .search-close-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border-color: rgba(255,255,255,0.5);
}

.hamburger-menu-panel {
    padding-top: 0;
    overflow-y: auto;
}

.menu-header {
    position: sticky;
    top: 0;
    background: var(--card-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: 56px;
    width: 100%;
    margin-bottom: 0;
}

.menu-header .menu-title {
    color: var(--primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.menu-header .hamburger-close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
}

.menu-header .hamburger-close:hover {
    color: #ff4d4d;
}

/* Логотип в мобильном меню */
.hamburger-menu-panel .menu-header .logo {
    color: var(--primary);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    background: transparent !important;
    padding: 0;
    margin: 0;
}

.hamburger-menu-panel .menu-header .logo i {
    font-size: 1.2rem;
    position: relative;
}

.hamburger-menu-panel .menu-header .logo:hover {
    background: transparent !important;
}

/* Контейнер для контента меню */
.hamburger-menu-panel .menu-content {
    width: 100%;
    max-width: 600px;
    padding: 20px;
    margin: 0 auto;
}

.hamburger-menu-panel .menu-section {
    margin-bottom: 30px;
    width: 100%;
}

.hamburger-menu-panel .menu-section .menu-title {
    color: var(--primary);
    font-weight: 600;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 15px;
    padding: 0 10px;
}

.hamburger-menu-panel .menu-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.hamburger-menu-panel a {
    color: var(--white);
    text-decoration: none;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    text-align: center;
    transition: background 0.2s;
}

.hamburger-menu-panel a:hover {
    background: rgba(1, 224, 143, 0.15);
}

/* Main */
main {
    margin-top: 90px;
    padding: 30px 0;
}

.page-title {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--white);
    font-weight: 700;
}

.page-description {
    font-size: 1.15rem;
    color: #a0a8d3;
    margin-bottom: 40px;
    line-height: 1.7;
}

/* Channels */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 28px;
    margin-bottom: 40px;
}

.channel-card, .similar-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    text-align: center;
    padding: 20px 10px 16px;
    cursor: pointer;
}

.channel-card:hover, .similar-item:hover {
    transform: translateY(-6px);
}

.channel-logo-wrapper {
    width: 110px;
    height: 110px;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
    margin: 0 auto 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, #ffffff, var(--logo-bg, #1c203c));
    background-size: 100% 100%; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    overflow: hidden;
}

.channel-logo-wrapper.solid {
    background: var(--logo-bg, #1c203c);
    background-image: none;
}

.channel-logo-wrapper img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    object-position: center;
    box-sizing: border-box;
}

.channel-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--white);
    margin-top: 10px;
    display: block;
}

/* Channel page */
.channel-page .channel-logo-wrapper {
    width: 100px;
    height: 100px;
    border-radius: 20px;
}

.channel-page .channel-logo-wrapper img {
    width: 80px;
    height: 80px;
}

.similar-channels .channel-logo-wrapper {
    width: 100px;
    height: 100px;
    border-radius: 14px;
}

.similar-channels .channel-logo-wrapper img {
    width: 80px;
    height: 80px;
}

/* Player */
.player-container {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow);
    margin: 10px 0;
    border: 1px solid rgba(255,255,255,0.1);
}

.current-station {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 15px;
}

.station-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 0 20px rgba(1, 224, 143, 0.3);
    overflow: hidden;
    position: relative;
}

.station-logo img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    box-sizing: border-box;
}

.station-info h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--white);
}

.station-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
    font-size: 0.95rem;
    color: #a0a8d3;
}

.station-meta span::before {
    content: "•";
    margin-right: 8px;
    color: var(--primary);
}

.station-meta span:first-child::before {
    content: "";
    margin-right: 0;
}

.volume-control {
    display: flex;
    align-items: center;
    margin-top: 15px;
    gap: 10px;
}

.volume-control i {
    font-size: 1.1rem;
    color: #ccc;
}

input[type="range"] {
    flex: 1;
    height: 5px;
    -webkit-appearance: none;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(1, 224, 143, 0.5);
}

.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
}

.control-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.control-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.play-btn {
    width: 80px;
    height: 80px;
    background: var(--primary);
    font-size: 1.8rem;
}

.visualizer {
    height: 80px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    margin: 10px 0;
    margin-top: 5px;
}

.bar {
    width: 6px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
    animation: visualizer 1.5s infinite alternate;
}

@keyframes visualizer {
    0% { height: 20%; }
    100% { height: 100%; }
}

.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 6px;
    transition: background 0.2s;
}

.favorite-btn:hover {
    background: rgba(255,255,255,0.1);
}

.favorite-btn .heart-svg {
    width: 20px;
    height: 20px;
    fill: #666;
    transition: fill 0.3s;
}

.favorite-btn.favorited .heart-svg {
    fill: #ff4d4d;
}

/* Channel header */
.channel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    margin-left: 15px;
    margin-right: 15px;
    flex-wrap: wrap;
    gap: 20px;
    object-position: center;
    text-align: center;
    justify-content: center;
}

.channel-title-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.title-and-favorite {
    display: flex;
    align-items: center;
    gap: 15px;
}

.title-and-favorite h1 {
    font-size: 2.2rem;
    color: var(--white);
    margin: 0;
}

/* Player section */
.player-section {
    text-align: center;
    padding: 20px 0;
    margin: 10px 0;
}

/* Channel meta */
.channel-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.meta-item strong {
    color: var(--primary);
}

/* Description */
.description-section {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: var(--shadow);
}

.description-section h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.description-text {
    line-height: 1.7;
    color: #a0a8d3;
    font-size: 1.05rem;
}

/* Share section */
.share-section {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: var(--shadow);
}

.share-section h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.share-btn {
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.share-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* Section title */
.section-title {
    font-size: 1.8rem;
    color: var(--white);
    margin: 40px 0 20px;
    font-weight: 700;
}

/* Comments */
.comment-form {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: var(--shadow);
}

.comment-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    background: rgba(0,0,0,0.2);
    color: white;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 15px;
}

.comment-form textarea::placeholder {
    color: rgba(255,255,255,0.6);
}

.comment-form button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.comment-form button:hover {
    background: #00c076;
    transform: translateY(-2px);
}

.login-prompt {
    text-align: center;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 15px;
    margin: 25px 0;
    color: #ccc;
}

.comments-list {
    margin: 25px 0;
}

.comment-item {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.comment-header strong {
    color: var(--primary);
}

.comment-header span {
    color: #888;
}

.comment-item p {
    line-height: 1.6;
    color: #a0a8d3;
}

/* Footer */
.site-footer {
    background-color: var(--card-bg);
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: 60px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-section h3 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #ccc;
    transition: color 0.2s;
}

.footer-section ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #888;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .logo {
        font-size: 1.4rem;
    }
    
    .main-nav {
        display: none;
    }
    
    .search-form {
        display: none;
    }
    
    .user-menu {
        display: none;
    }
    
    .mobile-icons {
        display: flex;
    }
    
    .channels-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 20px;
    }
    
    .channel-title-section {
        display: flex;
        align-items: center;
        gap: 20px;
    }

    .channel-card, .similar-item {
        padding: 15px 8px 12px;
    }
    
    .channel-logo-wrapper {
        width: 100px;
        height: 100px;
        aspect-ratio: 1 / 1;
    }
    
    .channel-logo-wrapper img {
        width: 80px;
        height: 80px;
    }
    
    .channel-name {
        font-size: 1rem;
    }
    
    .channel-page .channel-logo-wrapper {
        width: 100px;
        height: 100px;
    }
    
    .channel-page .channel-logo-wrapper img {
        width: 80px;
        height: 80px;
    }
    
    .channel-header {
        flex-direction: column;
        align-items: center;
        object-position: center;
        text-align: center;
        justify-content: center;        
    }
    
    .title-and-favorite {
        flex-direction: column;
        align-items: center;
        object-position: center;
        text-align: center;
        justify-content: center;          
        gap: 10px;
    }
    
    .title-and-favorite h1 {
        font-size: 1.8rem;
    }
    
    .controls {
        gap: 25px;
    }
    
    .control-btn {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
    }
    
    .play-btn {
        width: 70px;
        height: 70px;
        font-size: 1.6rem;
    }
    
    .channel-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }

    .station-logo {
        width: 80px;
        height: 80px;
    }

    .station-logo img {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .channels-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .channel-header {
        flex-direction: column;
        align-items: center;
        object-position: center;
        text-align: center;
        justify-content: center;        
    }

    .channel-title-section {
        display: flex;
        align-items: center;
        gap: 20px;
    }

    .channel-logo-wrapper {
        width: 80px;
        height: 80px;
        aspect-ratio: 1 / 1;
    }
    
    .channel-logo-wrapper img {
        width: 60px;
        height: 60px;
    }
    
    .channel-name {
        font-size: 0.9rem;
    }
    
    .title-and-favorite h1 {
        font-size: 1.5rem;
    }
    
    .controls {
        gap: 20px;
    }
    
    .control-btn {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .play-btn {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
    }

    .station-logo .logo-wrapper {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #ffffff;
    }

    .station-logo .logo-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        border-radius: 50%;
    }    
}

.favorite-btn-player {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    color: #fff;
    opacity: 0.7;
    z-index: 10;
    padding: 5px;
    border-radius: 50%;
    transition: opacity 0.2s, color 0.2s;
    display: block;
}

.favorite-btn-player.favorited {
    color: #ff4d4d;
    opacity: 1;
}

.favorite-btn-player:hover {
    opacity: 1;
}

.pagination {
    margin: 30px 0;
    display: flex;
    justify-content: center;
}

.pagination .menu-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.pagination .menu-items a,
.pagination .menu-items span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.95rem;
    min-width: 36px;
    text-align: center;
}

.pagination .menu-items a {
    background: rgba(255,255,255,0.05);
    color: var(--white);
    transition: background 0.2s;
}

.pagination .menu-items a:hover {
    background: rgba(1, 224, 143, 0.15);
    color: var(--white);
}

.pagination .menu-items .pagination-current {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
}

.pagination .menu-items .dots {
    color: #888;
    background: transparent;
    cursor: default;
}

.search-page-title {
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 24px; 
    justify-content: center;
    margin-bottom: 20px;
}

.footer-nav a {
    white-space: nowrap;
}