/**
 * Image Generator & Create pages – premium glass panel system.
 * Softer panels, subtle glow, rounded corners, starfield/noise background,
 * refined typography, polished pills, premium inputs.
 */

/* ========== Page background: starfield + noise (common .ms-studio-page for create + trends + future pages) ========== */
.ms-studio-page {
    position: relative;
    isolation: isolate;
    margin-top: 10px;
    padding: 24px 0 48px;
    /* Use more width on big screens; cap at 1600px so content doesn't over-stretch on ultra-wide */
    max-width: min(1600px, 100%);
    margin-left: auto;
    margin-right: auto;
}

.ms-studio-page::before {
    content: '';
    position: absolute;
    inset: 100px -24px -100px -24px;
    top: 80px;
    left: -24px;
    right: -24px;
    bottom: -80px;
    opacity: 0.9;
    opacity: 0.9;
    pointer-events: none;
    z-index: -2;
}

/* CSS noise fallback (no image required) */
.ms-studio-page::after {
    content: '';
    position: absolute;
    inset: -100px -24px -100px -24px;
    top: -80px;
    left: -24px;
    right: -24px;
    bottom: -80px;
    background-image: repeating-radial-gradient(
        circle at 0 0,
        transparent 0,
        transparent 2px,
        rgba(255, 255, 255, 0.03) 2px,
        rgba(255, 255, 255, 0.03) 3px
    );
    background-size: 24px 24px;
    opacity: 0.5;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: -1;
}

/* ========== Reusable premium panel system ========== */
.ms-panel {
    --ms-panel-radius: 22px;
    background: linear-gradient(145deg, rgb(63 84 105 / 85%) 0%, rgb(92 92 92 / 78%) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.ms-panel:hover {
    border-color: rgba(0, 255, 255, 0.12);
    transform: translateY(-1px);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(0, 255, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.ms-panel--hero {
    min-height: 100px;
    padding: 18px 22px;
    margin-top: -60px;
    background:linear-gradient(145deg, rgba(10, 14, 18, 0.85) 0%, rgb(90 129 169 / 78%) 100%);
    border-color: rgba(0, 255, 255, 0.1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 24px rgba(0, 255, 255, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ms-panel--hero:hover {
    border-color: rgba(0, 255, 255, 0.14);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.35),
        0 0 28px rgba(0, 255, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.ms-glow {
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.08), 0 0 40px rgba(0, 255, 255, 0.04);
}

.ms-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.06);
    transition: box-shadow 0.25s ease, transform 0.2s ease, border-color 0.2s ease;
}

.ms-pill:hover {
    box-shadow: 0 0 18px rgba(0, 255, 255, 0.12);
    transform: translateY(-1px);
    border-color: rgba(0, 255, 255, 0.18);
}

.ms-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    margin: 0;
}

/* ========== Hero (creation-hero) as top full-width card – same spacing and background as my-assets / my-movies ========== */
.ms-studio-page .creation-hero.ms-panel {
    margin-top: -100px;
    margin-bottom: 14px;
    padding: 18px 24px;
    /* Use creation-hero’s own gradient/fill (::before/::after) like my-assets and my-movies */
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Show creation-hero gradient border and inner fill (same as my-assets / my-movies hero) */
.ms-studio-page .creation-hero.ms-panel::before,
.ms-studio-page .creation-hero.ms-panel::after {
    display: block;
}

.ms-studio-page .creation-hero.ms-panel .creation-hero-glow {
    opacity: 1;
}

/* Trends page: same hero style and spacing as create / my-assets */
.creation-hero[data-type="trends"].ms-panel {
    margin-bottom: 14px;
    padding: 18px 24px;
}

.creation-hero[data-type="trends"] .creation-hero-title {
    font-size: clamp(28px, 2.8vw, 36px);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: -0.02em;
    margin: 0 0 6px;
}

.creation-hero[data-type="trends"] .creation-hero-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin: 0;
}

/* Explore page: same hero style as trends (no pills, title + subtitle) */
.creation-hero[data-type="explore"].ms-panel::before,
.creation-hero[data-type="explore"].ms-panel::after {
    display: none;
}
.creation-hero[data-type="explore"].ms-panel .creation-hero-glow {
    opacity: 0.6;
}
.creation-hero[data-type="explore"].ms-panel {
    margin-bottom: 20px;
    padding: 18px 24px;
}
.creation-hero[data-type="explore"] .creation-hero-title {
    font-size: clamp(28px, 2.8vw, 36px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
    /* Gradient from creation-hero.css (same as my-assets) */
    background: linear-gradient(90deg, #22d3ee 0%, #00d4ff 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}
.creation-hero[data-type="explore"] .creation-hero-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin: 0;
}

/* ai-models, ai-tools, articles, leaderboard, media: same hero style (no pills, title + subtitle) */
.creation-hero[data-type="ai-models"].ms-panel::before,
.creation-hero[data-type="ai-models"].ms-panel::after,
.creation-hero[data-type="ai-tools"].ms-panel::before,
.creation-hero[data-type="ai-tools"].ms-panel::after,
.creation-hero[data-type="articles"].ms-panel::before,
.creation-hero[data-type="articles"].ms-panel::after,
.creation-hero[data-type="leaderboard"].ms-panel::before,
.creation-hero[data-type="leaderboard"].ms-panel::after,
.creation-hero[data-type="media"].ms-panel::before,
.creation-hero[data-type="media"].ms-panel::after {
    display: none;
}
.creation-hero[data-type="ai-models"].ms-panel .creation-hero-glow,
.creation-hero[data-type="ai-tools"].ms-panel .creation-hero-glow,
.creation-hero[data-type="articles"].ms-panel .creation-hero-glow,
.creation-hero[data-type="leaderboard"].ms-panel .creation-hero-glow,
.creation-hero[data-type="media"].ms-panel .creation-hero-glow {
    opacity: 0.6;
}
.creation-hero[data-type="ai-models"].ms-panel,
.creation-hero[data-type="ai-tools"].ms-panel,
.creation-hero[data-type="articles"].ms-panel,
.creation-hero[data-type="leaderboard"].ms-panel,
.creation-hero[data-type="media"].ms-panel {
    margin-bottom: 20px;
    padding: 18px 24px;
}
.creation-hero[data-type="ai-models"] .creation-hero-title,
.creation-hero[data-type="ai-tools"] .creation-hero-title,
.creation-hero[data-type="articles"] .creation-hero-title,
.creation-hero[data-type="leaderboard"] .creation-hero-title,
.creation-hero[data-type="media"] .creation-hero-title {
    font-size: clamp(28px, 2.8vw, 36px);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: -0.02em;
    margin: 0 0 6px;
}
.creation-hero[data-type="ai-models"] .creation-hero-subtitle,
.creation-hero[data-type="ai-tools"] .creation-hero-subtitle,
.creation-hero[data-type="articles"] .creation-hero-subtitle,
.creation-hero[data-type="leaderboard"] .creation-hero-subtitle,
.creation-hero[data-type="media"] .creation-hero-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin: 0;
}

.ms-studio-page .creation-hero-title {
    font-size: clamp(28px, 2.8vw, 36px);
    font-weight: 700;
    
    background: linear-gradient(90deg, var(--turquoise, #33f0e6) 0%, #a78bfa 50%, #ec4899 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 14px rgba(51, 240, 230, 0.25));
    letter-spacing: -0.02em;
    margin: 0 0 6px;
}

.ms-studio-page .creation-hero-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin: 0;
}

.ms-studio-page .creation-hero-pill {
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.06);
    transition: box-shadow 0.25s ease, transform 0.2s ease, border-color 0.2s ease;
}

.ms-studio-page .creation-hero-pill:hover {
    box-shadow: 0 0 18px rgba(0, 255, 255, 0.12);
    transform: translateY(-1px);
    border-color: rgba(0, 255, 255, 0.18);
}

.ms-studio-page .creation-hero-model-info-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.06);
    transition: box-shadow 0.25s ease, transform 0.2s ease, border-color 0.2s ease;
}

.ms-studio-page .creation-hero-model-info-btn:hover {
    box-shadow: 0 0 18px rgba(0, 255, 255, 0.12);
    transform: translateY(-1px);
    border-color: rgba(0, 255, 255, 0.18);
}

.ms-studio-page .creation-hero-model-info-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.25);
}

/* ========== Layout: two columns 45% / 55% ========== */
.ms-studio-page .create-media-builder .characters-builder-inner,
.ms-studio-page .videos-studio-builder .characters-builder-inner {
    grid-template-columns: 0.45fr 0.55fr;
    gap: 24px;
    align-items: start;
}

/* ========== Settings & Preview cards use ms-panel ========== */
.ms-studio-page .create-media-settings-card.ms-panel,
.ms-studio-page .characters-settings-card.ms-panel {
    padding: 8px;
    border-radius: 22px;
    border: 1px solid rgba(0, 255, 255, 0.08);
    background: rgb(2 3 4 / 90%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ms-studio-page .create-media-preview-card.ms-panel,
.ms-studio-page .characters-preview-card.ms-panel {
    padding: 24px;
    border-radius: 22px;
    border: 1px solid rgba(0, 255, 255, 0.08);
    background: rgba(10, 12, 16, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ms-studio-page .create-media-recent-card.ms-panel {
    padding: 24px;
    border-radius: 22px;
    border: 1px solid rgba(0, 255, 255, 0.08);
    background: rgba(10, 12, 16, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Section headings: medium bold, icon aligned */
.ms-studio-page .settings-card-header .characters-card-title,
.ms-studio-page .characters-preview-card .characters-card-title,
.ms-studio-page .create-media-recent-card .characters-card-title {
    font-size: 17px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.ms-studio-page .settings-card-title-icon {
    color: rgba(0, 255, 255, 0.9);
    opacity: 0.9;
}

/* ========== Premium inputs (create page form) ========== */
.ms-studio-page .form-input,
.ms-studio-page .form-textarea,
.ms-studio-page .form-group input,
.ms-studio-page .form-group textarea,
.ms-studio-page .form-group select {
    background: rgba(0, 0, 0, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.95);
    padding: 12px 16px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ms-studio-page .form-input::placeholder,
.ms-studio-page .form-textarea::placeholder,
.ms-studio-page .form-group input::placeholder,
.ms-studio-page .form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.ms-studio-page .form-input:focus,
.ms-studio-page .form-textarea:focus,
.ms-studio-page .form-group input:focus,
.ms-studio-page .form-group textarea:focus,
.ms-studio-page .form-group select:focus {
    outline: none;
    border-color: rgba(0, 255, 255, 0.35) !important;
    box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.14) !important;
}

.ms-studio-page .form-textarea,
.ms-studio-page .form-group textarea,
.ms-studio-page .settings-prompt-block .form-textarea {
    min-height: 120px;
    padding: 14px 18px;
    resize: vertical;
}

.ms-studio-page .form-label,
.ms-studio-page .form-group label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

/* ========== Preview empty state: centered, shimmer, speckles ========== */
.ms-studio-page .create-media-preview-inner.preview-container {
    position: relative;
    min-height: 200px;
}

.ms-studio-page .create-media-preview-card .preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* Faint dotted/star speckles in preview background */
.ms-studio-page .create-media-preview-inner.preview-container::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background-image: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 32px 32px, 40px 40px, 28px 28px;
    pointer-events: none;
    z-index: 0;
}

.ms-studio-page .create-media-preview-card .preview-placeholder i {
    font-size: 52px;
    margin-bottom: 14px;
    color: rgba(0, 255, 255, 0.85);
    animation: ms-preview-icon-pulse 3s ease-in-out infinite;
}

@keyframes ms-preview-icon-pulse {
    0%, 100% { opacity: 0.85; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
}

.ms-studio-page .create-media-preview-card .preview-placeholder h4 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.ms-studio-page .create-media-preview-card .preview-placeholder p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.55);
}

/* ========== Divider + "What others created" section ========== */
.ms-studio-page .create-model-examples-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ms-studio-page .create-model-examples-title {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.02em;
}

.ms-studio-page .create-model-examples-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.ms-studio-page .create-model-example-item {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Show examples section by default (divider + title); grid filled by JS */
.ms-studio-page .create-model-examples-section {
    display: block;
}

/* ========== Buttons: visible focus states ========== */
.ms-studio-page .create-settings-generate-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.35);
}

.ms-studio-page .creation-hero-model-info-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.25);
}

/* ========== Responsive: stack vertically, consistent spacing ========== */
@media (max-width: 768px) {
    .ms-studio-page .create-media-builder .characters-builder-inner {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ms-studio-page .creation-hero.ms-panel {
        padding: 16px 18px;
    }

    .ms-studio-page .creation-hero-title {
        font-size: 24px;
    }

    .ms-studio-page .creation-hero-subtitle {
        font-size: 13px;
    }

    .ms-studio-page .create-media-preview-card {
        position: static;
    }
}

@media (max-width: 480px) {
    .ms-studio-page .creation-hero-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .ms-studio-page .creation-hero-pills {
        width: 100%;
        justify-content: flex-start;
    }
}

/* ========== Trends page: same style as create pages (starfield, hero, filter bar, grid) ========== */
.ms-studio-page .creation-hero[data-type="trends"].ms-panel::before,
.ms-studio-page .creation-hero[data-type="trends"].ms-panel::after,
.ms-studio-page .creation-hero[data-type="explore"].ms-panel::before,
.ms-studio-page .creation-hero[data-type="explore"].ms-panel::after,
.ms-studio-page .creation-hero[data-type="ai-models"].ms-panel::before,
.ms-studio-page .creation-hero[data-type="ai-models"].ms-panel::after,
.ms-studio-page .creation-hero[data-type="ai-tools"].ms-panel::before,
.ms-studio-page .creation-hero[data-type="ai-tools"].ms-panel::after,
.ms-studio-page .creation-hero[data-type="articles"].ms-panel::before,
.ms-studio-page .creation-hero[data-type="articles"].ms-panel::after,
.ms-studio-page .creation-hero[data-type="leaderboard"].ms-panel::before,
.ms-studio-page .creation-hero[data-type="leaderboard"].ms-panel::after,
.ms-studio-page .creation-hero[data-type="media"].ms-panel::before,
.ms-studio-page .creation-hero[data-type="media"].ms-panel::after {
    display: none;
}

.ms-studio-page .trends-filter-bar {
    margin-bottom: 24px;
    padding: 14px 18px;
    border-radius: 22px;
    border: 1px solid rgba(0, 255, 255, 0.08);
    background: rgba(10, 12, 16, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.ms-studio-page .trends-content-body {
    padding: 0;
}

.ms-studio-page .ms-studio-page-inner {
    position: relative;
    z-index: 1;
}

.ms-studio-page .trends-loading-more {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.6);
}

.ms-studio-page .trends-loading-more .loading-spinner {
    margin: 0 auto 10px;
}

.ms-studio-page .trends-loading-more p {
    margin: 0;
    font-size: 14px;
}

/* ========== Studio detail pages (trend, media, model, etc.): two-column layout + panels ========== */
.ms-studio-page .ms-detail-inner {
    position: relative;
    z-index: 1;
}

.ms-studio-page .ms-detail-loading,
.ms-studio-page .ms-detail-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.ms-studio-page .ms-detail-loading .loading-spinner {
    margin-bottom: 20px;
}

.ms-studio-page .ms-detail-loading-text,
.ms-studio-page .ms-detail-error-text {
    color: var(--text-secondary);
    margin: 0;
}

.ms-studio-page .ms-detail-error .empty-icon {
    margin-bottom: 20px;
}

.ms-studio-page .ms-detail-error .empty-icon i {
    font-size: 64px;
    color: var(--error-color, #e74c3c);
}

.ms-studio-page .ms-detail-back-wrap {
    margin-bottom: 20px;
}

.ms-studio-page .ms-detail-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.ms-studio-page .ms-detail-back-link:hover {
    color: var(--primary-color, rgba(0, 212, 255, 1));
}

.ms-studio-page .ms-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

@media (max-width: 900px) {
    .ms-studio-page .ms-detail-layout {
        grid-template-columns: 1fr;
    }
}

.ms-studio-page .ms-detail-media.ms-panel,
.ms-studio-page .ms-detail-info.ms-panel {
    padding: 24px;
}

.ms-studio-page .ms-detail-media-container {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--bg-secondary);
}

.ms-studio-page .ms-detail-nav {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: space-between;
}

.ms-studio-page .ms-detail-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.ms-studio-page .ms-detail-nav-btn:hover {
    border-color: rgba(0, 212, 255, 0.3);
    background: rgba(0, 212, 255, 0.08);
}

.ms-studio-page .ms-detail-nav-btn .nav-title {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.ms-studio-page .ms-detail-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--text-primary);
}

.ms-studio-page .ms-detail-badges {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.ms-studio-page .ms-detail-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
}

.ms-studio-page .ms-detail-badge--category {
    background: rgba(102, 126, 234, 0.35);
    color: #fff;
}

.ms-studio-page .ms-detail-badge--muted {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.ms-studio-page .ms-detail-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 24px;
    font-size: 16px;
}

.ms-studio-page .ms-detail-section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--text-primary);
}

.ms-studio-page .ms-detail-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.06);
    padding: 4px;
    border-radius: 12px;
}

.ms-studio-page .ms-detail-toggle .toggle-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    background: transparent;
    color: var(--text-secondary);
}

.ms-studio-page .ms-detail-toggle .toggle-btn.active {
    background: var(--accent-color);
    color: #fff;
}

.ms-studio-page .ms-detail-form-panel.ms-panel {
    padding: 20px;
}

.ms-studio-page .ms-detail-form-panel.ms-detail-upload-area {
    border: 2px dashed rgba(102, 126, 234, 0.3);
}

/* Assets page project scope tabs */
.assets-project-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    width: fit-content;
}
.assets-project-tabs-single {
    background: transparent;
    padding: 0;
}
.assets-scope-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary, rgba(255,255,255,0.7));
}
.assets-scope-tab {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary, rgba(255,255,255,0.7));
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.assets-scope-tab:hover {
    color: var(--text-primary, #fff);
    background: rgba(255, 255, 255, 0.08);
}

.assets-scope-tab.active {
    background: rgba(0, 212, 255, 0.2);
    color: var(--accent-color, #00d4ff);
}

/* Assets page project filter dropdown */
.assets-top-filter-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.assets-project-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    flex-wrap: wrap;
}
.assets-project-filter-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
    margin: 0;
}
.assets-project-select {
    min-width: 180px;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: #1a1d24;
    background-color: #1a1d24;
    color: var(--text-primary, rgba(255, 255, 255, 0.95));
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}
.assets-project-select option {
    background: #1a1d24;
    background-color: #1a1d24;
    color: rgba(255, 255, 255, 0.95);
}
.assets-project-select:hover {
    background: rgba(255, 255, 255, 0.1);
    background-color: rgba(40, 44, 52, 0.95);
    border-color: rgba(255, 255, 255, 0.3);
}
.assets-project-select:focus {
    outline: none;
    border-color: var(--accent-color, #00d4ff);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2);
}

.assets-model-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    flex-wrap: wrap;
}
.assets-model-filter-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
    margin: 0;
}
.assets-model-select {
    min-width: 180px;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: #1a1d24;
    background-color: #1a1d24;
    color: var(--text-primary, rgba(255, 255, 255, 0.95));
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}
.assets-model-select option {
    background: #1a1d24;
    background-color: #1a1d24;
    color: rgba(255, 255, 255, 0.95);
}
.assets-model-select:hover {
    background: rgba(255, 255, 255, 0.1);
    background-color: rgba(40, 44, 52, 0.95);
    border-color: rgba(255, 255, 255, 0.3);
}
.assets-model-select:focus {
    outline: none;
    border-color: var(--accent-color, #00d4ff);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2);
}

/* Assets page type filter (media types from creation methods) */
.assets-type-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 0;
    align-items: center;
}
.assets-type-filters .assets-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary, rgba(255, 255, 255, 0.9));
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.assets-type-filters .assets-type-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}
.assets-type-filters .assets-type-pill.active {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.12);
}
.assets-type-filters .assets-type-pill.badge-image.active,
.assets-type-filters .assets-type-pill.badge-video.active,
.assets-type-filters .assets-type-pill.badge-audio.active,
.assets-type-filters .assets-type-pill.badge-character.active {
    background: inherit;
    border-color: inherit;
    color: inherit;
}

/* Top filter row pagination (Prev/Next at right) */
.assets-top-pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.assets-top-page-btn {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary, rgba(255, 255, 255, 0.95));
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.assets-top-page-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}
.assets-top-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
