/* ==========================================================
   SpotiDown - Modern Spotify Dark Theme CSS
   ========================================================== */

:root {
    --bg-dark: #0a0b0e;
    --bg-surface: #121318;
    --bg-card: #181920;
    --bg-card-hover: #22242c;
    --border-card: rgba(255, 255, 255, 0.08);
    --border-card-hover: rgba(29, 185, 84, 0.35);

    --primary: #1DB954;
    --primary-hover: #1ed760;
    --primary-dark: #169b43;
    --primary-glow: rgba(29, 185, 84, 0.3);

    --text-main: #ffffff;
    --text-muted: #9aa0a6;
    --text-dim: #60646c;

    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --danger: #ef4444;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.5;
}

/* Background Ambient Blobs */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(130px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
}
.blob-1 {
    width: 450px;
    height: 450px;
    background: #1DB954;
    top: -100px;
    left: -100px;
}
.blob-2 {
    width: 500px;
    height: 500px;
    background: #1e3a8a;
    top: 20%;
    right: -150px;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* Navbar */
.navbar {
    height: 76px;
    display: flex;
    align-items: center;
    background: rgba(10, 11, 14, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-card);
    position: sticky;
    top: 0;
    z-index: 50;
}
.nav-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.brand-logo:hover {
    transform: translateY(-1px);
}
.logo-mark {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 14px rgba(29, 185, 84, 0.45));
    transition: filter 0.3s ease, transform 0.3s ease;
}
.brand-logo:hover .logo-mark {
    filter: drop-shadow(0 0 20px rgba(29, 185, 84, 0.75));
    transform: scale(1.04);
}
.brand-svg {
    width: 100%;
    height: 100%;
    display: block;
}
.brand-name {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: inline-flex;
    align-items: center;
    color: #ffffff;
}
.brand-name .accent-dl {
    color: var(--primary);
    background: linear-gradient(135deg, #22e668 0%, #1db954 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-left: 1px;
}
.brand-name .tld-tag {
    font-size: 0.8rem;
    font-weight: 700;
    color: #1ed760;
    background: rgba(29, 185, 84, 0.14);
    border: 1px solid rgba(29, 185, 84, 0.35);
    border-radius: 6px;
    padding: 2px 6px;
    margin-left: 6px;
    letter-spacing: -0.2px;
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
}
.nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
}
.nav-badges {
    display: flex;
    gap: 10px;
    align-items: center;
}
.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.badge-pulse {
    background: rgba(29, 185, 84, 0.12);
    color: var(--primary);
    border: 1px solid rgba(29, 185, 84, 0.25);
}
.badge-accent {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    border: 1px solid var(--border-card);
}

/* Language Selector */
.lang-selector-wrapper {
    position: relative;
    user-select: none;
}
.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #ffffff;
    padding: 7px 12px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.lang-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(29, 185, 84, 0.5);
    box-shadow: 0 0 15px rgba(29, 185, 84, 0.2);
}
.lang-globe {
    font-size: 0.95rem;
    line-height: 1;
}
.lang-current {
    font-weight: 700;
    letter-spacing: 0.5px;
}
.lang-chevron {
    width: 13px;
    height: 13px;
    transition: transform 0.2s ease;
}
.lang-selector-wrapper.open .lang-chevron {
    transform: rotate(180deg);
}
.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #15171e;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
    width: 170px;
    max-height: 380px;
    overflow-y: auto;
    z-index: 1000;
    padding: 6px;
    backdrop-filter: blur(24px);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.lang-dropdown.hidden {
    display: none !important;
}
html[dir="rtl"] .lang-dropdown {
    right: auto;
    left: 0;
}
.lang-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: #d8d8d8;
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
}
html[dir="rtl"] .lang-option {
    text-align: right;
}
.lang-option:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}
.lang-option.active {
    background: rgba(29, 185, 84, 0.16);
    color: var(--primary);
    font-weight: 700;
}

/* Hero Section */
.hero-section {
    padding: 60px 0 40px;
    text-align: center;
}
.hero-title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1.2px;
    line-height: 1.15;
    margin-bottom: 16px;
}
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, #a7f3d0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto 36px;
    font-weight: 400;
}

/* Search Card */
.search-card {
    background: rgba(24, 25, 32, 0.7);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    max-width: 820px;
    margin: 0 auto;
    transition: var(--transition);
}
.search-card:focus-within {
    border-color: var(--border-card-hover);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px var(--primary-glow);
}
.search-form {
    display: flex;
    gap: 14px;
}
.input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(18, 19, 24, 0.85);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 0 16px;
    transition: var(--transition);
}
.input-wrapper:focus-within {
    border-color: var(--primary);
    background: #181920;
}
.input-icon {
    width: 20px;
    height: 20px;
    color: var(--text-dim);
    margin-right: 12px;
    flex-shrink: 0;
}
.url-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-size: 0.98rem;
    padding: 14px 0;
}
.url-input::placeholder {
    color: var(--text-dim);
}
.btn-paste {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    margin-left: 8px;
}
.btn-paste svg {
    width: 14px;
    height: 14px;
}
.btn-paste:hover {
    background: rgba(255, 255, 255, 0.16);
    color: var(--text-main);
}
.btn-clear {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1rem;
    cursor: pointer;
    margin-left: 8px;
    padding: 4px;
}
.btn-clear:hover {
    color: var(--text-main);
}
.btn-primary {
    background: var(--primary);
    color: #000000;
    border: none;
    padding: 0 32px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 140px;
    box-shadow: 0 4px 20px var(--primary-glow);
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--primary-glow);
}
.btn-primary:active {
    transform: translateY(0);
}

/* Sample Shortcuts */
.samples-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}
.samples-label {
    font-size: 0.82rem;
    color: var(--text-dim);
    font-weight: 600;
    letter-spacing: 0.2px;
    white-space: nowrap;
}
.samples-chips {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.sample-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-card);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    outline: none;
    line-height: 1;
}
.sample-chip:hover {
    background: rgba(29, 185, 84, 0.14);
    border-color: rgba(29, 185, 84, 0.4);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(29, 185, 84, 0.15);
}
.sample-chip:active {
    transform: scale(0.97);
}
.chip-icon {
    font-size: 0.85rem;
    line-height: 1;
}
.chip-text {
    line-height: 1;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(24, 25, 32, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-card);
    padding: 12px 24px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    z-index: 1000;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}
.toast.toast-error {
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}
.toast.toast-success {
    border-color: rgba(29, 185, 84, 0.4);
    color: #86efac;
}

/* ==========================================================
   Result Card Presentation
   ========================================================== */
.result-section {
    margin: 40px 0 60px;
    animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Track Card */
.track-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 36px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}
.track-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #3b82f6);
}

.cover-wrapper {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    aspect-ratio: 1/1;
    background: #000;
}
.track-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.cover-wrapper:hover .track-cover-img {
    transform: scale(1.04);
}
.cover-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(29, 185, 84, 0.4);
}

.track-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.track-type-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.track-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 10px;
    color: var(--text-main);
}
.track-artist {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 20px;
}
.track-meta-row {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.04);
    padding: 4px 12px;
    border-radius: var(--radius-full);
}
.meta-item svg {
    width: 15px;
    height: 15px;
}

/* Audio Preview Player Box */
.preview-player-box {
    background: rgba(18, 19, 24, 0.6);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.btn-preview-play {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: #000;
    border: none;
    font-size: 1rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}
.btn-preview-play:hover {
    transform: scale(1.08);
    background: var(--primary-hover);
}
.preview-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Track Actions */
.track-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}
.btn-download-mp3 {
    background: var(--primary);
    color: #000;
    border: none;
    box-shadow: 0 4px 20px var(--primary-glow);
}
.btn-download-mp3:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--primary-glow);
}
.btn-download-cover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--border-card);
}
.btn-download-cover:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}
.btn-action svg {
    width: 18px;
    height: 18px;
}

/* ==========================================================
   Playlist Presentation
   ========================================================== */
.playlist-header-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    margin-bottom: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}
.playlist-header-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, var(--primary));
}

.playlist-cover-wrapper {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    aspect-ratio: 1/1;
}
.playlist-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.playlist-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.playlist-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 8px;
}
.playlist-author {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.playlist-description {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Playlist Controls & Filter */
.playlist-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}
.filter-input-wrapper {
    position: relative;
    max-width: 340px;
    width: 100%;
}
.filter-input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 10px 16px 10px 38px;
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}
.filter-input:focus {
    border-color: var(--primary);
}
.filter-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-dim);
}

/* Tracks List Table */
.tracks-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}
.tracks-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.tracks-table th {
    background: rgba(18, 19, 24, 0.95);
    padding: 14px 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-dim);
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--border-card);
}
.tracks-table td {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.92rem;
    vertical-align: middle;
}
.tracks-table tr:hover td {
    background: var(--bg-card-hover);
}
.col-num {
    width: 50px;
    color: var(--text-dim);
    font-weight: 600;
}
.col-title {
    display: flex;
    align-items: center;
    gap: 14px;
}
.track-row-thumb {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}
.track-row-info {
    display: flex;
    flex-direction: column;
}
.track-row-title {
    font-weight: 600;
    color: var(--text-main);
}
.track-row-artist {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.col-duration {
    width: 80px;
    color: var(--text-dim);
    font-size: 0.85rem;
}
.col-actions {
    width: 220px;
    text-align: right;
}
.table-btn-group {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.btn-table-action {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-card);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.btn-table-action:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
}
.btn-table-play {
    background: rgba(29, 185, 84, 0.15);
    border-color: rgba(29, 185, 84, 0.3);
    color: var(--primary);
}

/* ==========================================================
   Features Section
   ========================================================== */
.features-section {
    padding: 80px 0 50px;
}
.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 48px;
    letter-spacing: -0.5px;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    transition: var(--transition);
}
.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-card-hover);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}
.feature-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(29, 185, 84, 0.12);
    border: 1px solid rgba(29, 185, 84, 0.25);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.feature-icon-wrapper svg {
    width: 24px;
    height: 24px;
}
.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.feature-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Steps Section */
.how-section {
    padding: 50px 0;
}
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.step-card {
    background: rgba(24, 25, 32, 0.5);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 28px;
    position: relative;
}
.step-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
}
.step-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.step-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* FAQ Accordion */
.faq-section {
    padding: 50px 0 90px;
}
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    transition: var(--transition);
}
.faq-item[open] {
    border-color: rgba(29, 185, 84, 0.3);
}
.faq-question {
    font-weight: 600;
    cursor: pointer;
    outline: none;
    user-select: none;
}
.faq-answer {
    padding-top: 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ==========================================================
   Global Audio Player (Floating Bottom Bar)
   ========================================================== */
.global-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(18, 19, 24, 0.94);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-card);
    z-index: 100;
    display: flex;
    align-items: center;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}
.player-container {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 20px;
}
.player-thumb {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.player-info {
    width: 200px;
    overflow: hidden;
}
.player-title {
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.player-artist {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.player-controls {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
}
.player-btn-play {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: #000;
    border: none;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.player-btn-play:hover {
    transform: scale(1.08);
}
.player-progress-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}
.player-time {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-family: monospace;
}
.player-progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
    cursor: pointer;
}
.player-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary);
    border-radius: var(--radius-full);
}
.player-btn-close {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px;
}
.player-btn-close:hover {
    color: var(--text-main);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-card);
    padding: 40px 0;
    margin-top: 40px;
    background: rgba(10, 11, 14, 0.8);
}
.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.footer-brand p {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: 4px;
}
.footer-copy {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* Utilities */
.hidden {
    display: none !important;
}

/* RTL Support for Persian and Arabic */
html[dir="rtl"] {
    font-family: 'Vazirmatn', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}
html[dir="rtl"] .input-icon {
    margin-right: 0;
    margin-left: 10px;
}
html[dir="rtl"] .brand-name .tld-tag {
    margin-left: 0;
    margin-right: 6px;
}
html[dir="rtl"] .faq-question::after {
    right: auto;
    left: 20px;
}
html[dir="rtl"] .track-actions {
    justify-content: flex-start;
}
html[dir="rtl"] .samples-row {
    direction: rtl;
}
html[dir="rtl"] .col-title {
    flex-direction: row;
}
html[dir="rtl"] .track-row-thumb {
    margin-right: 0;
    margin-left: 12px;
}

/* Mobile Responsiveness & Header Fix */
@media (max-width: 820px) {
    .navbar {
        height: 64px;
    }
    .nav-container {
        padding: 0 14px;
    }
    .desktop-only {
        display: none !important;
    }
    .hero-section {
        padding: 40px 0 24px;
    }
    .hero-title {
        font-size: 2.1rem;
        line-height: 1.25;
    }
    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 24px;
    }
    .search-card {
        padding: 16px 14px;
        border-radius: 16px;
    }
    .search-form {
        flex-direction: column;
        gap: 12px;
    }
    .input-wrapper {
        padding: 0 10px;
        min-height: 48px;
    }
    .url-input {
        font-size: 0.9rem;
        padding: 10px 0;
    }
    .input-icon {
        width: 18px;
        height: 18px;
        margin-right: 8px;
    }
    html[dir="rtl"] .input-icon {
        margin-right: 0;
        margin-left: 8px;
    }
    .btn-paste {
        padding: 5px 8px;
        font-size: 0.78rem;
    }
    .btn-primary {
        padding: 13px;
        width: 100%;
        font-size: 1rem;
        justify-content: center;
    }
    .samples-row {
        gap: 8px;
        margin-top: 14px;
        flex-direction: column;
        align-items: center;
    }
    .samples-chips {
        gap: 6px;
        width: 100%;
        justify-content: center;
    }
    .sample-chip {
        font-size: 0.76rem;
        padding: 5px 11px;
    }
    .track-card {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 18px;
    }
    .cover-wrapper {
        max-width: 240px;
        margin: 0 auto;
    }
    .playlist-header-card {
        grid-template-columns: 1fr;
        padding: 20px;
        text-align: center;
    }
    .playlist-cover-wrapper {
        max-width: 180px;
        margin: 0 auto;
    }
    .tracks-table th:nth-child(3),
    .tracks-table td:nth-child(3) {
        display: none;
    }
    .global-player {
        height: auto;
        padding: 12px 0;
    }
    .player-container {
        flex-wrap: wrap;
    }
    .player-info {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .brand-name {
        font-size: 1.25rem;
    }
    .logo-mark {
        width: 32px;
        height: 32px;
    }
    .brand-name .tld-tag {
        font-size: 0.75rem;
        padding: 1px 5px;
    }
    .hero-title {
        font-size: 1.8rem;
    }
    .lang-btn {
        padding: 6px 10px;
        font-size: 0.78rem;
    }
}
