/* ================================
   GLOBAL STYLES
   ================================ */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
}

/* Main wrapper (для контента справа от сайдбара) */
.main-wrapper {
    margin-left: 50px;
    flex: 1;
    width: calc(100% - 50px);
}

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

/* Common elements */
h1 {
    font-size: 3rem;
    color: #9FE870;
    margin-bottom: 1rem;
    font-weight: 800;
}

h2 {
    color: #9FE870;
    margin: 2rem 0 1rem;
}

.subtitle {
    font-size: 1.2rem;
    color: #aaa;
}

header {
    text-align: center;
    margin-bottom: 60px;
}

.breadcrumbs {
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: #9FE870;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    color: #666;
    margin: 0 10px;
}


/* ================================
   HEADER & SIDEBAR NAVIGATION
   ================================ */

.sidebar {
    width: 50px;
    background: #9FE870;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 0;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
}

.logo {
    width: 35px;
    height: 35px;
    background: #000;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.2rem;
    color: #9FE870;
    margin-bottom: 40px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

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

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    color: #000;
    transition: all 0.3s ease;
    padding: 10px 3px;
    position: relative;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    width: 100%;
    transform: rotate(180deg);
}

.nav-item:hover {
    opacity: 0.7;
}

.nav-item.active {
    opacity: 1;
    font-weight: 900;
}


/* ================================
   GENRE PAGE STYLES (genre.php)
   ================================ */

/* Genre Page Header */
.genre-page header {
    margin-bottom: 20px;
}

.genre-page header h1 {
    font-size: 42px;
    font-weight: 800;
    margin: 0 0 15px 0;
    text-align: left;
    line-height: 1.2;
}

.genre-page .subtitle {
    font-size: 18px;
    color: #aaa;
    margin: 0;
    text-align: left;
}

/* Rating Block */
.rating-block {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 10px 0 30px;
}

.stars {
    display: flex;
    gap: 4px;
}

.star {
    width: 24px;
    height: 24px;
}

.rating-text {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.rating-value {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}

.rating-count {
    font-size: 14px;
    color: #aaa;
}

/* Hero Grid - Playlist + Artist */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 40px 0;
}

.featured-playlist {
    display: flex;
    align-items: start;
}

.featured-embed {
    width: 100%;
    height: 500px;
    border: none;
    border-radius: 8px;
}

.artist-embed {
    border-radius: 12px;
}

/* Similar Genres Section */
.similar-section {
    margin: 0 0 20px;
}

.similar-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: #9FE870;
    margin-bottom: 20px;
}

.similar-genres-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

/* FAQ Section */
.faq-section {
    margin: 0 0 60px;
}

.faq-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: #9FE870;
    margin-bottom: 20px;
    grid-column: 1 / -1;
}

.faq-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.faq-item {
    background: #121212;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #121212;
}

.faq-item h3 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 12px 0;
}

.faq-item p {
    color: #aaa;
    margin: 0;
    line-height: 1.6;
}

/* Genre Card Styles */
.genre-card {
    background: #121212;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #121212;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s;
    text-align: left;
}

.genre-card:hover {
    border-color: #9FE870;
    box-shadow: 0 4px 12px rgba(159, 232, 112, 0.3);
}

.genre-name {
    font-weight: 600;
    font-size: 16px;
}

/* CTA Section */
.cta-section {
    text-align: left;
    margin: 20px 0 0;
}

.cta-button {
    display: inline-block;
    padding: 16px 40px;
    background: #9FE870;
    color: #000;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 18px;
    transition: all 0.3s ease;
}

.cta-button:hover {
    box-shadow: 0 6px 20px rgba(159, 232, 112, 0.5);
}


/* ================================
   GENRES PAGE STYLES (genres.php)
   ================================ */

.search-container {
    margin: 30px 0;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.search-box {
    width: 100%;
    padding: 15px 20px 15px 45px;
    font-size: 18px;
    background: #121212;
    color: #fff;
    border: 2px solid #2a2a2a;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s;
}

.search-box::placeholder {
    color: #666;
}

.search-box:focus {
    border-color: #9FE870;
    box-shadow: 0 0 20px rgba(159, 232, 112, 0.2);
}

.alphabet-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: space-between;
    margin: 30px 0;
    padding: 15px;
    background: #121212;
    border-radius: 8px;
    overflow-x: auto;
}

.alphabet-nav::-webkit-scrollbar {
    height: 6px;
}

.alphabet-nav::-webkit-scrollbar-track {
    background: #000;
    border-radius: 3px;
}

.alphabet-nav::-webkit-scrollbar-thumb {
    background: #9FE870;
    border-radius: 3px;
}

.alphabet-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    background: #1a1a1a;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 6px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.alphabet-nav a:hover,
.alphabet-nav a.active {
    border-color: #9FE870;
    color: #9FE870;
    background: #2a2a2a;
}

.alphabet-nav a[style*="opacity"] {
    opacity: 0.3 !important;
    cursor: default;
}

.genre-section {
    margin: 40px 0;
}

.genre-section-header {
    font-size: 36px;
    font-weight: 700;
    color: #9FE870;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #9FE870;
}

.genres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.genres-page header {
    margin-bottom: 40px;
}

.genres-page header h1 {
    font-size: 42px;
    font-weight: 800;
    margin: 0 0 15px 0;
    text-align: left;
    line-height: 1.2;
}

.genre-count {
    color: #9FE870;
    font-weight: 700;
}

.genres-page .subtitle {
    font-size: 18px;
    color: #aaa;
    margin: 0;
    text-align: left;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.hidden {
    display: none !important;
}

.back-home {
    display: inline-block;
    padding: 12px 30px;
    background: #9FE870;
    color: #000;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(159, 232, 112, 0.5);
}


/* ================================
   MOOD PAGE STYLES (mood.php)
   ================================ */

/* Mood Page Header */
.mood-page header {
    margin-bottom: 20px;
}

.mood-page header h1 {
    font-size: 42px;
    font-weight: 800;
    margin: 0 0 15px 0;
    text-align: left;
    line-height: 1.2;
}

.mood-page .subtitle {
    font-size: 18px;
    color: #aaa;
    margin: 0;
    text-align: left;
}

.content {
    max-width: 900px;
    margin-bottom: 60px;
}

.content p {
    color: #ccc;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.content ul {
    color: #ccc;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.content ul li {
    margin-bottom: 0.5rem;
}

.playlists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.playlist-card {
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #333;
}

.playlist-card:hover {
    border-color: #9FE870;
    transform: translateY(-4px);
}

.playlist-embed {
    width: 100%;
    height: 380px;
    border: none;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #1a1a1a;
    border-radius: 8px;
    margin-bottom: 40px;
}

.empty-state h2 {
    color: #9FE870;
    margin-bottom: 1rem;
}

.empty-state p {
    color: #aaa;
    font-size: 1.1rem;
}

.back-link {
    display: inline-block;
    padding: 12px 30px;
    background: #9FE870;
    color: #000;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(159, 232, 112, 0.5);
}


/* ================================
   MOODS PAGE STYLES (moods.php)
   ================================ */

.category-section {
    margin-bottom: 60px;
}

.category-title {
    font-size: 2rem;
    color: #9FE870;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #9FE870;
}

.moods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.mood-card {
    background: #121212;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #121212;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s;
    text-align: left;
}

.mood-card:hover {
    border-color: #9FE870;
    box-shadow: 0 4px 12px rgba(159, 232, 112, 0.3);
}

.mood-name {
    font-weight: 600;
    font-size: 16px;
}

.moods-page header {
    margin-bottom: 20px;
}

.moods-page header h1 {
    font-size: 42px;
    font-weight: 800;
    margin: 0 0 15px 0;
    text-align: left;
    line-height: 1.2;
}

.moods-page .subtitle {
    font-size: 18px;
    color: #aaa;
    margin: 0;
    text-align: left;
}


/* ================================
   HOME PAGE STYLES (index.php)
   ================================ */

/* Animated Wave Canvas */
#waveCanvas {
    position: fixed;
    top: 50%;
    left: 50px;
    transform: translateY(-50%);
    width: calc(100% - 50px);
    z-index: 0;
    pointer-events: none;
}

.home-page .main-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.home-page .container {
    max-width: 1400px;
    width: 100%;
    padding: 40px 60px;
}

.hero-content {
    max-width: 800px;
    text-align: left;
}

.home-page h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.home-page .subtitle {
    font-size: 1.5rem;
    color: #aaa;
    margin-bottom: 2rem;
    font-weight: 400;
}

.description {
    font-size: 1.1rem;
    color: #888;
    margin-bottom: 3rem;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.home-page .cta-button {
    display: inline-block;
    padding: 16px 40px;
    background: #9FE870;
    color: #000;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #9FE870;
    text-align: center;
}

.home-page .cta-button:hover {
    background: transparent;
    color: #9FE870;
    border-color: #9FE870;
}

.cta-button.secondary {
    background: transparent;
    color: #9FE870;
    border: 2px solid #9FE870;
}

.cta-button.secondary:hover {
    background: #9FE870;
    color: #000;
    border-color: #9FE870;
}

.features {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 4rem;
}

.feature {
    padding: 1.5rem;
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
}

.feature-icon svg {
    width: 100%;
    height: 100%;
}

.feature-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.feature-text {
    color: #aaa;
    font-size: 0.95rem;
}


/* ================================
   MOBILE RESPONSIVE STYLES
   ================================ */

@media (max-width: 768px) {
    /* Global Mobile */
    .main-wrapper {
        margin-left: 0;
        margin-top: 50px;
        width: 100%;
    }

    h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    /* Sidebar Mobile */
    .sidebar {
        width: 100%;
        height: auto;
        flex-direction: row;
        justify-content: space-around;
        padding: 8px 15px;
        position: fixed;
        top: 0;
        bottom: auto;
    }

    .logo {
        margin-bottom: 0;
        width: 30px;
        height: 30px;
        min-width: 30px;
        font-size: 1rem;
        border-radius: 6px;
        flex-shrink: 0;
    }

    .nav-menu {
        flex-direction: row;
        gap: 15px;
        margin-left: 15px;
    }

    .nav-item {
        writing-mode: horizontal-tb;
        font-size: 0.9rem;
        padding: 5px 6px;
        transform: none;
        min-width: auto;
        width: auto;
    }

    /* Genre Page Mobile */
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .featured-embed {
        height: 400px;
    }

    .similar-genres-grid {
        grid-template-columns: 1fr;
    }

    .genre-page header h1 {
        font-size: 32px;
    }

    .faq-section {
        grid-template-columns: 1fr;
    }

    .faq-section h2,
    .similar-section h2 {
        font-size: 24px;
    }

    .rating-value {
        font-size: 20px;
    }

    .rating-count {
        font-size: 13px;
    }

    .star {
        width: 20px;
        height: 20px;
    }

    /* Mood Page Mobile */
    .mood-page header h1 {
        font-size: 32px;
    }

    /* Genres Page Mobile */
    .alphabet-nav {
        flex-wrap: wrap;
        justify-content: center;
        overflow-x: visible;
    }

    /* Home Page Mobile */
    .home-page h1 {
        font-size: 2.5rem;
    }

    .home-page .subtitle {
        font-size: 1.2rem;
    }

    .home-page .cta-button {
        flex: 1;
        min-width: 200px;
    }

    .cta-buttons {
        width: 100%;
    }

    .features {
        flex-direction: column;
        gap: 2rem;
    }

    /* About Page Mobile */
    .about-photo-spotify {
        grid-template-columns: 1fr !important;
    }

    .about-sections {
        grid-template-columns: 1fr !important;
    }
}

/* ================================
   LANGUAGE SWITCHER
   ================================ */

.lang-toggle {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #000;
    font-size: 0.75rem;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001;
}

.lang-toggle:hover {
    background: #9FE870;
    color: #000;
}

.lang-dropdown-menu {
    position: fixed;
    left: 80px;
    bottom: 80px;
    background: #9FE870;
    border-radius: 12px;
    padding: 10px 0;
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 4px 20px rgba(159, 232, 112, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.lang-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown-menu::-webkit-scrollbar {
    width: 8px;
}

.lang-dropdown-menu::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.lang-dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.lang-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

.lang-dropdown-menu .dropdown-item.active {
    background: rgba(0, 0, 0, 0.15);
    font-weight: 700;
}

/* ================================
   DROPDOWN MENU (3 DOTS)
   ================================ */

.menu-toggle {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #000;
    font-size: 2.5rem;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001;
    text-shadow: 0.5px 0 0 #000, -0.5px 0 0 #000, 0 0.5px 0 #000, 0 -0.5px 0 #000;
}

.menu-toggle:hover {
    background: #9FE870;
    color: #000;
}

.dropdown-menu {
    position: fixed;
    left: 80px;
    bottom: 20px;
    background: #9FE870;
    border-radius: 12px;
    padding: 10px 0;
    min-width: 200px;
    box-shadow: 0 4px 20px rgba(159, 232, 112, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: #000;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(0, 0, 0, 0.1);
    padding-left: 25px;
}

/* Mobile Dropdown Menu & Language Switcher */
@media (max-width: 768px) {
    .lang-toggle {
        bottom: auto;
        top: 5px;
        right: 60px;
        left: auto;
        transform: none;
    }

    .lang-dropdown-menu {
        left: auto;
        right: 60px;
        bottom: auto;
        top: 55px;
        max-height: 400px;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .menu-toggle {
        bottom: auto;
        top: 5px;
        right: 15px;
        left: auto;
        transform: rotate(90deg);
    }

    .dropdown-menu {
        left: auto;
        right: 15px;
        bottom: auto;
        top: 55px;
    }
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border-top: 3px solid #9FE870;
    padding: 10px 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.cookie-icon {
    font-size: 1.5rem;
    position: relative;
    top: 4px;
}

.cookie-text {
    flex: 1;
    color: #fff;
    font-size: 0.95rem;
    margin: 0;
}

.cookie-link {
    color: #9FE870;
    text-decoration: underline;
}

.cookie-link:hover {
    color: #8ed65f;
}

.cookie-accept {
    background: #9FE870;
    color: #000;
    border: none;
    padding: 10px 30px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-accept:hover {
    background: #8ed65f;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .cookie-text {
        font-size: 0.9rem;
    }
}
