/* Base styles */
:root {
    --background: 240, 240, 245;
    --foreground: 51, 51, 51;
    --card: 255, 255, 255;
    --card-foreground: 51, 51, 51;
    --popover: 255, 255, 255;
    --popover-foreground: 51, 51, 51;
    --primary: 104, 109, 224; /* Changed to purple-blue from mp3uk */
    --primary-foreground: 255, 255, 255;
    --secondary: 240, 240, 245;
    --secondary-foreground: 51, 51, 51;
    --muted: 240, 240, 245;
    --muted-foreground: 102, 102, 102;
    --accent: 245, 245, 250;
    --accent-foreground: 51, 51, 51;
    --destructive: 255, 86, 86;
    --destructive-foreground: 255, 255, 255;
    --border: 0, 0, 0, 0.08;
    --input: 0, 0, 0, 0.08;
    --ring: 104, 109, 224;

    /* Additional colors */
    --orange: 156, 136, 255; /* Changed to purple from mp3uk */
    --orange-light: 176, 156, 255;
    --blue-light: 2, 215, 251; /* Cyan from mp3uk */
}

html.dark {
    --background: 6, 5, 11; /* Dark background from mp3uk */
    --foreground: 185, 191, 222; /* Text color from mp3uk */
    --card: 20, 18, 37; /* Card background from mp3uk */
    --card-foreground: 214, 218, 242; /* Card text from mp3uk */
    --popover: 20, 18, 37;
    --popover-foreground: 214, 218, 242;
    --primary: 104, 109, 224;
    --primary-foreground: 255, 255, 255;
    --secondary: 26, 25, 56; /* Secondary background from mp3uk */
    --secondary-foreground: 214, 218, 242;
    --muted: 26, 25, 56;
    --muted-foreground: 140, 140, 158;
    --accent: 26, 25, 56;
    --accent-foreground: 214, 218, 242;
    --destructive: 255, 86, 86;
    --destructive-foreground: 255, 255, 255;
    --border: 255, 255, 255, 0.08;
    --input: 255, 255, 255, 0.08;
    --ring: 104, 109, 224;

    /* Additional colors */
    --orange: 156, 136, 255;
    --orange-light: 176, 156, 255;
    --blue-light: 2, 215, 251;
}

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

body {
    font-family: "Inter", sans-serif;
    background-color: rgb(var(--background));
    color: rgb(var(--foreground));
    line-height: 1.5;
    background-image: url("/images/bg.png"); /* Add background image like mp3uk */
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
}

@media screen and (min-width: 1650px) {
    body {
        background-size: 100% auto;
    }
}

.hidden {
    display: none !important;
}

.min-h-screen {
    min-height: 100vh;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.dark-bg {
    background-color: rgb(var(--background));
    color: rgb(var(--foreground));
    transition: background-color 0.3s, color 0.3s;
}

.container {
    width: 100%;
    max-width: 1100px; /* Match mp3uk container width */
    margin: 0 auto;
    padding: 0 1rem;
    background-color: rgb(var(--card));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); /* Stronger shadow like mp3uk */
}

.content-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
    background-color: rgb(var(--card));
}

/* Header */
header {
    background-color: rgb(var(--card));
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
    margin-bottom: 20px; /* Add margin like mp3uk */
}

.header-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    max-width: 1100px; /* Match mp3uk container width */
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
    color: rgb(var(--foreground));
    margin-right: 1rem;
}

.logo-primary {
    color: rgb(var(--orange));
}

.logo-secondary {
    color: rgb(var(--foreground));
}

.search-container {
    position: relative;
    flex: 1;
    max-width: 340px; /* Match mp3uk search width */
    margin-right: 1rem;
}

.search-input-wrapper {
    position: relative;
    display: flex;
}

.search-input {
    width: 100%;
    height: 2.5rem;
    padding-left: 2.5rem;
    padding-right: 1rem;
    border-radius: 4px;
    background-color: rgb(var(--secondary)); /* Darker background for search */
    border: 0;
    color: rgb(var(--foreground));
    font-size: 0.875rem;
    outline: none;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: rgb(var(--muted-foreground));
}

.theme-toggle {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: rgb(var(--muted-foreground));
    transition: background-color 0.3s;
    margin-right: 1rem;
}

.theme-toggle:hover {
    background-color: rgba(var(--foreground), 0.05);
}

.dark .theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.main-nav {
    display: flex;
    align-items: center;
    background-color: rgb(var(--primary));
    border-radius: 0.25rem;
    margin-top: 0.5rem;
    width: 100%;
}

.nav-link {
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    color: white;
    padding: 0.75rem 1.25rem;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    position: relative;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 1.5rem 0 6rem;
    width: 100%;
    display: flex;
    justify-content: center;
    background-color: rgb(var(--card));
}

.main-content > .content-container {
    width: 100%;
}

@media (min-width: 768px) {
    .main-content {
        padding-bottom: 5rem;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 0.25rem;
    overflow: hidden;
    background-color: rgb(var(--secondary));
    border: 1px solid rgba(var(--border));
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 42rem;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: rgb(var(--orange));
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 1.75rem;
    }
}

.hero-subtitle {
    font-size: 0.875rem;
    color: rgb(var(--muted-foreground));
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .hero-subtitle {
        font-size: 1rem;
    }
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.btn-primary {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.25rem;
    background-color: rgb(var(--orange));
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: rgb(var(--orange-light));
}

.btn-secondary {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.25rem;
    background-color: rgb(var(--secondary));
    color: rgb(var(--secondary-foreground));
    text-decoration: none;
    border: 1px solid rgba(var(--border));
    transition: background-color 0.3s;
}

.btn-secondary:hover {
    background-color: rgb(var(--accent));
}

/* Section Styles */
.section {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(var(--border));
    padding-bottom: 0.5rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: rgb(var(--foreground));
    display: flex;
    align-items: center;
}

.section-title .section-marker {
    display: inline-block;
    width: 4px;
    height: 18px;
    background-color: rgb(var(--orange));
    margin-right: 10px;
    border-radius: 2px;
}

.section-link {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgb(var(--blue-light));
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    background-color: rgb(var(--accent));
    border-radius: 0.25rem;
}

.section-link:hover {
    background-color: rgb(var(--secondary));
}

/* Tracks Container */
.track-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.track-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background-color: rgb(var(--card));
    border-radius: 0.25rem;
    transition: background-color 0.3s;
    border: 1px solid rgba(var(--border));
    position: relative;
}

.track-item:hover {
    background-color: rgb(var(--accent));
}

.track-item.playing {
    background-color: rgba(var(--primary), 0.1);
}

.track-item__rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    background-color: rgb(var(--orange));
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.track-item__artwork {
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.25rem;
    overflow: hidden;
    flex-shrink: 0;
}

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

.track-item__play {
    cursor: pointer;
    font-size: 20px;
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    margin-right: 10px;
    color: rgb(var(--orange));
    border: 1px solid rgba(var(--border));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.track-item.js-item-played .la-play:before {
    content: "\f04c";
}

.track-item.js-item-current.js-item-played .track-item__play {
    background: rgb(var(--orange));
    border-color: rgb(var(--orange));
    color: white;
}

.track-item__info {
    flex: 1;
    min-width: 0;
    margin-left: 0.25rem;
}

.track-item__title {
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    color: rgb(var(--foreground));
    text-decoration: none;
    transition: color 0.3s;
}

.track-item__title:hover {
    color: rgb(var(--blue-light));
}

.track-item__artist {
    font-size: 0.75rem;
    color: rgb(var(--muted-foreground));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    transition: color 0.3s;
}

.track-item__artist:hover {
    color: rgb(var(--blue-light));
}

.track-item__actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.track-item__action {
    width: 2rem;
    height: 2rem;
    border-radius: 4px;
    background-color: rgba(var(--foreground), 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    color: rgb(var(--muted-foreground));
    transition: color 0.3s;
    text-decoration: none;
}

.track-item__action:hover {
    color: rgb(var(--blue-light));
}

.track-item__action .icon {
    width: 1rem;
    height: 1rem;
}

/* Playlists Section */
.playlists-wrapper {
    position: relative;
}

.playlists-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .playlists-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .playlists-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .playlists-container {
        grid-template-columns: repeat(5, 1fr);
    }
}

.playlist-item {
    transition: transform 0.3s;
    text-decoration: none;
}

.playlist-item:hover {
    transform: translateY(-0.25rem);
}

.playlist-artwork {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 0.25rem;
    overflow: hidden;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(var(--border));
}

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

.playlist-item:hover .playlist-artwork img {
    transform: scale(1.05);
}

.playlist-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.playlist-item:hover .playlist-overlay {
    opacity: 1;
}

.playlist-play-button {
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgb(var(--orange));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.playlist-play-button svg {
    width: 1rem;
    height: 1rem;
    color: white;
}

.playlist-title {
    font-weight: 500;
    font-size: 0.75rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgb(var(--foreground));
    transition: color 0.3s;
}

.playlist-item:hover .playlist-title {
    color: rgb(var(--blue-light));
}

/* Artists Section */
.artists-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.artist-item {
    text-align: center;
    width: 4rem;
    transition: transform 0.3s;
    text-decoration: none;
}

@media (min-width: 640px) {
    .artist-item {
        width: 5rem;
    }
}

@media (min-width: 768px) {
    .artist-item {
        width: 6rem;
    }
}

.artist-item:hover {
    transform: translateY(-0.25rem);
}

.artist-avatar {
    position: relative;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 0.5rem;
    border: 1px solid rgba(var(--border));
}

@media (min-width: 640px) {
    .artist-avatar {
        width: 5rem;
        height: 5rem;
    }
}

@media (min-width: 768px) {
    .artist-avatar {
        width: 6rem;
        height: 6rem;
    }
}

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

.artist-item:hover .artist-avatar img {
    transform: scale(1.05);
}

.artist-name {
    font-weight: 500;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgb(var(--foreground));
    transition: color 0.3s;
}

.artist-item:hover .artist-name {
    color: rgb(var(--blue-light));
}

/* Footer */
.mini-footer {
    background-color: rgb(var(--card));
    border-top: 1px solid rgba(var(--border));
    padding: 0.75rem 0;
    margin-top: 2rem;
}

.mini-footer-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.mini-footer-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mini-footer-logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    color: rgb(var(--foreground));
}

.mini-footer-copyright {
    color: rgb(var(--muted-foreground));
    font-size: 0.75rem;
}

.mini-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.mini-footer-link {
    color: rgb(var(--muted-foreground));
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.3s;
}

.mini-footer-link:hover {
    color: rgb(var(--blue-light));
}

.mini-footer-social {
    display: flex;
    gap: 0.5rem;
}

.mini-footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.25rem;
    background-color: rgba(var(--foreground), 0.05);
    color: rgb(var(--foreground));
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
    font-size: 0.875rem;
}

.mini-footer-social-link:hover {
    background-color: rgb(var(--orange));
    color: white;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.25rem;
    background-color: transparent;
    border: none;
    cursor: pointer;
    color: rgb(var(--foreground));
    font-size: 1.5rem;
    transition: background-color 0.3s;
}

.mobile-menu-toggle:hover {
    background-color: rgba(var(--foreground), 0.05);
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(var(--card));
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    overflow-y: auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(var(--border));
}

.mobile-menu-close {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.25rem;
    background-color: transparent;
    border: none;
    cursor: pointer;
    color: rgb(var(--foreground));
    font-size: 1.5rem;
    transition: background-color 0.3s;
}

.mobile-menu-close:hover {
    background-color: rgba(var(--foreground), 0.05);
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    text-decoration: none;
    color: rgb(var(--foreground));
    font-weight: 500;
    transition: background-color 0.3s;
}

.mobile-menu-link:hover {
    background-color: rgba(var(--foreground), 0.05);
}

.mobile-menu-link.active {
    color: rgb(var(--orange));
    background-color: rgba(var(--orange), 0.1);
}

.mobile-menu-link .icon {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.mobile-menu-categories {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(var(--border));
}

.mobile-menu-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgb(var(--muted-foreground));
    margin-bottom: 0.75rem;
    padding-left: 1rem;
}

@media (max-width: 767px) {
    .header-content {
        flex-wrap: wrap;
    }

    .main-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

    .theme-toggle {
        margin-left: 0.5rem;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.375rem;
    margin-bottom: 5rem;
}

@media (min-width: 640px) {
    .pagination {
        gap: 0.5rem;
    }
}

.pagination__item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.25rem;
    background-color: rgb(var(--card));
    color: rgb(var(--foreground));
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    border: 1px solid rgba(var(--border));
    transition: background-color 0.3s, color 0.3s;
}

@media (min-width: 640px) {
    .pagination__item {
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 0.25rem;
        font-size: 1rem;
    }
}

.pagination__item:hover {
    background-color: rgb(var(--accent));
}

.pagination__item--active {
    background-color: rgb(var(--orange));
    color: white;
    border-color: rgb(var(--orange));
}

.pagination__item--next {
    font-size: 1rem;
}

@media (min-width: 640px) {
    .pagination__item--next {
        font-size: 1.25rem;
    }
}

.track-item__duration {
    font-size: 0.75rem;
    color: rgb(var(--muted-foreground));
    margin-right: 0.75rem;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .track-item__duration {
        display: none;
    }
}

/* Category list */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 0.25rem;
    background-color: rgb(var(--card));
    border: 1px solid rgba(var(--border));
    text-decoration: none;
    color: rgb(var(--foreground));
    transition: background-color 0.3s;
}

.category-item:hover {
    background-color: rgb(var(--accent));
}

.category-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: rgb(var(--orange));
}

.category-name {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Top section tabs like mp3uk */
.top-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.top-tab {
    flex: 1;
    padding: 0.75rem;
    text-align: center;
    background-color: rgb(var(--secondary));
    border-radius: 0.5rem;
    font-weight: 600;
    color: rgb(var(--foreground));
    text-decoration: none;
    transition: background-color 0.3s;
}

.top-tab:hover {
    background-color: rgba(var(--orange), 0.1);
}

.top-tab.active {
    background-color: rgb(var(--orange));
    color: white;
}

/* Responsive adjustments */
@media screen and (max-width: 1220px) {
    body {
        background-image: none;
    }

    .container {
        max-width: 100%;
        border-radius: 0;
    }
}

/* Исправление для кнопки воспроизведения */
.track-item__play-icon {
    font-size: 20px;
}
