/* Variables */
:root {
    --primary: #1a472a;
    --primary-light: #2d5a3c;
    --primary-dark: #0f2d1a;
    --accent: #c9a227;
    --accent-light: #ddb83d;
    --text: #333333;
    --text-light: #666666;
    --bg: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    --radius: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    padding-bottom: 100px;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.header .container {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--white);
    font-family: 'Amiri', serif;
    font-size: 1.5rem;
    font-weight: 700;
}

.bismillah {
    height: 35px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 1;
    overflow: visible;
}

.nav-visible {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 1;
    min-width: 0;
}

.nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
}

.nav a:hover, .nav a.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
}

/* Menu "Plus" déroulant */
.nav-more {
    position: relative;
    display: none;
}

.nav-more.visible {
    display: block;
}

.nav-more-btn {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border: none;
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-more-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.nav-more-btn span {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.nav-more.open .nav-more-btn span {
    transform: rotate(180deg);
}

.nav-more-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 5px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.nav-more.open .nav-more-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-more-dropdown a {
    display: block;
    color: var(--text) !important;
    background: var(--white) !important;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    border-radius: 0;
}

.nav-more-dropdown a:last-child {
    border-bottom: none;
}

.nav-more-dropdown a:hover {
    background: var(--bg) !important;
    color: var(--primary) !important;
}

.nav-more-dropdown a:active,
.nav-more-dropdown a.active {
    background: var(--primary) !important;
    color: var(--white) !important;
}

.search-box {
    position: relative;
}

.search-box input {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 10px 20px;
    color: var(--white);
    font-size: 0.9rem;
    width: 200px;
    transition: var(--transition);
}

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

.search-box input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.25);
    width: 250px;
}

.search-results {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: none;
    max-height: 400px;
    overflow-y: auto;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: var(--transition);
}

.search-result-item:hover {
    background: var(--bg);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item .type {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
}

.search-result-item .name {
    color: var(--text);
    font-weight: 500;
}

.search-result-item .path {
    font-size: 0.8rem;
    color: var(--text-light);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--white);
    transition: var(--transition);
}

/* Hero */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-lg);
    color: var(--white);
    margin-bottom: 40px;
}

.hero h1 {
    font-family: 'Amiri', serif;
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Views */
.view {
    display: none;
}

.view.active {
    display: block;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-card .icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.category-card .icon svg {
    width: 30px;
    height: 30px;
    fill: var(--white);
}

.category-card h3 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.category-card .stats {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

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

.breadcrumb span {
    color: var(--text-light);
}

/* Albums Grid */
.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

.album-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.album-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.album-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.album-card .info {
    padding: 15px;
}

.album-card h4 {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 5px;
    line-height: 1.3;
}

.album-card .track-count {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Album Detail */
.album-header {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.album-cover {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.album-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.album-info h2 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.album-info p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.btn-play-all {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    align-self: flex-start;
}

.btn-play-all:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(201, 162, 39, 0.4);
}

/* Tracks List */
.tracks-list {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.track-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: var(--transition);
}

.track-item:last-child {
    border-bottom: none;
}

.track-item:hover, .track-item.active {
    background: var(--bg);
}

.track-item.active {
    border-left: 3px solid var(--primary);
}

.track-number {
    width: 40px;
    font-weight: 600;
    color: var(--text-light);
}

.track-name {
    flex: 1;
    font-weight: 500;
}

.track-item.active .track-name {
    color: var(--primary);
}

.track-play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.track-item:hover .track-play-btn,
.track-item.active .track-play-btn {
    opacity: 1;
}

.track-play-btn svg {
    width: 14px;
    height: 14px;
    fill: var(--white);
}

/* Player */
.player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 15px 0;
}

.player-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
}

.player-info img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--radius);
}

.player-title {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.player-artist {
    font-size: 0.8rem;
    color: var(--text-light);
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.player-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--text);
}

.player-btn:hover {
    background: var(--bg);
}

.player-btn-main {
    width: 50px;
    height: 50px;
    background: var(--primary);
}

.player-btn-main svg {
    fill: var(--white);
}

.player-btn-main:hover {
    background: var(--primary-light);
}

.player-progress {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-progress span {
    font-size: 0.8rem;
    color: var(--text-light);
    min-width: 45px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.player-volume {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.player-volume svg {
    width: 20px;
    height: 20px;
    fill: var(--text-light);
}

.player-volume input[type="range"] {
    width: 80px;
    accent-color: var(--primary);
}

/* Footer */
.footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 20px;
    margin-top: 60px;
}

/* Main */
.main {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

/* Responsive */
@media (max-width: 900px) {
    .header .container {
        flex-wrap: wrap;
    }

    .nav {
        order: 3;
        width: 100%;
        display: none;
        flex-direction: column;
        gap: 0;
        margin-top: 15px;
    }

    .nav.active {
        display: flex;
    }

    .nav a {
        padding: 12px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .menu-toggle {
        display: flex;
    }

    .search-box {
        flex: 1;
    }

    .search-box input {
        width: 100%;
    }

    .search-box input:focus {
        width: 100%;
    }

    .album-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .album-cover {
        width: 200px;
        height: 200px;
    }

    .btn-play-all {
        align-self: center;
    }

    .player-container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .player-info {
        min-width: auto;
        flex: 1;
    }

    .player-progress {
        order: 3;
        width: 100%;
    }

    .player-volume {
        display: none;
    }

    .hero h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .categories-grid, .albums-grid {
        grid-template-columns: 1fr;
    }
}
