/* ========================================
   MSB USER SYSTEM - نسخه اپلیکیشنی و واکنش‌گرا
   همراه با استایل پخش شده‌های اخیر
   ======================================== */

/* ریست فونت برای دکمه‌ها */
button, input, .msb-login-btn, .msb-btn-outline, .msb-btn-primary, .msb-view-btn {
    font-family: inherit !important;
}



/* ========== ورود داخلی سازگار با SPA (با هدر و فوتر قالب) ========== */
.msb-login-template-content {
    width: 100%;
}

.msb-fullscreen-login,
.msb-login-page {
    position: relative !important;
    inset: auto !important;
    width: 100%;
    min-height: calc(100vh - 180px);
    height: auto !important;
    background: radial-gradient(circle at 20% 10%, rgba(30,215,96,0.08), transparent 34%), linear-gradient(145deg, #0a0a0a 0%, #121212 100%);
    z-index: auto !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px 130px;
    font-family: inherit;
    border-radius: 28px;
}

.msb-login-page .login-container,
.msb-fullscreen-login .login-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.msb-login-page .login-card,
.msb-fullscreen-login .login-card {
    background: rgba(18, 18, 22, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 42px;
    padding: 34px 24px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 28px 58px rgba(0,0,0,0.42);
    text-align: center;
}

.msb-login-page .msb-login-brand,
.msb-fullscreen-login .msb-login-brand {
    text-align: center;
}

.msb-login-page .logo,
.msb-fullscreen-login .logo {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    margin-bottom: 18px;
    object-fit: cover;
}

.msb-login-page h1,
.msb-fullscreen-login h1 {
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #1ed760 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0 0 8px;
}

.msb-login-page .slogan,
.msb-fullscreen-login .slogan {
    font-size: 12px;
    margin: 0 0 30px;
    font-weight: 500;
}

.msb-login-page .slogan-text,
.msb-fullscreen-login .slogan-text { color: rgba(255,255,255,0.54); }
.msb-login-page .slogan-highlight,
.msb-fullscreen-login .slogan-highlight { color: #1ed760; font-weight: 800; }

.msb-login-page .step,
.msb-fullscreen-login .step {
    display: none;
    animation: msbLoginFadeIn 0.28s ease;
}

.msb-login-page .step.active,
.msb-fullscreen-login .step.active { display: block; }

@keyframes msbLoginFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.msb-login-page .input-group,
.msb-fullscreen-login .input-group {
    background: rgba(30,30,35,0.9);
    border-radius: 44px;
    padding: 3px 18px;
    margin-bottom: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.msb-login-page .input-group:focus-within,
.msb-fullscreen-login .input-group:focus-within {
    border-color: #1ed760;
    box-shadow: 0 0 0 3px rgba(30,215,96,0.14);
}

.msb-login-page .input-group i,
.msb-fullscreen-login .input-group i {
    color: #1ed760;
    font-size: 14px;
    width: 20px;
}

.msb-login-page .input-group input,
.msb-fullscreen-login .input-group input {
    background: transparent;
    border: none;
    padding: 12px 0;
    width: 100%;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    direction: ltr;
    text-align: left;
}

.msb-login-page .input-group input:focus,
.msb-fullscreen-login .input-group input:focus { outline: none; }
.msb-login-page .input-group input::placeholder,
.msb-fullscreen-login .input-group input::placeholder { color: rgba(255,255,255,0.34); }

.msb-login-page .otp-container,
.msb-fullscreen-login .otp-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 24px 0 18px;
    direction: ltr;
}

.msb-login-page .otp-box,
.msb-fullscreen-login .otp-box {
    width: 48px;
    height: 56px;
    background: rgba(30,30,35,0.9);
    border: 2px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    font-family: monospace;
    color: #fff;
    transition: all 0.2s ease;
}

.msb-login-page .otp-box:focus,
.msb-fullscreen-login .otp-box:focus {
    outline: none;
    border-color: #1ed760;
    box-shadow: 0 0 0 3px rgba(30,215,96,0.15);
}

.msb-login-page .otp-box-filled,
.msb-fullscreen-login .otp-box-filled {
    border-color: #1ed760;
    background: rgba(30,215,96,0.08);
}

.msb-login-page button,
.msb-fullscreen-login button {
    width: 100%;
    border: none;
    padding: 12px;
    border-radius: 44px;
    font-weight: 800;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
}

.msb-login-page .msb-login-submit,
.msb-fullscreen-login .msb-login-submit {
    background: linear-gradient(135deg, #1ed760 0%, #17a84b 100%);
    color: #000;
    margin-top: 6px;
}

.msb-login-page button:hover,
.msb-fullscreen-login button:hover { transform: scale(0.98); filter: brightness(1.05); }
.msb-login-page button:disabled,
.msb-fullscreen-login button:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

.msb-login-page .back-btn,
.msb-fullscreen-login .back-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.7);
    margin-top: 10px;
}

.msb-login-page .back-btn:hover,
.msb-fullscreen-login .back-btn:hover { background: rgba(255,255,255,0.06); color: #fff; }

.msb-login-page .error-message,
.msb-fullscreen-login .error-message {
    background: rgba(231,76,60,0.12);
    color: #e74c3c;
    padding: 9px 12px;
    border-radius: 18px;
    margin-bottom: 14px;
    font-size: 12px;
    text-align: center;
}

.msb-login-page .info-message,
.msb-fullscreen-login .info-message {
    background: rgba(30,215,96,0.08);
    color: #1ed760;
    padding: 9px 12px;
    border-radius: 18px;
    margin-bottom: 14px;
    font-size: 12px;
    text-align: center;
}

.msb-login-page .test-notice,
.msb-fullscreen-login .test-notice {
    background: rgba(255,152,0,0.15);
    color: #ff9800;
    padding: 10px;
    border-radius: 16px;
    margin-bottom: 16px;
    font-size: 12px;
    text-align: center;
    border: 1px solid rgba(255,152,0,0.28);
}

.msb-login-page .msb-login-footer,
.msb-fullscreen-login .msb-login-footer {
    margin-top: 24px;
    font-size: 10px;
    color: rgba(255,255,255,0.32);
    text-align: center;
}

.msb-login-page .msb-login-footer a,
.msb-fullscreen-login .msb-login-footer a { color: #1ed760; text-decoration: none; }

@media (max-width: 480px) {
    .msb-fullscreen-login,
    .msb-login-page {
        min-height: calc(100vh - 145px);
        padding: 14px 10px 120px;
        border-radius: 20px;
    }
    .msb-login-page .login-container,
    .msb-fullscreen-login .login-container { max-width: 350px; }
    .msb-login-page .login-card,
    .msb-fullscreen-login .login-card { padding: 28px 18px; border-radius: 34px; }
    .msb-login-page h1,
    .msb-fullscreen-login h1 { font-size: 22px; }
    .msb-login-page .otp-container,
    .msb-fullscreen-login .otp-container { gap: 7px; }
    .msb-login-page .otp-box,
    .msb-fullscreen-login .otp-box { width: 43px; height: 52px; font-size: 20px; }
}

/* ========== صفحه لاگین تمام صفحه (Fullscreen App Style) ========== */
.msb-fullscreen-login {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(145deg, #0a0a0a 0%, #121212 100%);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.msb-login-app-wrapper {
    width: 100%;
    max-width: 460px;
    padding: 20px;
    animation: fadeInUp 0.6s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.msb-login-app-card {
    background: rgba(22, 22, 28, 0.85);
    backdrop-filter: blur(20px);
    border-radius: 48px;
    padding: 40px 28px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    text-align: center;
}

.msb-app-header {
    margin-bottom: 40px;
}

.msb-app-logo {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    margin-bottom: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}

.msb-app-header h1 {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #1ed760);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 8px;
}

.msb-slogan {
    color: #1ed760;
    font-size: 14px;
    margin-top: -5px;
    margin-bottom: 0;
    font-weight: 500;
    letter-spacing: 1px;
}

.msb-login-step {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.msb-login-step.active {
    display: block;
    animation: fadeSlideUp 0.4s forwards;
}

@keyframes fadeSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.msb-input-group {
    background: #1e1e1e;
    border-radius: 60px;
    padding: 8px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #2a2a2a;
    transition: all 0.2s;
}

.msb-input-group:focus-within {
    border-color: #1ed760;
    box-shadow: 0 0 0 3px rgba(30,215,96,0.2);
}

.msb-input-group i {
    color: #1ed760;
    font-size: 18px;
    width: 24px;
}

.msb-input-group input {
    background: transparent;
    border: none;
    padding: 14px 0;
    width: 100%;
    color: #fff;
    font-size: 16px;
    direction: ltr;
    text-align: left;
}

.msb-input-group input:focus {
    outline: none;
}

.msb-input-group input::placeholder {
    color: #666;
}

.msb-hint-text {
    font-size: 12px;
    color: #aaa;
    margin: -15px 0 20px 0;
}

.msb-hint-text span {
    background: #2a2a2a;
    padding: 4px 12px;
    border-radius: 40px;
    font-family: monospace;
    font-size: 14px;
    color: #1ed760;
}

.msb-login-btn-app {
    width: 100%;
    background: #1ed760;
    border: none;
    padding: 16px;
    border-radius: 60px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    color: #000;
    transition: all 0.25s;
    margin-top: 8px;
}

.msb-login-btn-app:hover {
    transform: scale(0.98);
    filter: brightness(1.05);
    box-shadow: 0 8px 20px rgba(30,215,96,0.3);
}

.msb-link-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    margin-top: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: color 0.2s;
    width: 100%;
}

.msb-link-btn:hover {
    color: #1ed760;
}

.msb-code-message {
    background: rgba(30,215,96,0.1);
    border-radius: 24px;
    padding: 12px;
    font-size: 13px;
    margin-bottom: 28px;
    color: #ddd;
}

.msb-app-footer {
    margin-top: 32px;
    font-size: 11px;
    color: #666;
}

.msb-app-footer a {
    color: #1ed760;
    text-decoration: none;
}

/* ========== صفحه داشبورد ========== */
.msb-dashboard {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* کارت کاربر - طراحی اپلیکیشنی */
.msb-dashboard-header {
    margin-bottom: 30px;
}

.msb-user-card {
    background: linear-gradient(135deg, rgba(18,18,18,0.9), rgba(10,10,10,0.95));
    backdrop-filter: blur(10px);
    border-radius: 28px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    transition: all 0.3s;
}

.msb-user-avatar-large {
    width: 85px;
    height: 85px;
    border-radius: 28px;
    object-fit: cover;
    border: 3px solid #1ed760;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3);
    transition: transform 0.3s;
}

.msb-user-avatar-large:hover {
    transform: scale(1.02);
}

.msb-user-details {
    flex: 1;
}

.msb-user-details h2 {
    font-size: 24px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff, #ccc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.msb-user-details p {
    color: #b3b3b3;
    font-size: 13px;
    margin: 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.msb-user-details i {
    width: 20px;
    color: #1ed760;
}

.msb-user-actions {
    display: flex;
    gap: 12px;
}

.msb-btn-outline {
    background: rgba(255,255,255,0.05);
    border: 1px solid #1ed760;
    color: #1ed760;
    padding: 10px 20px;
    border-radius: 40px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.msb-btn-outline:hover {
    background: #1ed760;
    color: #000;
    border-color: #1ed760;
    transform: translateY(-2px);
}

.msb-btn-danger {
    background: rgba(231, 76, 60, 0.15);
    border: none;
    color: #e74c3c;
    padding: 10px 20px;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.msb-btn-danger:hover {
    background: #e74c3c;
    color: #fff;
    transform: translateY(-2px);
}

/* آمار - طراحی کارتی مدرن */
.msb-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.msb-stat-box {
    background: linear-gradient(135deg, rgba(18,18,18,0.7), rgba(10,10,10,0.8));
    backdrop-filter: blur(8px);
    border-radius: 24px;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 150px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s;
}

.msb-stat-box:hover {
    border-color: rgba(30,215,96,0.3);
    transform: translateY(-3px);
}

.msb-stat-box i {
    font-size: 36px;
    color: #1ed760;
}

.msb-stat-number {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
}

.msb-stat-label {
    font-size: 12px;
    color: #b3b3b3;
    margin-top: 4px;
}

/* ========== بخش پخش شده‌های اخیر ========== */
.recently-played-section {
    background: var(--surface, #121212);
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid rgba(255,255,255,0.06);
}

.recently-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.recently-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.recently-title i {
    font-size: 20px;
    color: #1ed760;
}

.recently-title h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.refresh-recently-btn {
    background: rgba(255,255,255,0.08);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #b3b3b3;
    cursor: pointer;
    transition: all 0.2s;
}

.refresh-recently-btn:hover {
    background: #1ed760;
    color: #000;
}

.recently-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recently-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(30,30,35,0.8);
    border-radius: 14px;
    transition: all 0.2s;
}

.recently-item:hover {
    background: rgba(42,42,48,0.9);
    transform: translateX(-4px);
}

.recently-number {
    width: 40px;
    font-size: 13px;
    font-weight: 600;
    color: #1ed760;
}

.recently-cover {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
}

.recently-info {
    flex: 1;
}

.recently-title-text {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.recently-artist {
    font-size: 11px;
    color: #b3b3b3;
}

.recently-actions {
    display: flex;
    gap: 8px;
}

.recently-play-btn, .recently-goto-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.recently-play-btn {
    background: rgba(30,215,96,0.15);
    color: #1ed760;
}

.recently-play-btn:hover {
    background: #1ed760;
    color: #000;
}

.recently-goto-btn {
    background: rgba(255,255,255,0.08);
    color: #b3b3b3;
}

.recently-goto-btn:hover {
    background: #1ed760;
    color: #000;
}

.empty-recently {
    text-align: center;
    padding: 40px 20px;
    color: #b3b3b3;
}

.empty-recently i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-recently span {
    font-size: 12px;
    display: block;
    margin-top: 8px;
    opacity: 0.6;
}

/* هدر پلی‌لیست */
.msb-playlists-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.msb-playlists-header h3 {
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.msb-view-toggle {
    display: flex;
    gap: 8px;
    background: #1e1e1e;
    padding: 4px;
    border-radius: 50px;
}

.msb-view-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    padding: 8px 20px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.msb-view-btn.active {
    background: #1ed760;
    color: #000;
}

.msb-view-btn i {
    font-size: 14px;
    margin-left: 6px;
}

/* ========== نمایش گرید - واکنش‌گرا ========== */
.msb-grid-view {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 22px;
}

@media (max-width: 1200px) {
    .msb-grid-view {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .msb-grid-view {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .msb-grid-view {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .msb-grid-view {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* کارت پلی‌لیست */
.msb-playlist-card {
    background: rgba(18, 18, 18, 0.6);
    backdrop-filter: blur(4px);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.05);
}

.msb-playlist-card:hover {
    transform: translateY(-8px);
    border-color: rgba(30,215,96,0.4);
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.4);
}

.msb-playlist-cover {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #0a0a0a;
}

.msb-playlist-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.msb-playlist-card:hover .msb-playlist-cover img {
    transform: scale(1.08);
}

.msb-playlist-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.msb-playlist-card:hover .msb-playlist-overlay {
    opacity: 1;
}

.msb-play-btn-card {
    width: 50px;
    height: 50px;
    background: #1ed760;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transform: scale(0.8);
    transition: transform 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.msb-play-btn-card i {
    color: #000;
    font-size: 18px;
    margin-right: 2px;
}

.msb-playlist-card:hover .msb-play-btn-card {
    transform: scale(1);
}

.msb-playlist-info {
    padding: 14px 12px 10px 12px;
}

.msb-playlist-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.msb-playlist-info span {
    font-size: 11px;
    color: #b3b3b3;
}

.msb-playlist-actions-card {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 0 12px 12px 12px;
}

.msb-edit-btn, .msb-delete-btn, .msb-view-detail-btn {
    background: rgba(255,255,255,0.06);
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 10px;
    transition: all 0.2s;
    font-size: 12px;
}

.msb-edit-btn:hover, .msb-view-detail-btn:hover {
    background: #1ed760;
    color: #000;
}

.msb-delete-btn:hover {
    background: rgba(231, 76, 60, 0.8);
    color: #fff;
}

/* ========== نمایش لیستی ========== */
.msb-list-view {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.msb-playlist-row {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(18, 18, 18, 0.5);
    border-radius: 18px;
    padding: 12px 18px;
    transition: all 0.2s;
    border: 1px solid rgba(255,255,255,0.05);
}

.msb-playlist-row:hover {
    background: rgba(30,30,30,0.8);
    transform: translateX(-5px);
    border-color: rgba(30,215,96,0.4);
}

.msb-row-number {
    width: 35px;
    font-size: 14px;
    font-weight: 600;
    color: #b3b3b3;
}

.msb-row-cover {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    overflow: hidden;
    background: #0a0a0a;
}

.msb-row-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.msb-row-info {
    flex: 1;
}

.msb-row-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.msb-row-meta {
    font-size: 11px;
    color: #b3b3b3;
}

.msb-row-actions {
    display: flex;
    gap: 8px;
}

.msb-play-row, .msb-edit-row, .msb-delete-row, .msb-view-detail-row {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.msb-play-row {
    background: #1ed760;
    color: #000;
}

.msb-play-row:hover {
    transform: scale(1.05);
}

.msb-edit-row, .msb-view-detail-row {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.msb-delete-row {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.msb-edit-row:hover, .msb-view-detail-row:hover {
    background: #1ed760;
    color: #000;
}

.msb-delete-row:hover {
    background: #e74c3c;
    color: #fff;
}

/* ========== مودال‌ها ========== */
.msb-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(16px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.msb-modal-content {
    background: #121212;
    border-radius: 32px;
    width: 90%;
    max-width: 500px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    overflow: hidden;
}

.msb-modal-large {
    max-width: 700px;
}

.msb-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid #2a2a2a;
}

.msb-modal-header h3 {
    margin: 0;
    font-size: 20px;
}

.msb-modal-close {
    background: none;
    border: none;
    color: #b3b3b3;
    font-size: 24px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.msb-modal-close:hover {
    background: #2a2a2a;
}

.msb-modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

/* اسکرول بار برای مودال */
.msb-modal-body::-webkit-scrollbar {
    width: 6px;
}

.msb-modal-body::-webkit-scrollbar-track {
    background: #1e1e1e;
    border-radius: 10px;
}

.msb-modal-body::-webkit-scrollbar-thumb {
    background: #1ed760;
    border-radius: 10px;
}

.msb-form-group-modal {
    margin-bottom: 20px;
}

.msb-form-group-modal label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.msb-form-group-modal input {
    width: 100%;
    padding: 14px;
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    color: #fff;
}

.msb-form-group-modal input:focus {
    outline: none;
    border-color: #1ed760;
}

.msb-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.msb-btn-secondary {
    background: #2a2a2a;
    border: none;
    padding: 10px 22px;
    border-radius: 40px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.msb-btn-secondary:hover {
    background: #3a3a3a;
}

.msb-btn-primary {
    background: linear-gradient(135deg, #1ed760, #0e8e3e);
    border: none;
    padding: 10px 24px;
    border-radius: 40px;
    color: #000;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.msb-btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

/* جستجو و لیست آهنگ‌ها */
.msb-detail-search {
    display: flex;
    align-items: center;
    background: #1e1e1e;
    border-radius: 40px;
    padding: 10px 18px;
    margin-bottom: 20px;
    border: 1px solid #2a2a2a;
}

.msb-detail-search i {
    color: #b3b3b3;
    margin-left: 10px;
}

.msb-detail-search input {
    flex: 1;
    background: none;
    border: none;
    color: #fff;
    padding: 4px;
    font-size: 14px;
}

.msb-detail-search input:focus {
    outline: none;
}

.msb-songs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.msb-song-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #1e1e1e;
    border-radius: 16px;
    transition: 0.2s;
}

.msb-song-item:hover {
    background: #2a2a2a;
}

.msb-song-number {
    width: 35px;
    color: #b3b3b3;
    font-size: 13px;
    font-weight: 600;
}

.msb-song-cover-sm {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
}

.msb-song-details {
    flex: 1;
}

.msb-song-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
    color: #fff;
}

.msb-song-artist-sm {
    font-size: 11px;
    color: #b3b3b3;
}

.msb-song-actions {
    display: flex;
    gap: 8px;
}

.msb-song-play, .msb-song-remove {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.msb-song-play {
    background: #1ed760;
    color: #000;
}

.msb-song-play:hover {
    transform: scale(1.05);
}

.msb-song-remove {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.msb-song-remove:hover {
    background: #e74c3c;
    color: #fff;
}

.msb-empty-songs {
    text-align: center;
    padding: 40px;
    color: #b3b3b3;
}

.msb-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: rgba(18,18,18,0.5);
    border-radius: 24px;
}

.msb-empty-state i {
    font-size: 48px;
    color: #b3b3b3;
    margin-bottom: 15px;
}

.msb-empty-state p {
    margin-bottom: 20px;
    color: #b3b3b3;
}

/* صفحه پروفایل - استایل اپلیکیشنی */
.msb-profile-container {
    max-width: 600px;
    margin: 30px auto;
    padding: 20px;
}

.msb-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.msb-profile-header h2 {
    font-size: 24px;
    color: #fff;
}

.msb-profile-avatar {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
    text-align: center;
    width: 100%;
}

.msb-profile-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 30px;
    object-fit: cover;
    border: 3px solid #1ed760;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3);
}

.msb-change-avatar {
    position: absolute;
    bottom: 5px;
    right: calc(50% - 60px);
    background: #1ed760;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    transition: all 0.2s;
}

.msb-change-avatar:hover {
    transform: scale(1.05);
}

/* فرم پروفایل */
.msb-form-group {
    margin-bottom: 20px;
    text-align: right;
}

.msb-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: #b3b3b3;
}

.msb-form-group input {
    width: 100%;
    padding: 14px 16px;
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s;
}

.msb-form-group input:focus {
    outline: none;
    border-color: #1ed760;
    box-shadow: 0 0 0 3px rgba(30,215,96,0.15);
}

.msb-form-group input:disabled,
.msb-form-group input[readonly] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* صفحه الزام به ورود */
.msb-require-login {
    text-align: center;
    padding: 60px 20px;
    background: #121212;
    border-radius: 24px;
    margin: 40px auto;
    max-width: 500px;
}

.msb-require-login a {
    color: #1ed760;
    text-decoration: none;
    font-weight: 600;
}

.msb-require-login a:hover {
    text-decoration: underline;
}

/* دکمه افزودن به پلی‌لیست در صفحه آهنگ */
.msb-song-playlist-container {
    position: relative;
    display: inline-block;
}

.msb-add-to-playlist-trigger {
    background: linear-gradient(135deg, #1ed760, #0e8e3e);
    border: none;
    padding: 10px 20px;
    border-radius: 40px;
    color: #000;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.msb-add-to-playlist-trigger:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.msb-playlist-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: #121212;
    border-radius: 20px;
    width: 260px;
    z-index: 1000;
    border: 1px solid #2a2a2a;
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.4);
    display: none;
}

.msb-playlist-dropdown.active {
    display: block;
    animation: fadeInUp 0.2s ease;
}

.msb-playlist-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #2a2a2a;
}

.msb-playlist-dropdown-list {
    max-height: 300px;
    overflow-y: auto;
}

.msb-playlist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    text-align: right;
}

.msb-playlist-item:hover {
    background: #2a2a2a;
}

.msb-playlist-count {
    margin-right: auto;
    font-size: 11px;
    color: #b3b3b3;
}

.msb-playlist-divider {
    height: 1px;
    background: #2a2a2a;
    margin: 5px 0;
}

.msb-create-playlist-from-song {
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    color: #1ed760;
    cursor: pointer;
    text-align: right;
    font-weight: 600;
}

.msb-create-playlist-from-song:hover {
    background: rgba(30,215,96,0.1);
}

.msb-no-playlist-msg {
    padding: 20px;
    text-align: center;
    color: #b3b3b3;
}

/* واکنش‌گرایی موبایل */
@media (max-width: 768px) {
    .msb-user-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .msb-user-details p {
        justify-content: center;
    }
    
    .msb-user-actions {
        justify-content: center;
        width: 100%;
    }
    
    .msb-playlist-row {
        flex-wrap: wrap;
    }
    
    .msb-row-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 8px;
    }
    
    .msb-profile-container {
        padding: 15px;
    }
    
    .msb-login-app-card {
        padding: 32px 20px;
        border-radius: 36px;
    }
    
    .msb-input-group {
        padding: 4px 18px;
    }
    
    .msb-modal-large {
        max-width: 95%;
    }
    
    .recently-played-section {
        padding: 12px;
    }
    
    .recently-item {
        padding: 8px;
    }
    
    .recently-cover {
        width: 40px;
        height: 40px;
    }
    
    .recently-number {
        width: 30px;
        font-size: 11px;
    }
    
    .recently-title-text {
        font-size: 12px;
    }
    
    .recently-play-btn, .recently-goto-btn {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 480px) {
    .msb-playlist-info h4 {
        font-size: 13px;
    }
    
    .msb-stat-box {
        min-width: calc(50% - 10px);
    }
    
    .msb-app-header h1 {
        font-size: 24px;
    }
    
    .msb-slogan {
        font-size: 12px;
    }
    
    .msb-playlist-dropdown {
        width: 240px;
        right: -40px;
    }
}

/* Prevent dashboard FOUC while page-level styles are being parsed. */
.dashboard-modern.msb-dashboard-loading {
    visibility: hidden !important;
    opacity: 0 !important;
    animation: msbDashboardReadyFailsafe 0s linear 4s forwards;
}
@keyframes msbDashboardReadyFailsafe {
    to { visibility: visible; opacity: 1; }
}
