@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;600;700;900&family=Bebas+Neue&display=swap');

:root {
    --bg-main: #090a0f;
    --bg-surface: #11131a;
    --bg-card: rgba(22, 24, 33, 0.75);
    --bg-card-hover: rgba(33, 37, 50, 0.9);
    --border-color: rgba(255, 255, 255, 0.08);
    --accent: #10b981;
    --accent-glow: rgba(16, 185, 129, 0.4);
    --accent-fire: #f43f5e;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --player-height: 86px;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
    direction: rtl;
    line-height: 1.6;
    overflow-x: hidden;
    padding-bottom: calc(var(--player-height) + 70px);
}

/* Background Gradients with Smooth Float Animation */
.bg-ambient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 15% 15%, rgba(16, 185, 129, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 85% 55%, rgba(244, 63, 94, 0.09) 0%, transparent 50%),
        radial-gradient(circle at 50% 90%, rgba(59, 130, 246, 0.08) 0%, transparent 55%);
    pointer-events: none;
    z-index: -1;
    animation: float-ambient 20s ease-in-out infinite alternate;
}

@keyframes float-ambient {
    0% {
        transform: scale(1) translate(0, 0);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.12) translate(-25px, 20px);
        opacity: 1;
    }
    100% {
        transform: scale(1.05) translate(20px, -15px);
        opacity: 0.85;
    }
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Header & Nav */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
    animation: fadeInDown 0.6s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #fff;
}

.brand-logo {
    font-family: 'Bebas Neue', 'Vazirmatn', sans-serif;
    font-size: 2.2rem;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #fff 30%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
}

.brand-badge {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.3);
    animation: pulse-glow 3s infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
    }
}

nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

nav a:hover {
    color: var(--accent);
}

.btn-admin {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-admin:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent);
}

@media (max-width: 768px) {
    header {
        padding: 0.85rem 0;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
    }
    .brand {
        gap: 0.4rem;
        flex-shrink: 0;
    }
    .brand-logo {
        font-size: 1.65rem;
        letter-spacing: 1px;
    }
    .brand-badge {
        display: none !important; /* Hide badge on mobile navbar to completely eliminate overlap */
    }
    nav {
        gap: 0.65rem;
        align-items: center;
    }
    nav a {
        font-size: 0.85rem;
        white-space: nowrap;
    }
    .btn-admin {
        padding: 0.35rem 0.65rem;
        font-size: 0.78rem;
        white-space: nowrap;
    }
}

/* Hero Section */
.hero {
    padding: 3rem 0 2rem;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
}

@media (max-width: 868px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2rem 0 1.5rem;
        gap: 2rem;
    }
}

.hero-tag {
    display: inline-block;
    color: var(--accent);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 2.2rem;
    }
}

.hero-bio {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 1.75rem;
    max-width: 580px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 868px) {
    .hero-actions {
        justify-content: center;
    }
}

.btn-primary {
    background: var(--accent);
    color: #000;
    font-weight: 700;
    padding: 0.85rem 1.8rem;
    border-radius: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 4px 20px var(--accent-glow);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: 1rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.6);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    padding: 0.85rem 1.6rem;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s, border-color 0.2s;
    font-weight: 600;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.hero-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border-color);
    background: #18181b;
    aspect-ratio: 1/1;
    max-width: 380px;
    margin: 0 auto;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.hero-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(16, 185, 129, 0.2);
}

.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.hero-card:hover img {
    transform: scale(1.06);
}

.hero-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.95) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
}

.hero-card-title {
    font-size: 1.35rem;
    font-weight: 800;
}

.hero-card-sub {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Social Bar */
.social-bar {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    align-items: center;
}

@media (max-width: 868px) {
    .social-bar {
        justify-content: center;
    }
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-link:hover {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px) scale(1.08);
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin: 3.5rem 0 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.section-title span {
    color: var(--accent);
}

/* Tracks List & Staggered Animations */
.tracks-grid {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.track-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    animation: fadeInUp 0.5s ease backwards;
    position: relative;
    overflow: hidden;
}

.track-item:nth-child(1) { animation-delay: 0.05s; }
.track-item:nth-child(2) { animation-delay: 0.12s; }
.track-item:nth-child(3) { animation-delay: 0.19s; }
.track-item:nth-child(4) { animation-delay: 0.26s; }
.track-item:nth-child(5) { animation-delay: 0.33s; }
.track-item:nth-child(6) { animation-delay: 0.40s; }

.track-item:hover {
    background: var(--bg-card-hover);
    border-color: rgba(16, 185, 129, 0.35);
    transform: translateX(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.track-item.active {
    background: rgba(30, 34, 46, 0.95);
    border-color: rgba(16, 185, 129, 0.5);
    border-right: 4px solid var(--accent);
}

.track-item.playing {
    border-color: var(--accent);
    animation: pulse-card 3s infinite ease-in-out;
}

@keyframes pulse-card {
    0%, 100% {
        box-shadow: 0 0 15px rgba(16, 185, 129, 0.15), inset 0 0 0 1px rgba(16, 185, 129, 0.3);
    }
    50% {
        box-shadow: 0 0 25px rgba(16, 185, 129, 0.35), inset 0 0 0 1px rgba(16, 185, 129, 0.6);
    }
}

.track-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.track-num {
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.9rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.track-cover {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    background: #27272a;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.track-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.track-play-btn {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
    cursor: pointer;
    border: none;
    color: #fff;
    font-size: 1rem;
}

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

/* Equalizer Bars on Playing Track */
.eq-bars {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    padding-bottom: 12px;
    z-index: 2;
}

.track-item.playing .eq-bars {
    display: flex;
}

.track-item.playing .track-play-btn {
    display: none !important;
}

.eq-bars .bar {
    width: 3px;
    background: var(--accent);
    border-radius: 2px;
    animation: eq-bounce 0.8s ease-in-out infinite alternate;
}

.eq-bars .bar.b1 { height: 12px; animation-delay: 0.1s; }
.eq-bars .bar.b2 { height: 22px; animation-delay: 0.3s; }
.eq-bars .bar.b3 { height: 16px; animation-delay: 0.15s; }
.eq-bars .bar.b4 { height: 20px; animation-delay: 0.35s; }

@keyframes eq-bounce {
    0% { height: 4px; }
    100% { height: 24px; }
}

.track-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    justify-content: center;
}

.track-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.15rem;
}

.track-artist {
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.track-tag {
    font-size: 0.7rem;
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    display: inline-block;
}

.track-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-shrink: 0;
}

.track-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.track-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    font-size: 0.9rem;
}

.action-btn:hover {
    color: #fff;
    border-color: var(--accent);
    background: rgba(16, 185, 129, 0.15);
    transform: scale(1.08);
}

/* Mobile-Specific Track Card Refinement */
@media (max-width: 680px) {
    .track-item {
        padding: 0.75rem 0.85rem;
        gap: 0.6rem;
    }
    .track-num {
        display: none; /* Hide number to give space on mobile */
    }
    .track-cover {
        width: 48px;
        height: 48px;
        border-radius: 8px;
    }
    .track-title {
        font-size: 0.95rem;
    }
    .track-artist {
        font-size: 0.78rem;
        gap: 0.3rem;
    }
    .track-tag {
        font-size: 0.65rem;
        padding: 0.08rem 0.35rem;
    }
    .track-stats {
        display: none;
    }
    .track-actions {
        gap: 0.35rem;
    }
    .action-btn {
        width: 34px;
        height: 34px;
        font-size: 0.82rem;
    }
}

/* Floating Music Player */
.music-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--player-height);
    background: rgba(14, 16, 22, 0.96);
    backdrop-filter: blur(24px);
    border-top: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    box-shadow: 0 -12px 35px rgba(0, 0, 0, 0.85);
}

.player-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr 220px;
    align-items: center;
    gap: 1.5rem;
}

.player-track-info {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.player-cover {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #27272a;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.player-meta {
    min-width: 0;
}

.player-title {
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}

.player-artist {
    font-size: 0.78rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.player-buttons {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.ctrl-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.2s;
}

.ctrl-btn:hover {
    color: #fff;
    transform: scale(1.1);
}

.ctrl-btn-play {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: #000;
    font-size: 1.2rem;
    box-shadow: 0 0 15px var(--accent-glow);
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.ctrl-btn-play:hover {
    transform: scale(1.08);
    background: #34d399;
}

.ctrl-btn-play.is-playing {
    animation: pulse-glow 2s infinite;
}

.player-progress-bar {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.progress-track {
    flex: 1;
    height: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    border-radius: 999px;
    transition: width 0.1s linear;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.player-volume {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    justify-content: flex-end;
}

.vol-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 90px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    cursor: pointer;
}

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

/* Mobile Player Ergonomics */
@media (max-width: 768px) {
    :root {
        --player-height: 96px;
    }
    body {
        padding-bottom: 155px; /* Ensures ample clearance for the sticky player */
    }
    .music-player {
        padding: 0 1rem;
    }
    .player-inner {
        grid-template-columns: 1fr auto;
        gap: 0.75rem;
    }
    .player-volume {
        display: none !important;
    }
    .player-buttons {
        gap: 1rem;
    }
    .ctrl-btn-play {
        width: 40px;
        height: 40px;
        font-size: 1.05rem;
    }
}

/* Lyrics Modal with Pop Animation */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(14px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: #14161f;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 100%;
    max-width: 580px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.92) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(16, 185, 129, 0.15);
}

.modal-backdrop.open .modal-box {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
}

.modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(244, 63, 94, 0.2);
    color: var(--accent-fire);
    border-color: var(--accent-fire);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    font-size: 1rem;
    line-height: 2.1;
    color: #e2e8f0;
    white-space: pre-wrap;
}

/* Footer */
footer {
    margin-top: 4rem;
    padding: 2.5rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}
