:root {
    --bg-dark: #0f0f0f;
    --bg-panel: #1e1e1e;
    --bg-card: #2a2a2a;
    --bg-hover: #3a3a3a;
    --primary: #00d2d3;
    --primary-hover: #01a3a4;
    --text-main: #f1f1f1;
    --text-muted: #aaaaaa;
    --border-color: #333333;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-x: hidden;
}

.top-header {
    background-color: var(--bg-panel);
    padding: 15px 30px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    gap: 40px;
    z-index: 50;
    position: sticky;
    top: 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
}

.logo span {
    color: var(--primary);
}

.search-container {
    flex-grow: 1;
    max-width: 600px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#searchInput {
    width: 100%;
    padding: 10px 15px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: 0.2s;
}

#searchInput:focus {
    border-color: var(--primary);
}

.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.1s;
    flex-shrink: 0;
}

.icon-btn:hover {
    background-color: var(--bg-hover);
    color: var(--primary);
    border-color: var(--primary);
}

.primary-btn {
    background-color: var(--primary);
    color: var(--bg-dark);
    border: none;
    padding: 0 25px;
    border-radius: var(--radius-md);
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.primary-btn:hover {
    background-color: var(--primary-hover);
}

.mobile-filter {
    display: none;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 80;
    backdrop-filter: blur(2px);
}

.app-container {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
    position: relative;
}

.hidden {
    display: none !important;
}

.sidebar {
    width: 340px;
    background-color: var(--bg-panel);
    padding: 25px;
    overflow-y: auto;
    border-right: 1px solid var(--border-color);
    flex-shrink: 0;
    z-index: 90;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.text-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-section {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.filter-title {
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-select {
    width: 100%;
    padding: 10px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    outline: none;
    font-size: 0.95rem;
    cursor: pointer;
}

.sidebar-select:focus {
    border-color: var(--primary);
}

.sidebar-select option {
    background: var(--bg-panel);
    color: var(--text-main);
}

.autocomplete-wrapper {
    position: relative;
    width: 100%;
}

.ac-input {
    width: 100%;
    padding: 10px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    outline: none;
}

.ac-input:focus {
    border-color: var(--primary);
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.ac-item {
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.ac-item:hover {
    background-color: var(--bg-hover);
}

.ac-match {
    color: var(--primary);
    font-weight: bold;
}

.ac-arrow {
    color: var(--text-muted);
    margin: 0 6px;
    font-size: 0.8rem;
}

.ac-count {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.selected-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.sel-pill {
    background-color: var(--bg-hover);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border-color);
}

.sel-pill i {
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
}

.sel-pill i:hover {
    color: #ff4757;
}

.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill input {
    display: none;
}

.pill span {
    display: inline-block;
    padding: 6px 12px;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
}

.pill input:checked + span {
    background-color: var(--primary);
    color: var(--bg-dark);
    border-color: var(--primary);
    font-weight: bold;
}

.toggle-switch {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.toggle-switch input {
    display: none;
}

.slider {
    width: 40px;
    height: 20px;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    position: relative;
    margin-right: 12px;
    transition: 0.3s;
}

.slider::before {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--text-muted);
    top: 2px;
    left: 3px;
    transition: 0.3s;
}

.toggle-switch input:checked + .slider {
    background-color: var(--primary);
    border-color: var(--primary);
}

.toggle-switch input:checked + .slider::before {
    background-color: var(--bg-dark);
    transform: translateX(18px);
}

.content-area {
    flex-grow: 1;
    padding: 30px;
    overflow-y: auto;
    background-color: var(--bg-dark);
    width: 100%;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.song-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.2s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.song-card:hover {
    transform: translateY(-2px);
    outline: 1px solid var(--primary);
}

.song-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #111;
    background-size: cover;
    background-position: center;
    position: relative;
}

.no-thumb-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 10px;
    background-color: #1a1a1a;
}

.song-info {
    padding: 12px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.song-title {
    font-size: 0.95rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-artist {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-meta {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.watch-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px 40px;
    background-color: var(--bg-dark);
}

.watch-header {
    margin-bottom: 20px;
}

.watch-layout {
    display: flex;
    gap: 30px;
    max-width: 1600px;
    margin: 0 auto;
}

.watch-main {
    flex: 3;
    min-width: 0;
}

.watch-sidebar {
    flex: 1;
    min-width: 300px;
}

.video-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 20px;
}

.video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.no-video {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    flex-direction: column;
    gap: 10px;
    text-align: center;
    padding: 20px;
}

.watch-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    line-height: 1.3;
}

.watch-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.watch-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.action-btn {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn:hover {
    background-color: var(--bg-hover);
}

.watch-description {
    background-color: var(--bg-panel);
    padding: 20px;
    border-radius: var(--radius-md);
}

.desc-section {
    margin-bottom: 15px;
}

.desc-section strong {
    display: block;
    margin-bottom: 5px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.watch-sidebar h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.related-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.related-card {
    display: flex;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.related-thumb {
    width: 120px;
    height: 68px;
    background-size: cover;
    background-position: center;
    background-color: #111;
    position: relative;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.related-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.related-title {
    font-size: 0.9rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-artist {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 900px) {
    .top-header {
        padding: 15px;
        gap: 15px;
        flex-direction: column;
        align-items: flex-start;
    }

    .search-container {
        width: 100%;
        max-width: 100%;
    }

    .mobile-filter {
        display: flex;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        height: 100vh;
        width: 85%;
        max-width: 340px;
        transition: left 0.3s ease;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .content-area {
        padding: 15px;
    }

    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .watch-container {
        padding: 15px;
    }

    .watch-layout {
        flex-direction: column;
    }

    .watch-sidebar {
        min-width: 100%;
    }

    .watch-title {
        font-size: 1.2rem;
    }

}