/* ==========================================================================
   File: Tool/3d/app.css
   KHALA STUDIO — PRO 3D STUDIO (4-COLUMN CENTERED LAYOUT)
   - Recent Projects: 4 per row, centered container
   - Pure Color Hover Only (Zero Transcale / Transform)
   - Left Slim Rail: Hover Icon Box Only
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fullscreen Shell
   -------------------------------------------------------------------------- */
.threed-app-root {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    background: #1e1e20;
    color: #f1f3f4;
    font-family: 'Google Sans', 'Roboto', sans-serif;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

/* --------------------------------------------------------------------------
   Top Bar
   -------------------------------------------------------------------------- */
.threed-top-nav {
    height: 52px;
    background: #18181a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    padding: 0 16px;
    flex-shrink: 0;
}

.threed-nav-back-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: #a1a1aa;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.threed-nav-back-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.threed-nav-back-btn .material-symbols-outlined {
    font-size: 24px;
}

/* --------------------------------------------------------------------------
   Dashboard Body (Left Rail + Inward Actions + Centered 4-Col Grid)
   -------------------------------------------------------------------------- */
.threed-dashboard-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Left Slim Rail */
.threed-slim-rail {
    width: 76px;
    background: #18181a;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 0;
    flex-shrink: 0;
}

.threed-rail-home-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.threed-rail-icon-box {
    width: 52px;
    height: 52px;
    background: #2b3346;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5c9eff;
    cursor: pointer;
    transition: background-color 0.18s ease;
}

.threed-rail-icon-box:hover {
    background: #364057;
}

.threed-rail-icon-box .material-symbols-outlined {
    font-size: 26px;
}

.threed-rail-label {
    font-size: 0.8125rem;
    font-weight: 400;
    color: #9d9da4;
    cursor: default;
    pointer-events: none;
}

/* Inward Actions Column */
.threed-inward-actions {
    width: 136px;
    padding: 36px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
}

.threed-btn-new-file {
    width: 100%;
    height: 38px;
    border-radius: 19px;
    border: none;
    background: #0A84FF;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.18s ease;
}

.threed-btn-new-file:hover {
    background: #0070e0;
}

.threed-btn-open {
    width: 100%;
    height: 38px;
    border-radius: 19px;
    border: none;
    background: #2c2c30;
    color: #e4e4e7;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.threed-btn-open:hover {
    background: #38383e;
    color: #ffffff;
}

/* ⚡ Main Content: Centered Layout Container */
.threed-recent-container {
    flex: 1;
    overflow-y: auto;
    padding: 36px 24px 48px;
    display: flex;
    justify-content: center;
}

.threed-recent-container::-webkit-scrollbar {
    width: 6px;
}

.threed-recent-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.threed-recent-wrapper {
    width: 100%;
    max-width: 1040px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.threed-recent-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.01em;
}

/* ⚡ 4-Column Project Grid */
.threed-recent-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
}

.threed-project-card {
    background: #28282c;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: background-color 0.18s ease;
}

.threed-project-card:hover {
    background: #323238;
}

.threed-project-card:focus-visible {
    outline: 2px solid #0A84FF;
    outline-offset: 3px;
}

.threed-project-thumb {
    width: 100%;
    aspect-ratio: 1.25 / 1;
    overflow: hidden;
    background: #18181a;
}

.threed-project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.threed-project-meta {
    padding: 14px 16px;
    background: #28282c;
    transition: background-color 0.18s ease;
}

.threed-project-card:hover .threed-project-meta {
    background: #323238;
}

.threed-project-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #f1f3f4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   3D Editor Viewport
   -------------------------------------------------------------------------- */
.threed-editor-viewport-wrap {
    position: absolute;
    inset: 0;
    z-index: 100;
    background: #0e0e11;
    display: none;
}

.threed-editor-viewport-wrap.active {
    display: flex;
}

#threed-canvas-viewport {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    outline: none;
    cursor: grab;
}

#threed-canvas-viewport:active {
    cursor: grabbing;
}

.threed-studio-header {
    position: absolute;
    top: 16px;
    left: 20px;
    right: 20px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.threed-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
}

.threed-back-btn {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(26, 26, 30, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.threed-back-btn:hover {
    background: rgba(45, 45, 52, 0.95);
    border-color: rgba(255, 255, 255, 0.25);
}

.threed-back-btn span {
    font-size: 20px !important;
    color: #ffffff;
}

.threed-badge-info {
    height: 40px;
    padding: 0 18px;
    background: rgba(26, 26, 30, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.threed-badge-info span.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00e676;
}

/* Floating Panels */
.threed-floating-panel {
    position: absolute;
    top: 76px;
    bottom: 20px;
    width: 310px;
    background: rgba(20, 20, 24, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    z-index: 15;
    overflow: hidden;
}

#threed-left-panel { left: 20px; }
#threed-right-panel { right: 20px; }

.threed-panel-header {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9375rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9aa0a6;
    background: rgba(255, 255, 255, 0.02);
}

.threed-panel-content {
    padding: 18px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.threed-control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.threed-control-label {
    font-size: 0.875rem;
    color: #a1a1aa;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.threed-color-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.35);
    padding: 6px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.threed-color-input {
    -webkit-appearance: none;
    appearance: none;
    border: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    background: transparent;
    padding: 0;
}

.threed-color-input::-webkit-color-swatch-wrapper { padding: 0; }
.threed-color-input::-webkit-color-swatch {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.threed-color-hex-val {
    font-size: 0.875rem;
    color: #e4e4e7;
    font-family: monospace;
}

.threed-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.15);
    outline: none;
}

.threed-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #0A84FF;
    cursor: pointer;
    border: 2px solid #ffffff;
}

.threed-callout-box {
    background: rgba(10, 132, 255, 0.08);
    border: 1px dashed rgba(10, 132, 255, 0.3);
    border-radius: 12px;
    padding: 14px;
    font-size: 0.875rem;
    color: #cbd5e1;
    line-height: 1.5;
}

.threed-callout-title {
    font-weight: 600;
    color: #38bdf8;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.threed-layer-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.threed-layer-item {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.threed-layer-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.threed-layer-item.active {
    border-color: #0A84FF;
    background: rgba(10, 132, 255, 0.18);
}

.threed-layer-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #f4f4f5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.threed-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(14, 14, 17, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    .threed-recent-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .threed-inward-actions {
        width: 110px;
        padding: 20px 8px;
    }
    .threed-recent-container {
        padding: 20px 14px;
    }
    .threed-recent-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}



/* ==========================================================================
   File: Tool/3d/app.css
   KHALA STUDIO — LAUNCHER & HOME DESIGN DASHBOARD STYLING
   ========================================================================== */

.threed-app-root {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999999 !important;
    background: #141416 !important;
    opacity: 1 !important;
    color: #f1f3f4;
    font-family: 'Google Sans', 'Roboto', sans-serif;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}