:root {
    --bg-color: #0f0f11;
    --card-bg: #18181b;
    --accent-color: #f97316;
    --text-color: #ffffff;
    --text-muted: #a1a1aa;
    --border-color: #27272a;
    --danger-color: #ef4444;
}

/* Starlight Layout Fixes */
:root { --sl-content-width: 100% !important; }
.main-frame { max-width: 100% !important; width: 100% !important; padding: 0 !important; }
.content-panel { padding: 0 !important; max-width: 100% !important; }
.sl-container { max-width: 100% !important; margin: 0 !important; }

/* Tablet Wrapper */
#tablet-wrapper {
    background-color: #09090b;
    min-height: calc(100vh - 4rem);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

/* EXACT DESIGN FROM USER TEMPLATE */
#editor-overlay {
    position: relative;
    width: 90vw;
    max-width: 1400px;
    height: 90vh !important;
    max-height: 900px !important;
    background-color: rgba(15, 15, 17, 0.95);
    display: flex;
    flex-direction: column;
    padding: 30px;
    box-sizing: border-box;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 0 10px #27272a;
    border: 1px solid #3f3f46;
    overflow: hidden; /* Strict frame */
}

/* Header */
.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    flex-shrink: 0;
}

.logo { font-size: 24px; font-weight: bold; color: white; display: flex; align-items: center; }
.logo .highlight { color: var(--accent-color); }

.nav-tabs { display: flex; gap: 30px; }
.tab-btn {
    cursor: pointer; padding: 10px 0; color: var(--text-muted);
    font-weight: 500; position: relative; transition: color 0.2s;
}
.tab-btn:hover, .tab-btn.active { color: var(--text-color); }
.tab-btn.active::after {
    content: ''; position: absolute; bottom: -21px; left: 0;
    width: 100%; height: 3px; background-color: var(--accent-color);
}

/* Content Area - FIXED HEIGHT FOR ALL TABS */
.tab-content {
    display: none;
    flex: 1; /* Fills remaining space in #editor-overlay */
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
}
.tab-content.active { display: flex; }

/* Components */
.bubble-toggle-bed {
    position: relative; display: flex; background-color: #27272a;
    border-radius: 20px; padding: 4px; cursor: pointer;
    width: 320px; height: 32px; box-sizing: border-box; border: 1px solid #3f3f46;
    margin-bottom: 15px; flex-shrink: 0; align-self: center;
}
.bubble-toggle-bed-bg {
    position: absolute; top: 4px; left: 4px; width: calc(50% - 4px); height: calc(100% - 8px);
    background-color: var(--accent-color); border-radius: 16px;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1); z-index: 1;
}
.bubble-toggle-bed.right .bubble-toggle-bed-bg { transform: translateX(100%); }
.bubble-toggle-option {
    flex: 1; text-align: center; z-index: 2; color: #aaa;
    font-size: 12px; font-weight: 600; line-height: 24px; transition: color 0.3s;
}
.bubble-toggle-option.active { color: white; }

.section-title { font-size: 20px; font-weight: bold; margin-bottom: 20px; color: white; }
.input-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.input-group label { font-size: 12px; color: var(--text-muted); }
select, input[type="text"] {
    background: #27272a; border: 1px solid #3f3f46; color: white; padding: 10px; border-radius: 6px; outline: none;
}

.preview-area {
    background-color: #1a1a1a; border: 1px solid #3f3f46; border-radius: 8px;
    min-height: 120px; display: flex; justify-content: center; align-items: center;
    margin-bottom: 15px; color: #555; flex-shrink: 0;
}

.preview-actions { display: flex; gap: 10px; margin-bottom: 20px; flex-shrink: 0; }
.btn-action {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 16px; background: var(--card-bg); color: var(--text-color);
    border: 1px solid var(--border-color); border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer;
}

.veh-search-bar {
    display: flex; align-items: center; background: #18181b; border: 1px solid #3f3f46;
    border-radius: 6px; padding: 10px; margin-bottom: 15px; gap: 10px; color: #71717a; flex-shrink: 0;
}
.veh-search-bar input { background: transparent; border: none; outline: none; color: white; flex: 1; }

.sexy-input-group {
    background: #111; padding: 10px 15px; border-radius: 8px; border: 1px solid #222;
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: white;
}

.switch { position: relative; display: inline-block; width: 36px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #333; transition: .3s; border-radius: 20px; }
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: white; transition: .3s; border-radius: 50%; }
input:checked + .slider { background-color: var(--accent-color); }
input:checked + .slider:before { transform: translateX(16px); }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0f0f11; border-radius: 4px; }
::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #52525b; }
