/* ========================================================
   🎨 GLOBAL THEME VARIABLES PLATFORM
   ======================================================== */
:root {
    /* Boosted master text color variable token for high legibility on mobile glass */
    --text-dim: #cbd5e1;
}

/* CORE WORKSPACE FRAMING */
body {
    background-color: #0b0d10;
    color: #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0; /* Maximize mobile screen space */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden; /* Forcefully kills the global scrollbar overflow condition */
    user-select: none;
}

.moui-master-wrapper {
    width: 100%;
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* DIRECT NAVIGATION POINTER BAR */
.console-pointer-bar {
    display: none;
    width: 100%;
    max-width: 360px;
    grid-template-columns: 1fr 1fr;
    background: #111317;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 25px;
    box-sizing: border-box;
}

.pointer-btn {
    background: transparent;
    color: #475569;
    border: none;
    padding: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.pointer-btn.active {
    background: rgba(30, 41, 59, 0.8);
    color: #3b82f6;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* DESKTOP SPLIT COLUMN GRID SYSTEM */
.split-workspace-grid {
    display: flex;
    width: 100%;
    gap: 40px;
    justify-content: center;
    align-items: flex-start;
}

/* PANEL 1: THE DESIGN COMPILER SIDEBOARD */
.left-design-sideboard {
    flex: 1;
    max-width: 440px;
    background: rgba(17, 20, 26, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    box-sizing: border-box;
}

.section-header {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-dim);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
    margin-bottom: 5px;
}

.form-input-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.form-input-container label {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.moui-text-field {
    background: #12151c;
    color: #e2e8f0;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease;
}
.moui-text-field:focus { border-color: #3b82f6; }

.compiler-btn {
    background: #1e293b;
    color: #e2e8f0;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 14px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}
.compiler-btn:hover { background: #3b82f6; border-color: #60a5fa; }

/* PANEL 2: VIRTUAL MOBILE CANVAS DEVICE SCREEN */
.right-phone-canvas {
    width: 100%;
    max-width: 360px;
    height: 100%;
    max-height: 100vh; /* Rigid screen boundary containment */
    background: #000000;
    border: 4px solid #1e222a;
    border-radius: 44px;
    padding: 24px 18px; /* Tight padding prevents bottom slider layout roll-off */
    box-shadow: 0 25px 60px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    overflow: hidden;
}

.bubble-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px; /* Tightened element distribution array padding */
    justify-content: center;
    padding: 5px 0 15px 0;
}

/* CIRCULAR MACRO ASSET BUBBLE */
.moui-bubble-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(30, 34, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    font-size: 26px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

/* FLOATING MOUSEOVER LABELS (PC Monitor Mode) */
.moui-bubble-card .tooltip-label {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: #0f1115;
    color: var(--text-dim);
    padding: 4px 10px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.15s ease-out;
    z-index: 999 !important;
}

@media (hover: hover) and (pointer: fine) {
    .moui-bubble-card:hover {
        transform: scale(1.12);
        background: rgba(43, 49, 61, 0.95);
        border-color: #3b82f6;
        z-index: 100 !important;
    }
    .moui-bubble-card:hover .tooltip-label {
        opacity: 1;
        color: #e2e8f0;
        transform: translateX(-50%) translateY(0);
    }
}

/* AUDIO VOLUME CONTROLLER DECK */
.volume-panel {
    background: rgba(22, 26, 33, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.volume-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-dim);
}

.volume-range-input {
    width: 100%;
    accent-color: #3b82f6;
    cursor: pointer;
}

/* MOBILE VIEWPORT RESPONSIVE RE-ALIGNMENT CONFIGURATION */
@media (max-width: 768px) {
    body { padding: 15px; }
    .moui-master-wrapper { max-width: 360px; }
    .console-pointer-bar { display: grid; }
    .split-workspace-grid { flex-direction: column; gap: 0; }
    .left-design-sideboard { display: none; max-width: 360px; margin-bottom: 25px; }
    .left-design-sideboard.force-visible { display: flex; }
    .right-phone-canvas { border: none; box-shadow: none; padding: 10px 0; }
}

/* 📡 HANDSHAKE LED INFRASTRUCTURE */
.system-status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(17, 19, 23, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
}

.status-labels-box { display: flex; flex-direction: column; gap: 2px; }
.status-title-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-dim); }

.handshake-led-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #f59e0b; /* Amber alert state on initial launch */
    box-shadow: 0 0 8px #f59e0b;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes ambientPulseGreen {
    0% { box-shadow: 0 0 3px #10b981; opacity: 0.7; }
    50% { box-shadow: 0 0 14px #10b981; opacity: 1; }
    100% { box-shadow: 0 0 3px #10b981; opacity: 0.7; }
}

.led-verified { background-color: #10b981 !important; animation: ambientPulseGreen 2s infinite ease-in-out; }
.led-offline { background-color: #ef4444 !important; box-shadow: 0 0 10px #ef4444 !important; animation: none; }

/* 📱 TOUCH-DRAG ERGONOMIC MECHANICS */
.moui-bubble-card.is-dragging {
    opacity: 0.6;
    transform: scale(1.15);
    border-color: #3b82f6 !important;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6);
    z-index: 9999 !important;
}

.bubble-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s cubic-bezier(0.2, 1, 0.2, 1);
}
