body, html {
    margin: 0; padding: 0; width: 100%; height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    background-color: #1e1e1e;
}

#forgeViewer {
    width: 100%; height: 100%; position: absolute;
    top: 0; left: 0; z-index: 1;
}

/* Glassmorphism Sidebar */
#sidebar {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 320px;
    height: calc(100vh - 40px);
    z-index: 10;
    
    background: rgba(17, 25, 40, 0.75);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.125);
    border-radius: 16px;
    
    color: white;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#sidebar.collapsed {
    transform: translateX(calc(-100% - 40px));
}

#toggleSidebar {
    position: absolute;
    bottom: 30px;
    left: 350px;
    width: 44px;
    height: 44px;
    background: rgba(43, 48, 59, 0.95);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: left 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.2s;
}

#sidebar.collapsed ~ #toggleSidebar {
    left: 20px;
}

#toggleSidebar:hover {
    background: rgba(30, 144, 255, 0.9);
}

.header {
    padding: 24px 20px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.header h2 { margin: 0; font-size: 24px; font-weight: 600; color: #38bdf8; }
.header p { margin: 5px 0 0; font-size: 14px; opacity: 0.7; }

.upload-section {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.btn-primary {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}
.btn-primary:active {
    transform: translateY(0);
}

.status-msg {
    margin-top: 10px;
    font-size: 12px;
    color: #ffd05b;
    text-align: center;
    min-height: 15px;
}

.list-section {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
}
.list-section h3 {
    font-size: 14px;
    margin-top: 0;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
}

#modelList {
    list-style: none;
    padding: 0;
    margin: 0;
}

#modelList li {
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 13px;
    border: 1px solid transparent;
    transition: all 0.2s;
    word-break: break-all;
}

#modelList li:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.4); }

.loading-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

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