/*
Theme Name: Chovash
Theme URI: https://chovash.com
Author: Chovash
Author URI: https://chovash.com
Description: پوسته تیره و مدرن موزیک با الهام از Apple Music - کاملاً ریسپانسیو با پشتیبانی از زبان فارسی
Version: 2.0.0
Text Domain: chovash
Domain Path: /languages
*/

@import url('https://cdn.jsdelivr.net/npm/vazirmatn@33.0.2/Vazirmatn-Variable-font-face.css');

:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-elevated: #1c1c1e;
    --bg-card: #141414;
    --bg-hover: #2c2c2e;
    --text-primary: #ffffff;
    --text-secondary: #9b9b9f;
    --text-tertiary: #636366;
    --accent: #fa233b;
    --accent-hover: #ff3750;
    --accent-subtle: rgba(250, 35, 59, 0.15);
    --border: #2c2c2e;
    --border-subtle: #1c1c1e;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --player-height: 72px;
    --header-height: 56px;
    --transition: 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    direction: rtl;
    text-align: right;
    line-height: 1.7;
    min-height: 100vh;
    padding-bottom: var(--player-height);
    -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; }

/* ============= SVG ICONS ============= */
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: middle; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 22px; height: 22px; }

/* ============= HEADER ============= */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(30px) saturate(1.2);
    -webkit-backdrop-filter: blur(30px) saturate(1.2);
    border-bottom: 1px solid rgba(44, 44, 46, 0.5);
    padding: 0 28px; direction: rtl; height: var(--header-height);
}

.header-inner {
    max-width: 1440px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between; height: 100%;
}

.header-left { display: flex; align-items: center; gap: 32px; }

.site-logo {
    display: flex; align-items: center; gap: 8px;
    font-size: 20px; font-weight: 800; color: var(--accent); letter-spacing: -0.3px;
}
.site-logo .logo-icon {
    width: 28px; height: 28px; background: var(--accent); border-radius: 6px;
    display: flex; align-items: center; justify-content: center; color: white; font-weight: 700;
}

.main-nav ul { list-style: none; display: flex; gap: 28px; }
.main-nav a {
    color: var(--text-secondary); font-size: 13px; font-weight: 500;
    transition: color var(--transition); position: relative; padding: 4px 0;
}
.main-nav a::after {
    content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
    height: 2px; background: var(--accent); border-radius: 1px;
    transform: scaleX(0); transition: transform var(--transition);
}
.main-nav a:hover, .main-nav .current-menu-item a { color: var(--text-primary); }
.main-nav a:hover::after, .main-nav .current-menu-item a::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.header-actions button {
    background: none; border: none; color: var(--text-secondary); cursor: pointer;
    padding: 6px; border-radius: 50%; transition: all var(--transition);
    display: flex; align-items: center; justify-content: center;
}
.header-actions button:hover { background: var(--bg-hover); color: var(--text-primary); }

.header-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #ff6b6b);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 12px; font-weight: 700; cursor: pointer;
}

.mobile-menu-btn { display: none; background: none; border: none; color: var(--text-primary); font-size: 20px; cursor: pointer; padding: 4px; }

/* ============= HERO ============= */
.hero {
    margin-top: var(--header-height); padding: 80px 28px 64px;
    background: linear-gradient(180deg, #1a0a0e 0%, #0d0d0d 40%, var(--bg-primary) 100%);
    text-align: center; position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at 50% 40%, rgba(250, 35, 59, 0.08) 0%, transparent 60%);
    pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.hero h1 {
    font-size: 56px; font-weight: 900; margin-bottom: 14px; letter-spacing: -1px; line-height: 1.1;
    background: linear-gradient(180deg, #fff 0%, #a1a1a6 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero p {
    font-size: 17px; color: var(--text-secondary); max-width: 520px;
    margin: 0 auto 28px; line-height: 1.8;
}

/* ============= CONTAINER ============= */
.container { max-width: 1440px; margin: 0 auto; padding: 0 28px; }

/* ============= SECTION HEADERS ============= */
.section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px; padding-top: 36px;
}
.section-header h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; }
.section-header .view-all {
    font-size: 13px; color: var(--accent); font-weight: 600; transition: opacity var(--transition);
}
.section-header .view-all:hover { opacity: 0.8; color: var(--accent); }

/* ============= CATEGORY PILLS ============= */
.category-pills {
    display: flex; gap: 8px; margin-bottom: 28px;
    overflow-x: auto; padding: 4px 0; -webkit-overflow-scrolling: touch;
}
.category-pills::-webkit-scrollbar { display: none; }
.pill {
    background: var(--bg-elevated); color: var(--text-secondary); border: none;
    padding: 8px 18px; border-radius: 20px; font-family: inherit;
    font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap;
    transition: all var(--transition);
}
.pill:hover { background: var(--bg-hover); color: var(--text-primary); }
.pill.active { background: var(--accent); color: white; }

/* ============= ALBUM GRID ============= */
.album-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 22px; margin-bottom: 48px;
}
.album-card {
    background: var(--bg-card); border-radius: var(--radius-md);
    overflow: hidden; transition: all var(--transition); cursor: pointer; position: relative;
}
.album-card:hover {
    background: var(--bg-elevated); transform: translateY(-6px); box-shadow: var(--shadow);
}
.album-card .artwork { position: relative; overflow: hidden; aspect-ratio: 1; }
.album-card .artwork img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.album-card:hover .artwork img { transform: scale(1.05); }
.album-card .artwork-overlay {
    position: absolute; inset: 0; background: rgba(0, 0, 0, 0.3);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity var(--transition);
}
.album-card:hover .artwork-overlay { opacity: 1; }
.album-card .play-overlay-btn {
    width: 48px; height: 48px; border-radius: 50%; background: var(--accent); border: none;
    color: white; cursor: pointer; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(250, 35, 59, 0.4);
    transform: translateY(8px); transition: all var(--transition);
}
.album-card:hover .play-overlay-btn { transform: translateY(0); }
.album-card .play-overlay-btn:hover { background: var(--accent-hover); transform: scale(1.08) translateY(0); }
.album-card .card-body { padding: 14px 14px 18px; }
.album-card h3 {
    font-size: 14px; font-weight: 600; margin-bottom: 4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.album-card p {
    font-size: 12px; color: var(--text-secondary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ============= TRACK LIST ============= */
.track-section { margin-bottom: 48px; }
.track-list-header {
    display: flex; align-items: center; padding: 8px 16px 12px;
    border-bottom: 1px solid var(--border-subtle); margin-bottom: 4px;
}
.track-list-header span { font-size: 11px; font-weight: 600; color: var(--text-tertiary); }
.track-list-header .col-num { width: 40px; text-align: center; }
.track-list-header .col-art { width: 44px; margin-left: 16px; }
.track-list-header .col-title { flex: 1; }
.track-list-header .col-duration { width: 48px; text-align: center; }

.track-list { list-style: none; }
.track-item {
    display: flex; align-items: center; padding: 8px 12px;
    border-radius: var(--radius-sm); transition: background var(--transition);
    gap: 14px; position: relative;
}
.track-item:hover { background: var(--bg-card); }
.track-item.playing { background: var(--bg-card); border-right: 3px solid var(--accent); }

.track-number {
    width: 28px; text-align: center; color: var(--text-tertiary);
    font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums;
}
.track-item .track-art {
    width: 44px; height: 44px; border-radius: 4px; object-fit: cover; flex-shrink: 0;
}
.track-info { flex: 1; min-width: 0; }
.track-info h4 {
    font-size: 14px; font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.4;
}
.track-info span { font-size: 12px; color: var(--text-secondary); }
.track-meta { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.track-meta .sep { color: var(--text-tertiary); font-size: 8px; }

.track-actions {
    display: flex; align-items: center; gap: 8px; opacity: 0;
    transition: opacity var(--transition);
}
.track-item:hover .track-actions { opacity: 1; }

.track-actions .action-btn {
    background: none; border: none; color: var(--text-tertiary); cursor: pointer;
    padding: 4px; border-radius: 4px; transition: all var(--transition);
    display: flex; align-items: center; justify-content: center;
}
.track-actions .action-btn:hover { color: var(--accent); background: var(--accent-subtle); }

.track-duration {
    font-size: 13px; color: var(--text-tertiary);
    font-variant-numeric: tabular-nums; min-width: 36px; text-align: center;
}
.track-item .play-btn {
    width: 32px; height: 32px; border-radius: 50%; border: none;
    background: var(--accent); color: white; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: all var(--transition); flex-shrink: 0;
}
.track-item:hover .play-btn { opacity: 1; }
.track-item .play-btn:hover { background: var(--accent-hover); transform: scale(1.1); }

/* ============= EQUALIZER ANIMATION ============= */
.equalizer {
    display: none; align-items: flex-end; gap: 2px; height: 20px;
    padding: 0 4px;
}
.equalizer.active { display: flex; }
.equalizer .bar {
    width: 3px; background: var(--accent); border-radius: 2px 2px 0 0;
    animation: eq-wave 0.8s ease-in-out infinite alternate;
    transform-origin: bottom;
}
.equalizer .bar:nth-child(1) { height: 6px; animation-delay: 0s; }
.equalizer .bar:nth-child(2) { height: 14px; animation-delay: 0.15s; }
.equalizer .bar:nth-child(3) { height: 10px; animation-delay: 0.3s; }
.equalizer .bar:nth-child(4) { height: 18px; animation-delay: 0.1s; }
.equalizer .bar:nth-child(5) { height: 8px; animation-delay: 0.25s; }
.equalizer .bar:nth-child(6) { height: 15px; animation-delay: 0.05s; }
.equalizer .bar:nth-child(7) { height: 11px; animation-delay: 0.2s; }
.equalizer .bar:nth-child(8) { height: 7px; animation-delay: 0.35s; }

@keyframes eq-wave {
    0% { transform: scaleY(0.4); }
    50% { transform: scaleY(1); }
    100% { transform: scaleY(0.6); }
}

/* Equalizer in Player */
.player-equalizer {
    display: none; align-items: flex-end; gap: 3px; height: 28px; padding: 0 4px;
}
.player-equalizer.active { display: flex; }
.player-equalizer .pbar {
    width: 4px; background: var(--accent); border-radius: 3px 3px 0 0;
    animation: p-eq 1s ease-in-out infinite alternate;
    transform-origin: bottom;
}
.player-equalizer .pbar:nth-child(1) { height: 8px;  animation-delay: 0s; }
.player-equalizer .pbar:nth-child(2) { height: 18px; animation-delay: 0.12s; }
.player-equalizer .pbar:nth-child(3) { height: 22px; animation-delay: 0.28s; }
.player-equalizer .pbar:nth-child(4) { height: 14px; animation-delay: 0.08s; }
.player-equalizer .pbar:nth-child(5) { height: 26px; animation-delay: 0.22s; }
.player-equalizer .pbar:nth-child(6) { height: 12px; animation-delay: 0.16s; }
.player-equalizer .pbar:nth-child(7) { height: 20px; animation-delay: 0.04s; }
.player-equalizer .pbar:nth-child(8) { height: 28px; animation-delay: 0.32s; }

@keyframes p-eq {
    0% { transform: scaleY(0.3); }
    50% { transform: scaleY(1); }
    100% { transform: scaleY(0.5); }
}

/* ============= DOWNLOAD BUTTON ============= */
.download-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--accent); color: white; border: none;
    padding: 10px 22px; border-radius: 24px; font-family: inherit;
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all var(--transition);
}
.download-btn:hover { background: var(--accent-hover); transform: scale(1.02); color: white; }
.download-btn-sm {
    padding: 6px 14px; font-size: 11px; border-radius: 20px;
}

/* ============= FEATURED SECTION ============= */
.featured-section { margin-bottom: 48px; }
.featured-card {
    display: flex; align-items: flex-end; border-radius: var(--radius-lg);
    overflow: hidden; min-height: 280px; position: relative;
    background: linear-gradient(135deg, #1c1c1e, #0a0a0a); padding: 36px;
}
.featured-card::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.8) 100%);
}
.featured-bg { position: absolute; inset: 0; object-fit: cover; opacity: 0.3; }
.featured-content { position: relative; z-index: 1; max-width: 500px; }
.featured-content .featured-label {
    font-size: 11px; font-weight: 600; color: var(--accent);
    letter-spacing: 1px; margin-bottom: 8px;
}
.featured-content h2 { font-size: 32px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.5px; }
.featured-content p { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.7; }

/* ============= QUICK PICKS ============= */
.quick-picks {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px; margin-bottom: 48px;
}
.quick-pick-item {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-card); border-radius: var(--radius-sm);
    padding: 8px; transition: background var(--transition); cursor: pointer;
}
.quick-pick-item:hover { background: var(--bg-elevated); }
.quick-pick-item img {
    width: 56px; height: 56px; border-radius: 4px; object-fit: cover;
}
.quick-pick-item .qp-info { flex: 1; min-width: 0; }
.quick-pick-item h4 {
    font-size: 13px; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.quick-pick-item span { font-size: 12px; color: var(--text-secondary); }

/* ============= PLAYER BAR ============= */
.player-bar {
    position: fixed; bottom: 0; left: 0; right: 0; height: var(--player-height);
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(30px) saturate(1.2);
    -webkit-backdrop-filter: blur(30px) saturate(1.2);
    border-top: 1px solid var(--border);
    display: flex; align-items: center; padding: 0 20px;
    z-index: 1000; direction: rtl; gap: 16px;
}

.player-progress-top {
    position: absolute; top: -1px; left: 0; right: 0; height: 2px;
    background: var(--border-subtle);
}
.player-progress-top .progress-fill {
    height: 100%; width: 35%; background: var(--accent); border-radius: 1px; position: relative;
}
.player-progress-top .progress-fill::after {
    content: ''; position: absolute; right: -4px; top: -3px;
    width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
    opacity: 0; transition: opacity var(--transition);
}
.player-bar:hover .progress-fill::after { opacity: 1; }

.player-bar .now-playing {
    display: flex; align-items: center; gap: 12px;
    flex: 1; min-width: 0; max-width: 260px;
}
.player-bar .now-playing img {
    width: 44px; height: 44px; border-radius: 4px; object-fit: cover; flex-shrink: 0;
}
.player-bar .track-meta h4 {
    font-size: 13px; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3;
}
.player-bar .track-meta span { font-size: 11px; color: var(--text-secondary); }
.player-bar .like-btn {
    background: none; border: none; color: var(--text-tertiary);
    cursor: pointer; transition: color var(--transition); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.player-bar .like-btn:hover { color: var(--accent); }

.player-center {
    flex: 2; display: flex; flex-direction: column; align-items: center;
    gap: 6px; max-width: 500px;
}

.player-controls { display: flex; align-items: center; gap: 18px; }
.player-controls button {
    background: none; border: none; color: var(--text-secondary);
    cursor: pointer; transition: color var(--transition); padding: 2px;
    display: flex; align-items: center; justify-content: center;
}
.player-controls button:hover { color: var(--text-primary); }
.player-controls .play-main {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--text-primary); color: var(--bg-primary);
    display: flex; align-items: center; justify-content: center;
    transition: transform var(--transition);
}
.player-controls .play-main:hover { transform: scale(1.06); color: var(--bg-primary); }
.player-controls .shuffle.active, .player-controls .repeat.active { color: var(--accent); }

.player-time { display: flex; align-items: center; gap: 8px; width: 100%; }
.player-time .time {
    font-size: 10px; color: var(--text-tertiary);
    font-variant-numeric: tabular-nums; min-width: 36px;
}
.progress-bar {
    flex: 1; height: 4px; background: var(--bg-hover);
    border-radius: 2px; cursor: pointer; position: relative;
}
.progress-bar .progress-fill {
    height: 100%; width: 35%; background: var(--text-primary);
    border-radius: 2px; position: relative; transition: width 0.1s linear;
}
.progress-bar:hover .progress-fill { background: var(--accent); }

.player-right {
    flex: 1; display: flex; align-items: center;
    justify-content: flex-end; gap: 12px; max-width: 260px;
}
.player-right button {
    background: none; border: none; color: var(--text-secondary);
    cursor: pointer; transition: color var(--transition); padding: 2px;
    display: flex; align-items: center; justify-content: center;
}
.player-right button:hover { color: var(--text-primary); }

.volume-control { display: flex; align-items: center; gap: 6px; }
.volume-control .vol-bar {
    width: 80px; height: 4px; background: var(--bg-hover);
    border-radius: 2px; cursor: pointer; position: relative;
}
.volume-control .vol-bar .vol-fill {
    height: 100%; width: 60%; background: var(--text-primary);
    border-radius: 2px; transition: width 0.1s linear;
}
.volume-control .vol-bar:hover .vol-fill { background: var(--accent); }

/* ============= FOOTER ============= */
.site-footer {
    background: var(--bg-secondary); border-top: 1px solid var(--border-subtle);
    padding: 32px 24px 24px; text-align: center;
}
.footer-links { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.footer-links a { font-size: 12px; color: var(--text-tertiary); transition: color var(--transition); }
.footer-links a:hover { color: var(--text-secondary); }
.site-footer p { font-size: 12px; color: var(--text-tertiary); }

/* ============= RESPONSIVE ============= */
@media (max-width: 1024px) {
    .hero h1 { font-size: 42px; }
    .album-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
    .player-right .volume-control { display: none; }
}
@media (max-width: 768px) {
    .site-header { padding: 0 16px; }
    .header-inner { height: 48px; }
    .site-logo { font-size: 17px; }
    .main-nav { display: none; }
    .header-actions button:not(.mobile-menu-btn) { display: none; }
    .mobile-menu-btn { display: flex; }
    .hero { padding: 56px 16px 40px; }
    .hero h1 { font-size: 30px; }
    .hero p { font-size: 15px; }
    .container { padding: 0 16px; }
    .album-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
    .section-header { padding-top: 28px; }
    .section-header h2 { font-size: 18px; }
    .featured-card { min-height: 200px; padding: 24px; }
    .featured-content h2 { font-size: 22px; }
    .quick-picks { grid-template-columns: 1fr; }
    .track-list-header { display: none; }
    .track-item { padding: 6px 8px; }
    .player-bar { padding: 0 12px; height: 60px; }
    .player-bar .now-playing { max-width: 140px; }
    .player-bar .now-playing img { width: 36px; height: 36px; }
    .player-bar .track-meta h4 { font-size: 12px; }
    .player-center .player-time { display: none; }
    .player-controls { gap: 12px; }
    .player-controls .play-main { width: 30px; height: 30px; }
    .player-right .volume-control { display: none; }
}
@media (max-width: 480px) {
    .album-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .container { padding: 0 12px; }
    .hero h1 { font-size: 24px; }
    .player-center { flex: 1; }
}
