/* ========================================
   MANIAM - Main Stylesheet
   گرم و صمیمی | کافه ایرانی
   ======================================== */

@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/fonts/Vazirmatn-Thin.woff2') format('woff2');
    font-weight: 100;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/fonts/Vazirmatn-ExtraLight.woff2') format('woff2');
    font-weight: 200;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/fonts/Vazirmatn-Light.woff2') format('woff2');
    font-weight: 300;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/fonts/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/fonts/Vazirmatn-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/fonts/Vazirmatn-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/fonts/Vazirmatn-Black.woff2') format('woff2');
    font-weight: 900;
    font-display: swap;
}

:root {
    --bg-primary: #FDFBE8;
    --bg-secondary: #F7F4D4;
    --bg-card: #FFFEF5;
    --bg-card-hover: #FFFBE0;
    --bg-input: #FFFEF5;
    --accent: #C9882C;
    --accent-light: #E0A040;
    --accent-dark: #A06820;
    --accent-glow: rgba(201, 136, 44, 0.15);
    --accent-bg: rgba(201, 136, 44, 0.08);
    --text-primary: #2C1A0E;
    --text-secondary: #6B4C2A;
    --text-muted: #A07850;
    --border: #E8DFB8;
    --border-accent: rgba(201, 136, 44, 0.35);
    --border-dark: #C8B87A;
    --red: #C0392B;
    --green: #4A7C3F;
    --font: 'Vazirmatn', sans-serif;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 4px 24px rgba(100, 60, 0, 0.10);
    --shadow-accent: 0 4px 20px rgba(201, 136, 44, 0.18);
    --shadow-card: 0 2px 12px rgba(100, 60, 0, 0.07);
    --player-height: 76px;
    --transition: all 0.2s ease;
}

/* ---- Base ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    padding-bottom: calc(var(--player-height) + 20px);
    direction: rtl;
}

a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-dark); }
::selection { background: var(--accent); color: white; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ---- Navbar ---- */
.maniam-navbar {
    background: rgba(253, 251, 232, 0.96);
    backdrop-filter: blur(20px);
    border-bottom: 1.5px solid var(--border);
    padding: 12px 0;
    box-shadow: 0 2px 12px rgba(100, 60, 0, 0.06);
}

.brand-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: white;
    box-shadow: var(--shadow-accent);
}

.brand-text {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.search-form { width: 340px; }
.search-input {
    background: var(--bg-secondary);
    border: 1.5px solid var(--border);
    color: var(--text-primary);
    font-family: var(--font);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
    padding: 8px 16px;
    font-size: 0.875rem;
}
.search-input:focus {
    background: white;
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.search-input::placeholder { color: var(--text-muted); }
.search-btn {
    background: var(--accent);
    border: none;
    color: white;
    padding: 8px 14px;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important;
}
.search-btn:hover { background: var(--accent-dark); color: white; }

.navbar-nav .nav-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--accent-dark);
    background: var(--accent-bg);
}

.user-avatar-sm {
    width: 30px; height: 30px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    color: white;
}

.maniam-dropdown {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}
.maniam-dropdown .dropdown-item {
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.875rem;
    padding: 8px 16px;
    transition: var(--transition);
}
.maniam-dropdown .dropdown-item:hover { background: var(--accent-bg); color: var(--accent-dark); }
.maniam-dropdown .dropdown-divider { border-color: var(--border); }

/* ---- Buttons ---- */
.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border: none;
    color: white;
    font-family: var(--font);
    font-weight: 700;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-accent);
}

.btn-outline-primary {
    border: 1.5px solid var(--accent);
    color: var(--accent);
    font-family: var(--font);
    border-radius: var(--radius-sm);
    background: transparent;
}
.btn-outline-primary:hover { background: var(--accent); color: white; }

.btn-download {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    border: none;
    font-family: var(--font);
    font-weight: 700;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}
.btn-download:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201, 136, 44, 0.3);
}

.btn-play {
    background: white;
    color: var(--text-primary);
    border: 1.5px solid var(--border);
    font-family: var(--font);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    cursor: pointer;
}
.btn-play:hover {
    background: var(--accent-bg);
    color: var(--accent-dark);
    border-color: var(--accent);
}

/* ---- Cards ---- */
.song-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    box-shadow: var(--shadow-card);
}
.song-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.song-card-cover {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--bg-secondary);
}
.song-card-cover img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.song-card:hover .song-card-cover img { transform: scale(1.06); }

.song-card-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    font-size: 3rem;
    color: var(--border-dark);
    aspect-ratio: 1;
}

.song-card-overlay {
    position: absolute; inset: 0;
    background: rgba(44, 26, 14, 0.45);
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    gap: 12px;
}
.song-card:hover .song-card-overlay { opacity: 1; }

.card-play-btn, .card-download-btn {
    width: 46px; height: 46px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}
.card-play-btn { background: var(--accent); color: white; }
.card-play-btn:hover { background: var(--accent-light); transform: scale(1.1); }
.card-download-btn { background: rgba(255,255,255,0.85); color: var(--text-primary); }
.card-download-btn:hover { background: white; transform: scale(1.1); }

.song-card-body { padding: 14px; }
.song-card-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.song-card-artist {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.song-card-meta {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.song-badge { font-size: 0.7rem; padding: 3px 8px; border-radius: 20px; font-weight: 500; }
.badge-genre {
    background: var(--accent-bg);
    color: var(--accent-dark);
    border: 1px solid var(--border-accent);
}
.song-stats { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--text-muted); }

/* ---- Hero ---- */
.hero-section {
    background: linear-gradient(160deg, #FFF8D6 0%, #FDFBE8 60%, #F7F2CC 100%);
    border-bottom: 1.5px solid var(--border);
    padding: 28px 0;
    position: relative;
    overflow: hidden;
}
.hero-title-inline {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.4;
}
.hero-title-inline .accent { color: var(--accent); }
.hero-sub { color: var(--text-muted); font-size: 0.9rem; margin: 0; }

/* ---- Section Headers ---- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1.5px solid var(--border);
}
.section-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-title .title-accent {
    width: 4px; height: 22px;
    background: linear-gradient(to bottom, var(--accent), var(--accent-dark));
    border-radius: 2px;
}
.section-link { font-size: 0.85rem; color: var(--accent); font-weight: 500; }
.section-link:hover { color: var(--accent-dark); }

/* ---- Genre Cards ---- */
.genre-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 14px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: block;
    box-shadow: var(--shadow-card);
}
.genre-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-accent);
}
.genre-icon { font-size: 2rem; margin-bottom: 8px; display: block; color: var(--accent); }
.genre-name { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); display: block; margin-bottom: 4px; }
.genre-count { font-size: 0.78rem; color: var(--text-muted); }

/* ---- Artist Cards ---- */
.artist-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
    text-decoration: none;
    display: block;
    box-shadow: var(--shadow-card);
}
.artist-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.artist-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
    border: 2px solid var(--border-accent);
}
.artist-avatar-placeholder {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    margin: 0 auto 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; font-weight: 900;
    color: white;
}
.artist-name { font-weight: 700; color: var(--text-primary); margin-bottom: 4px; font-size: 0.95rem; }
.artist-count { font-size: 0.78rem; color: var(--text-muted); }

/* ---- Song Detail ---- */
.song-detail-cover {
    width: 100%; aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow);
}
.song-detail-placeholder {
    width: 100%; aspect-ratio: 1;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 5rem; color: var(--border-dark);
    border: 1.5px solid var(--border);
}
.song-detail-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1.3;
}
.song-detail-artist { font-size: 1.1rem; color: var(--accent); font-weight: 600; }
.song-info-row { display: flex; flex-wrap: wrap; gap: 16px; margin: 16px 0; }
.song-info-item {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.875rem; color: var(--text-secondary);
}
.song-info-item i { color: var(--accent); }

/* ---- Star Rating ---- */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    gap: 4px;
    justify-content: flex-end;
}
.star-rating input { display: none; }
.star-rating label {
    font-size: 1.5rem;
    color: var(--border-dark);
    cursor: pointer;
    transition: var(--transition);
}
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label { color: var(--accent); }

/* ---- Comments ---- */
.comment-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-card);
}
.comment-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
}
.comment-username { font-weight: 700; font-size: 0.875rem; color: var(--text-primary); }
.comment-date { font-size: 0.75rem; color: var(--text-muted); }
.comment-text { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.8; margin-top: 8px; }
.comment-form-box {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-card);
}

/* ---- Forms ---- */
.form-control, .form-select {
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    color: var(--text-primary);
    font-family: var(--font);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
}
.form-control:focus, .form-select:focus {
    background: white;
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-control::placeholder { color: var(--text-muted); }
.form-select option { background: var(--bg-card); }
.form-label { color: var(--text-secondary); font-size: 0.875rem; margin-bottom: 6px; font-weight: 500; }

/* ---- Auth ---- */
.auth-wrapper {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 40px 16px;
    background: linear-gradient(160deg, #FFF8D6 0%, #FDFBE8 100%);
}
.auth-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow);
}
.auth-title { font-size: 1.6rem; font-weight: 900; color: var(--text-primary); margin-bottom: 6px; }
.auth-subtitle { color: var(--text-muted); font-size: 0.9rem; }

/* ---- Filter Sidebar ---- */
.filter-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 14px;
    position: sticky;
    top: 80px;
    box-shadow: var(--shadow-card);
}
.filter-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}
.filter-item {
    display: block;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
}
.filter-item:hover, .filter-item.active { background: var(--accent-bg); color: var(--accent-dark); }
.filter-count {
    font-size: 0.72rem;
    background: var(--bg-secondary);
    padding: 1px 7px;
    border-radius: 20px;
    color: var(--text-muted);
    float: left;
}

/* ---- Pagination ---- */
.pagination .page-link {
    background: var(--bg-card);
    border-color: var(--border);
    color: var(--text-secondary);
    font-family: var(--font);
}
.pagination .page-link:hover { background: var(--accent-bg); color: var(--accent-dark); border-color: var(--border-accent); }
.pagination .page-item.active .page-link { background: var(--accent); border-color: var(--accent); color: white; }

/* ---- Floating Audio Player ---- */
.floating-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 76px;
    background: rgba(255, 252, 230, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1.5px solid var(--border);
    z-index: 9999;
    box-shadow: 0 -4px 24px rgba(100, 60, 0, 0.10);
}

.player-inner {
    height: 76px;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    direction: ltr;
}

/* اطلاعات آهنگ - سمت راست در LTR */
.player-song-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-width: 160px;
    max-width: 220px;
    flex-shrink: 0;
}

.player-cover {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.player-cover-placeholder {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.player-text {
    min-width: 0;
    direction: rtl;
    text-align: right;
}

.player-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.player-artist {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

/* کنترل‌ها - وسط */
.player-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
    min-width: 200px;
}

.player-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.player-progress-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: 100%;
}

/* صدا و بستن - سمت چپ */
.player-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-width: 140px;
}

.player-volume-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

/* دکمه‌های پلیر */
.player-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    font-size: 1rem;
    line-height: 1;
}

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

.player-btn-main {
    width: 42px !important;
    height: 42px !important;
    background: var(--accent) !important;
    color: white !important;
    border-radius: 50% !important;
    font-size: 1.15rem !important;
    box-shadow: 0 2px 10px rgba(201,136,44,0.3);
}

.player-btn-main:hover {
    background: var(--accent-dark) !important;
    color: white !important;
    transform: scale(1.05);
}

.player-btn-close {
    border-radius: 6px !important;
    font-size: 0.85rem !important;
}

/* نوار progress */
.player-progress {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 2px;
    cursor: pointer;
    outline: none;
    transition: height 0.1s;
}

.player-progress:hover { height: 6px; }

.player-progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
}

.player-progress::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    cursor: pointer;
}

/* نوار صدا */
.player-volume {
    width: 75px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 2px;
    cursor: pointer;
    outline: none;
}

.player-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
}

.player-volume::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    cursor: pointer;
}

.player-time {
    font-size: 0.68rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

/* موبایل */
@media (max-width: 768px) {
    .player-song-info { min-width: unset; max-width: 80px; }
    .player-text { display: none; }
    .player-progress-row { display: none; }
    .player-volume-row { display: none; }
    .player-cover, .player-cover-placeholder { width: 38px; height: 38px; }
    .player-right { min-width: unset; }
}

/* ---- Song Row ---- */
.song-row {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    transition: var(--transition);
    margin-bottom: 8px;
    box-shadow: var(--shadow-card);
}
.song-row:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
    transform: translateX(-2px);
}
.song-row-cover { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.song-row-cover-placeholder {
    width: 44px; height: 44px; border-radius: 8px;
    background: var(--bg-secondary);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); flex-shrink: 0;
}
.song-row-info { flex: 1; min-width: 0; }
.song-row-title { font-weight: 700; font-size: 0.9rem; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-row-artist { font-size: 0.78rem; color: var(--text-muted); }
.song-row-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.song-row-action-btn {
    background: none; border: none;
    color: var(--text-muted);
    font-size: 1rem; padding: 5px 8px;
    border-radius: 6px; cursor: pointer;
    transition: var(--transition);
}
.song-row-action-btn:hover { color: var(--accent-dark); background: var(--accent-bg); }

/* ---- Alerts ---- */
.maniam-alert {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    color: var(--text-primary);
    font-family: var(--font);
    border-radius: var(--radius-sm);
}
.alert-success { border-color: var(--green) !important; background: #F0FAF0 !important; }
.alert-danger { border-color: var(--red) !important; background: #FDF0F0 !important; }

/* ---- Footer ---- */
.maniam-footer {
    background: #F2EDCC;
    border-top: 1.5px solid var(--border);
    padding: 48px 0 24px;
}
.footer-heading { color: var(--text-primary); font-weight: 800; font-size: 0.9rem; margin-bottom: 16px; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: var(--text-muted); font-size: 0.875rem; transition: var(--transition); }
.footer-links a:hover { color: var(--accent-dark); }
.footer-divider { border-color: var(--border); margin: 32px 0 20px; }

/* ---- Misc ---- */
.page-header {
    padding: 40px 0 24px;
    border-bottom: 1.5px solid var(--border);
    margin-bottom: 32px;
}
.page-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 900; color: var(--text-primary); margin-bottom: 4px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state i { font-size: 4rem; display: block; margin-bottom: 16px; opacity: 0.3; }
.empty-state p { font-size: 1rem; }

.lyrics-box {
    background: #FFFEF0;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    white-space: pre-line;
    line-height: 2.2;
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-height: 400px;
    overflow-y: auto;
    direction: rtl;
    text-align: center;
}

/* ---- Animations ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 0.4s ease forwards; }

/* ---- Responsive ---- */
@media (max-width: 992px) {
    .player-center { min-width: 200px; }
}
@media (max-width: 768px) {
    .search-form { width: 100%; }
    .player-inner { grid-template-columns: auto 1fr auto; gap: 8px; padding: 0 12px; }
    .player-song-info { justify-content: flex-start; }
    .player-text { display: none; }
    .player-center { min-width: unset; }
    .player-progress-row { display: none; }
    .player-volume-row { display: none; }
    .player-cover-placeholder { width: 40px; height: 40px; }
    .player-cover { width: 40px; height: 40px; }
    .song-card-overlay { opacity: 1; background: rgba(44,26,14,0.3); }
}

/* ---- Iran Photo Slider ---- */
.iran-slider-wrapper {
    position: relative;
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.iran-slider-track {
    display: flex;
    flex-direction: row;
    transition: transform 0.5s ease;
    will-change: transform;
    direction: ltr;
}

.iran-slide {
    min-width: 33.333%;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.iran-slide-img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.iran-slide:hover .iran-slide-img {
    transform: scale(1.05);
}

.iran-slide-caption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 32px 16px 14px;
    background: linear-gradient(to top, rgba(44,26,14,0.85), transparent);
    direction: rtl;
}

.iran-slide-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
    margin-bottom: 3px;
}

.iran-slide-location {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.85);
}

.iran-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 38px; height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(255,252,230,0.92);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.iran-slider-btn:hover {
    background: white;
    color: var(--accent-dark);
}
.iran-slider-prev { right: 10px; }
.iran-slider-next { left: 10px; }

.iran-slider-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}

.iran-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    border: none;
    background: var(--border-dark);
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}
.iran-dot.active {
    background: var(--accent);
    width: 22px;
    border-radius: 4px;
}

@media (max-width: 991px) {
    .iran-slide { min-width: 50%; }
    .iran-slide-img { height: 200px; }
}
@media (max-width: 575px) {
    .iran-slide { min-width: 100%; }
    .iran-slide-img { height: 220px; }
}

/* ---- Notes ---- */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.note-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    overflow: hidden;
}

.note-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 16px;
    font-size: 6rem;
    color: var(--accent);
    opacity: 0.06;
    font-family: Georgia, serif;
    line-height: 1;
    pointer-events: none;
}

.note-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.note-tag-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    width: fit-content;
}

.note-tag-self { background: #FFF3E0; color: #E65100; border: 1px solid #FFCCBC; }
.note-tag-social { background: #E3F2FD; color: #1565C0; border: 1px solid #BBDEFB; }
.note-tag-poem { background: #F3E5F5; color: #6A1B9A; border: 1px solid #E1BEE7; }
.note-tag-music { background: var(--accent-bg); color: var(--accent-dark); border: 1px solid var(--border-accent); }
.note-tag-life { background: #E8F5E9; color: #2E7D32; border: 1px solid #C8E6C9; }
.note-tag-game { background: #E8EAF6; color: #283593; border: 1px solid #C5CAE9; }

.note-text {
    font-size: 1rem;
    line-height: 2;
    color: var(--text-primary);
    white-space: pre-line;
    flex: 1;
}

.note-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 10px;
}

/* دکمه‌های فیلتر تگ */
.note-tag-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    text-decoration: none;
    transition: var(--transition);
}
.note-tag-btn:hover,
.note-tag-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* نوشته تصادفی در صفحه اصلی */
.random-note-box {
    background: linear-gradient(135deg, #FFFBF0, #FFF8E0);
    border: 1.5px solid var(--border-accent);
    border-radius: var(--radius);
    padding: 28px 32px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.random-note-box::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 8rem;
    color: var(--accent);
    opacity: 0.07;
    font-family: Georgia, serif;
    line-height: 1;
    pointer-events: none;
}

.random-note-text {
    font-size: 1.05rem;
    line-height: 2.1;
    color: var(--text-primary);
    white-space: pre-line;
    position: relative;
}

.random-note-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* ===== NOTEBOOK CARDS ===== */
.notebook-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.notebook-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}
.notebook-card-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.notebook-card-cover-placeholder {
    width: 100%;
    height: 200px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-muted);
}
.notebook-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.notebook-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.5;
}
.notebook-card-excerpt {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
    flex: 1;
    margin-bottom: 12px;
}
.notebook-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 10px;
    margin-top: auto;
}
