/* ============================================================================
 * NStar 3D Studio & Viewer — Pro Dark Workspace UI (Idol Max / Blender Inspired)
 * Scoped strictly to .nstar-3d-app so it never affects the rest of the WP theme
 * ============================================================================ */

/* Generous top breathing room below the fixed NStar header/logo */
.nstar-3d-main-spacer {
    padding-top: 5.75rem;
    padding-bottom: 1.5rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}
@media (min-width: 640px) {
    .nstar-3d-main-spacer {
        padding-top: 7.75rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}
@media (min-width: 1024px) {
    .nstar-3d-main-spacer {
        padding-top: 7rem;
    }
}
@media (min-width: 1630px) {
    .nstar-3d-main-spacer {
        padding-top: 8rem;
    }
}
    
.nstar-3d-app {
    --st-bg: #0a0b0f;
    --st-surface: #12141b;
    --st-surface-2: #181b24;
    --st-surface-3: #1f2330;
    --st-border: rgba(255, 255, 255, 0.085);
    --st-border-strong: rgba(255, 255, 255, 0.16);
    --st-text: #f1f5f9;
    --st-muted: #94a3b8;
    --st-accent: #38bdf8;
    --st-accent-2: #a855f7;
    --st-warm: #f97316;
    --st-success: #22c55e;
    --st-radius: 12px;
    --st-radius-sm: 8px;

    font-family: 'Kanit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--st-text);
    background: var(--st-bg);
    border: 1px solid var(--st-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    min-height: 480px;
    height: calc(100vh - 156px);
    height: calc(100dvh - 156px);
    max-height: 760px;
    position: relative;
}

.nstar-3d-app.is-focus-mode {
    min-height: calc(100vh - 28px);
    height: calc(100vh - 28px);
    max-height: none;
    border-radius: 12px;
}

.nstar-3d-app:fullscreen {
    height: 100vh;
    max-height: none;
    border-radius: 0;
    border: none;
}

/* --- TOP WORKSPACE HEADER (Idol Max Clean Bar) --- */
.nstar-3d-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: var(--st-surface);
    border-bottom: 1px solid var(--st-border);
    flex-shrink: 0;
    flex-wrap: wrap;
}

@media (orientation: landscape) {
    .nstar-3d-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
    }
}

.nstar-3d-badge {
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(168, 85, 247, 0.22));
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #7dd3fc;
    white-space: nowrap;
}

.nstar-3d-badge.is-admin {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.22), rgba(168, 85, 247, 0.24));
    border-color: rgba(249, 115, 22, 0.45);
    color: #fdba74;
}

.nstar-3d-title-wrap {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.nstar-3d-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nstar-3d-subtitle {
    font-size: 11px;
    color: var(--st-muted);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nstar-3d-topbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* --- MAIN SPLIT WORKSPACE --- */
.nstar-3d-body {
    display: flex;
    flex: 1;
    min-height: 0;
    position: relative;
}

/* --- LEFT SIDEBAR (Model List + Inspector Tabs) --- */
.nstar-3d-sidebar {
    width: 332px;
    flex-shrink: 0;
    background: var(--st-surface);
    border-right: 1px solid var(--st-border);
    display: flex;
    flex-direction: column;
    min-height: 0;
    transition: width 0.22s ease, transform 0.22s ease, opacity 0.2s ease;
    z-index: 15;
}

.nstar-3d-app.is-sidebar-collapsed .nstar-3d-sidebar {
    width: 0;
    border-right: none;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Model List Section (Shown in Studio Mode) */
.nstar-3d-models-box {
    border-bottom: 1px solid var(--st-border);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 36%;
    min-height: 150px;
    flex-shrink: 0;
}

.nstar-3d-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.nstar-3d-section-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--st-muted);
}

.nstar-3d-search {
    width: 100%;
    padding: 6px 10px;
    font-size: 12px;
    color: var(--st-text);
    background: var(--st-surface-2);
    border: 1px solid var(--st-border);
    border-radius: 7px;
    outline: none;
    transition: border-color 0.15s ease;
}

.nstar-3d-search:focus {
    border-color: var(--st-accent);
}

.nstar-3d-model-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow-y: auto;
    padding-right: 3px;
}

.nstar-3d-model-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    border-radius: var(--st-radius-sm);
    background: var(--st-surface-2);
    border: 1px solid transparent;
    color: var(--st-text);
    cursor: pointer;
    transition: all 0.15s ease;
}

.nstar-3d-model-item:hover {
    background: var(--st-surface-3);
    border-color: var(--st-border-strong);
}

.nstar-3d-model-item.is-active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(168, 85, 247, 0.14));
    border-color: rgba(56, 189, 248, 0.55);
}

.nstar-3d-model-name {
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nstar-3d-model-sub {
    font-size: 10.5px;
    color: var(--st-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nstar-3d-ext-pill {
    font-family: 'Orbitron', sans-serif;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.07);
    color: #cbd5e1;
    flex-shrink: 0;
}

.nstar-3d-ext-pill[data-ext="glb"] { background: rgba(56, 189, 248, 0.18); color: #7dd3fc; }
.nstar-3d-ext-pill[data-ext="obj"] { background: rgba(249, 115, 22, 0.18); color: #fdba74; }
.nstar-3d-ext-pill[data-ext="json"] { background: rgba(34, 197, 94, 0.18); color: #86efac; }
.nstar-3d-ext-pill[data-ext="js"] { background: rgba(234, 179, 8, 0.18); color: #fde047; }

/* --- INSPECTOR TABS --- */
.nstar-3d-tabs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 4px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.22);
    border-bottom: 1px solid var(--st-border);
    flex-shrink: 0;
}

.nstar-3d-tab {
    padding: 6px 6px;
    font-size: 11px;
    font-weight: 500;
    color: var(--st-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    white-space: nowrap;
}

.nstar-3d-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.nstar-3d-tab.is-active {
    color: #fff;
    background: var(--st-surface-3);
    border-color: var(--st-border-strong);
}

.nstar-3d-tab-panels {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    min-height: 0;
}

.nstar-3d-panel {
    display: none;
    flex-direction: column;
    gap: 9px;
}

.nstar-3d-panel.is-active {
    display: flex;
}

/* --- CARDS, TOGGLES, BUTTONS, SLIDERS --- */
.nstar-3d-card {
    background: var(--st-surface-2);
    border: 1px solid var(--st-border);
    border-radius: 10px;
    padding: 9px 11px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.nstar-3d-card-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nstar-3d-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12.5px;
    color: #e2e8f0;
}

.nstar-3d-row small {
    display: block;
    font-size: 10.5px;
    color: var(--st-muted);
    line-height: 1.25;
}

/* Switch Toggle */
.nstar-3d-switch {
    position: relative;
    width: 38px;
    height: 21px;
    flex-shrink: 0;
}

.nstar-3d-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.nstar-3d-switch span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: all 0.18s ease;
}

.nstar-3d-switch span::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    left: 2px;
    top: 2px;
    border-radius: 50%;
    background: #e2e8f0;
    transition: transform 0.18s ease, background 0.18s ease;
}

.nstar-3d-switch input:checked + span {
    background: rgba(56, 189, 248, 0.35);
    border-color: rgba(56, 189, 248, 0.8);
}

.nstar-3d-switch input:checked + span::after {
    transform: translateX(17px);
    background: #38bdf8;
}

/* Buttons */
.nstar-3d-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--st-text);
    background: var(--st-surface-3);
    border: 1px solid var(--st-border);
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.nstar-3d-btn:hover {
    background: #272d3d;
    border-color: var(--st-border-strong);
}

.nstar-3d-btn.is-active {
    background: rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.65);
    color: #bae6fd;
}

.nstar-3d-btn.is-primary {
    background: linear-gradient(135deg, #0284c7, #7c3aed);
    border-color: rgba(125, 211, 252, 0.45);
    color: #fff;
    font-weight: 600;
}

.nstar-3d-btn.is-primary:hover {
    filter: brightness(1.12);
}

.nstar-3d-btn.is-danger {
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.42);
    color: #fca5a5;
}

.nstar-3d-btn-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.nstar-3d-btn-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.nstar-3d-select,
.nstar-3d-input-num {
    width: 100%;
    padding: 6px 9px;
    font-size: 12px;
    color: var(--st-text);
    background: #0f1117;
    border: 1px solid var(--st-border);
    border-radius: 7px;
    outline: none;
}

.nstar-3d-select:focus,
.nstar-3d-input-num:focus {
    border-color: var(--st-accent);
}

/* Range Sliders */
.nstar-3d-slider-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nstar-3d-slider-head {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--st-muted);
}

.nstar-3d-slider-head strong {
    color: #e2e8f0;
    font-weight: 500;
}

.nstar-3d-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    outline: none;
}

.nstar-3d-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #38bdf8;
    border: 2px solid #0f172a;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.65);
}

.nstar-3d-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #38bdf8;
    border: 2px solid #0f172a;
    cursor: pointer;
}

/* Bone Inspector List */
.nstar-3d-bone-item {
    background: rgba(0, 0, 0, 0.24);
    border: 1px solid var(--st-border);
    border-radius: 8px;
    padding: 8px 9px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nstar-3d-bone-title {
    font-size: 11.5px;
    font-weight: 600;
    color: #bae6fd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nstar-3d-axis-row {
    display: grid;
    grid-template-columns: 16px 1fr 38px;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
}

.nstar-3d-axis-tag {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 9.5px;
    text-align: center;
}
.nstar-3d-axis-tag.ax-x { color: #f87171; }
.nstar-3d-axis-tag.ax-y { color: #4ade80; }
.nstar-3d-axis-tag.ax-z { color: #60a5fa; }

.nstar-3d-axis-val {
    text-align: right;
    color: var(--st-muted);
    font-variant-numeric: tabular-nums;
}

/* Upload Dropzone (Admin Studio Only) */
.nstar-3d-dropzone {
    border: 1.5px dashed rgba(56, 189, 248, 0.42);
    border-radius: 9px;
    padding: 12px 10px;
    text-align: center;
    background: rgba(56, 189, 248, 0.05);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 11.5px;
    color: #cbd5e1;
}

.nstar-3d-dropzone:hover,
.nstar-3d-dropzone.is-dragover {
    background: rgba(56, 189, 248, 0.14);
    border-color: #38bdf8;
}

/* --- RIGHT MAIN VIEWPORT (Idol Max Canvas Area) --- */
.nstar-3d-stage-wrap {
    flex: 1;
    position: relative;
    min-width: 0;
    min-height: 360px;
    background: radial-gradient(circle at 50% 42%, #1d212b 0%, #0b0d12 72%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.nstar-3d-bg-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    transition: opacity 0.25s ease, filter 0.25s ease;
    z-index: 1;
}

.nstar-3d-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 2;
    cursor: grab;
    touch-action: none;
}

.nstar-3d-canvas:active {
    cursor: grabbing;
}

/* Floating Viewport Overlays */
.nstar-3d-hud-top {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    pointer-events: none;
    z-index: 6;
    flex-wrap: wrap;
}

.nstar-3d-hud-group {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    pointer-events: auto;
    background: rgba(12, 14, 20, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--st-border);
    padding: 5px;
    border-radius: 10px;
}

.nstar-3d-hud-bottom {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    pointer-events: none;
    z-index: 6;
    flex-wrap: wrap;
}

.nstar-3d-stats {
    pointer-events: auto;
    font-size: 11px;
    color: #cbd5e1;
    background: rgba(12, 14, 20, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--st-border);
    padding: 6px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nstar-3d-stats span strong {
    color: #fff;
}

/* Loading & Toast Overlays */
.nstar-3d-loader {
    position: absolute;
    inset: 0;
    z-index: 12;
    background: rgba(10, 11, 15, 0.74);
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: opacity 0.25s ease;
}

.nstar-3d-loader.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.nstar-3d-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(56, 189, 248, 0.22);
    border-top-color: #38bdf8;
    border-radius: 50%;
    animation: nstar3dSpin 0.8s linear infinite;
}

@keyframes nstar3dSpin {
    to { transform: rotate(360deg); }
}

.nstar-3d-toast {
    position: absolute;
    bottom: 62px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(15, 23, 42, 0.94);
    border: 1px solid rgba(56, 189, 248, 0.55);
    color: #e0f2fe;
    font-size: 12px;
    padding: 8px 14px;
    border-radius: 9px;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nstar-3d-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Custom thin scrollbars inside sidebar */
.nstar-3d-sidebar ::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
.nstar-3d-sidebar ::-webkit-scrollbar-track {
    background: transparent;
}
.nstar-3d-sidebar ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
}

/* Responsive Tablet / Mobile */
@media (max-width: 960px) {
    .nstar-3d-app {
        height: auto;
        max-height: none;
        min-height: 820px;
    }
    .nstar-3d-body {
        flex-direction: column-reverse;
    }
    .nstar-3d-sidebar {
        width: 100%;
        border-right: none;
        border-top: 1px solid var(--st-border);
        max-height: 520px;
    }
    .nstar-3d-app.is-sidebar-collapsed .nstar-3d-sidebar {
        max-height: 0;
        height: 0;
    }
    .nstar-3d-stage-wrap {
        min-height: 52vh;
        height: 56vh;
    }
}

/* ============================================================================
 * LIGHT MODE OVERRIDES (Matches NStar "Mais Vistos / Recentes" Light Theme!)
 * ============================================================================ */
html[data-theme="light"] .nstar-3d-app,
html[data-bs-theme="light"] .nstar-3d-app {
    --st-bg: #eef2f6;
    --st-surface: #ffffff;
    --st-surface-2: #f8fafc;
    --st-surface-3: #e8eff6;
    --st-border: rgba(15, 23, 42, 0.12);
    --st-border-strong: rgba(15, 23, 42, 0.24);
    --st-text: #0f172a;
    --st-muted: #526277;
    --st-accent: #0284c7;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.09);
}

html[data-theme="light"] .nstar-3d-title,
html[data-bs-theme="light"] .nstar-3d-title {
    color: #0f172a;
}

html[data-theme="light"] .nstar-3d-badge,
html[data-bs-theme="light"] .nstar-3d-badge {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.12), rgba(14, 165, 233, 0.16));
    border-color: rgba(2, 132, 199, 0.34);
    color: #0369a1;
}

html[data-theme="light"] .nstar-3d-badge.is-admin,
html[data-bs-theme="light"] .nstar-3d-badge.is-admin {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(249, 115, 22, 0.16));
    border-color: rgba(217, 119, 6, 0.42);
    color: #b45309;
}

html[data-theme="light"] .nstar-3d-tabs,
html[data-bs-theme="light"] .nstar-3d-tabs {
    background: #f1f5f9;
}

html[data-theme="light"] .nstar-3d-tab,
html[data-bs-theme="light"] .nstar-3d-tab {
    color: #475569;
}

html[data-theme="light"] .nstar-3d-tab:hover,
html[data-bs-theme="light"] .nstar-3d-tab:hover {
    color: #0f172a;
    background: rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .nstar-3d-tab.is-active,
html[data-bs-theme="light"] .nstar-3d-tab.is-active {
    color: #0369a1;
    background: #ffffff;
    border-color: rgba(2, 132, 199, 0.35);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .nstar-3d-card,
html[data-bs-theme="light"] .nstar-3d-card {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.10);
}

html[data-theme="light"] .nstar-3d-card-title,
html[data-bs-theme="light"] .nstar-3d-card-title {
    color: #0e7490;
}

html[data-theme="light"] .nstar-3d-row,
html[data-bs-theme="light"] .nstar-3d-row {
    color: #1e293b;
}

html[data-theme="light"] .nstar-3d-btn,
html[data-bs-theme="light"] .nstar-3d-btn {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.14);
    color: #1e293b;
}

html[data-theme="light"] .nstar-3d-btn:hover,
html[data-bs-theme="light"] .nstar-3d-btn:hover {
    background: #f1f5f9;
    border-color: rgba(15, 23, 42, 0.28);
}

html[data-theme="light"] .nstar-3d-btn.is-active,
html[data-bs-theme="light"] .nstar-3d-btn.is-active {
    background: rgba(2, 132, 199, 0.14);
    border-color: rgba(2, 132, 199, 0.55);
    color: #0369a1;
}

html[data-theme="light"] .nstar-3d-btn.is-primary,
html[data-bs-theme="light"] .nstar-3d-btn.is-primary {
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    border-color: rgba(2, 132, 199, 0.65);
    color: #ffffff;
}

html[data-theme="light"] .nstar-3d-btn.is-danger,
html[data-bs-theme="light"] .nstar-3d-btn.is-danger {
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(220, 38, 38, 0.35);
    color: #b91c1c;
}

html[data-theme="light"] .nstar-3d-switch span,
html[data-bs-theme="light"] .nstar-3d-switch span {
    background: rgba(15, 23, 42, 0.15);
    border-color: rgba(15, 23, 42, 0.16);
}

html[data-theme="light"] .nstar-3d-switch span::after,
html[data-bs-theme="light"] .nstar-3d-switch span::after {
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
}

html[data-theme="light"] .nstar-3d-switch input:checked + span,
html[data-bs-theme="light"] .nstar-3d-switch input:checked + span {
    background: #0284c7;
    border-color: #0284c7;
}

html[data-theme="light"] .nstar-3d-switch input:checked + span::after,
html[data-bs-theme="light"] .nstar-3d-switch input:checked + span::after {
    background: #ffffff;
}

html[data-theme="light"] .nstar-3d-select,
html[data-theme="light"] .nstar-3d-input-num,
html[data-theme="light"] .nstar-3d-search,
html[data-bs-theme="light"] .nstar-3d-select,
html[data-bs-theme="light"] .nstar-3d-input-num,
html[data-bs-theme="light"] .nstar-3d-search {
    background: #ffffff;
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.16);
}

html[data-theme="light"] .nstar-3d-slider-head strong,
html[data-bs-theme="light"] .nstar-3d-slider-head strong {
    color: #0f172a;
}

html[data-theme="light"] .nstar-3d-range,
html[data-bs-theme="light"] .nstar-3d-range {
    background: rgba(15, 23, 42, 0.15);
}

html[data-theme="light"] .nstar-3d-range::-webkit-slider-thumb,
html[data-bs-theme="light"] .nstar-3d-range::-webkit-slider-thumb {
    background: #0284c7;
    border-color: #ffffff;
}

html[data-theme="light"] .nstar-3d-bone-item,
html[data-bs-theme="light"] .nstar-3d-bone-item {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.10);
}

html[data-theme="light"] .nstar-3d-bone-title,
html[data-bs-theme="light"] .nstar-3d-bone-title {
    color: #0369a1;
}

html[data-theme="light"] .nstar-3d-model-item,
html[data-bs-theme="light"] .nstar-3d-model-item {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

html[data-theme="light"] .nstar-3d-model-item:hover,
html[data-bs-theme="light"] .nstar-3d-model-item:hover {
    background: #f1f5f9;
    border-color: rgba(15, 23, 42, 0.20);
}

html[data-theme="light"] .nstar-3d-model-item.is-active,
html[data-bs-theme="light"] .nstar-3d-model-item.is-active {
    background: rgba(2, 132, 199, 0.11);
    border-color: rgba(2, 132, 199, 0.55);
}

html[data-theme="light"] .nstar-3d-ext-pill[data-ext="glb"],
html[data-bs-theme="light"] .nstar-3d-ext-pill[data-ext="glb"] {
    background: rgba(2, 132, 199, 0.14);
    color: #0369a1;
}

html[data-theme="light"] .nstar-3d-dropzone,
html[data-bs-theme="light"] .nstar-3d-dropzone {
    background: rgba(2, 132, 199, 0.06);
    border-color: rgba(2, 132, 199, 0.42);
    color: #1e293b;
}

html[data-theme="light"] .nstar-3d-stage-wrap,
html[data-bs-theme="light"] .nstar-3d-stage-wrap {
    background: radial-gradient(circle at 50% 40%, #f1f5f9 0%, #cfd8e3 82%);
}

html[data-theme="light"] .nstar-3d-hud-group,
html[data-theme="light"] .nstar-3d-stats,
html[data-bs-theme="light"] .nstar-3d-hud-group,
html[data-bs-theme="light"] .nstar-3d-stats {
    background: rgba(255, 255, 255, 0.84);
    border-color: rgba(15, 23, 42, 0.13);
    color: #334155;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .nstar-3d-stats span strong,
html[data-bs-theme="light"] .nstar-3d-stats span strong {
    color: #0f172a;
}

html[data-theme="light"] .nstar-3d-loader,
html[data-bs-theme="light"] .nstar-3d-loader {
    background: rgba(241, 245, 249, 0.82);
}

html[data-theme="light"] .nstar-3d-loader span,
html[data-bs-theme="light"] .nstar-3d-loader span {
    color: #1e293b !important;
}

html[data-theme="light"] .nstar-3d-toast,
html[data-bs-theme="light"] .nstar-3d-toast {
    background: rgba(255, 255, 255, 0.96);
    color: #0f172a;
    border-color: rgba(2, 132, 199, 0.45);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}

html[data-theme="light"] .nstar-3d-sidebar ::-webkit-scrollbar-thumb,
html[data-bs-theme="light"] .nstar-3d-sidebar ::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.22);
}
