/* ═══════════════════════════════════════════════════════
   LUMINA OS — Shared Stylesheet
   Architectural Minimalism + Spatial Layering
   Soft Corner Edition v2
═══════════════════════════════════════════════════════ */

/* ── Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body { background-color: #000000; color: #ffffff; margin: 0; }
::selection { background: #bdf4ff; color: #00363d; }
input:focus, textarea:focus { outline: none; box-shadow: none; }

/* ── Scrollbar ────────────────────────────────────── */
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-thumb { background: #1A1A1A; border-radius: 9999px; }

/* ── Hairlines ────────────────────────────────────── */
.hs               { height: 1px; background: #1A1A1A; width: 100%; }
.hv               { width: 1px; background: #1A1A1A; }
.hairline-separator { height: 1px; background-color: #1A1A1A; width: 100%; }
.hairline-vertical  { background-color: #1A1A1A; width: 1px; height: 100%; }

/* ── Cursor / heartbeat ───────────────────────────── */
.htick,
.heartbeat-tick {
  width: 1px; height: 1em; background-color: #00e3fd;
  display: inline-block; vertical-align: middle; margin-left: 4px;
  animation: blink 1s step-end infinite;
}

/* ── Keyframes ────────────────────────────────────── */
@keyframes blink        { 50% { opacity: 0; } }
@keyframes hb           { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes pulse-scale  { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.02); } }
@keyframes pulse-load   { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }
@keyframes fadeInSlow   { 0% { opacity: 0; transform: translateY(8px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes progressGrow { 0% { width: 0%; } 100% { width: 100%; } }
@keyframes subtlePulse  { 0% { opacity: .8; } 50% { opacity: 1; } 100% { opacity: .8; } }

.hb          { animation: hb 2s infinite ease-in-out; }
.pulse-title { animation: pulse-scale 4s infinite ease-in-out; }
.pulse-load  { animation: pulse-load 1.5s infinite ease-in-out; }

/* ── Toggle Switch — Pill Shape ───────────────────── */
.toggle-switch {
  position: relative; width: 32px; height: 16px;
  cursor: pointer; display: block; flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.ts {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: #1A1A1A; transition: .3s;
  border-radius: 9999px;
}
.ts::before {
  content: ""; position: absolute;
  width: 12px; height: 12px; left: 2px; bottom: 2px;
  background: #444748; transition: .3s;
  border-radius: 9999px;
}
input:checked + .ts             { background: #00e3fd; }
input:checked + .ts::before     { transform: translateX(16px); background: #000; }

/* ── Range Slider ─────────────────────────────────── */
input[type=range] {
  -webkit-appearance: none; appearance: none;
  height: 1px; background: #1A1A1A; outline: none; width: 100%;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 2px; height: 14px; background: #00e3fd;
  cursor: pointer; border-radius: 2px;
}
input[type=range]::-moz-range-thumb {
  width: 2px; height: 14px; background: #00e3fd;
  border: none; cursor: pointer; border-radius: 2px;
}

/* ── Scene / Mode / Trigger Chips ────────────────── */
.scene-chip {
  border: 1px solid #1A1A1A;
  padding: 8px 16px;
  font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
  font-family: Inter, sans-serif; font-weight: 600; color: #444748;
  cursor: pointer; transition: all .4s ease;
  border-radius: 8px; background: transparent;
}
.scene-chip:hover         { color: #fff; }
.scene-chip.active        { color: #00daf3; border-bottom-color: #00e3fd; }

.mode-chip {
  border: 1px solid #1A1A1A;
  padding: 10px 20px;
  font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
  font-family: Inter, sans-serif; font-weight: 600; color: #444748;
  cursor: pointer; transition: all .4s;
  border-radius: 8px; background: transparent;
}
.mode-chip:hover          { color: #c4c7c8; }
.mode-chip.active         { color: #00daf3; border-bottom-color: #00e3fd; }

.trigger-chip {
  border: 1px solid #1A1A1A;
  padding: 6px 14px;
  font-size: 10px; letter-spacing: .15em; text-transform: uppercase;
  font-family: Inter, sans-serif; font-weight: 600; color: #444748;
  cursor: pointer; transition: all .3s;
  border-radius: 8px; background: transparent;
}
.trigger-chip.active      { color: #00daf3; border-color: #00e3fd; }
.trigger-chip:hover       { color: #c4c7c8; }

/* ── Period Buttons (energy page) ────────────────── */
.period-btn {
  border: 1px solid #1A1A1A;
  padding: 8px 16px;
  font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
  font-family: Inter, sans-serif; font-weight: 600; color: #444748;
  cursor: pointer; transition: all .3s;
  border-radius: 8px; background: transparent;
}
.period-btn:hover { color: #c4c7c8; }

/* ── Room Card ────────────────────────────────────── */
.room-card {
  transition: all .3s ease; cursor: pointer;
  border-radius: 14px; overflow: hidden;
}
.room-card:hover { background: #080808; }
.room-card.on    { border-left: 2px solid #00e3fd; background: #0e0e0e; }

/* ── Camera Tile ──────────────────────────────────── */
.cam-tile {
  background: #050505; border: 1px solid #1A1A1A;
  aspect-ratio: 16/9; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; transition: border-color .3s; position: relative;
  border-radius: 14px; overflow: hidden;
}
.cam-tile:hover { border-color: #00e3fd; }
.cam-live-badge {
  position: absolute; top: 8px; left: 8px;
  font-size: 9px; letter-spacing: .15em;
  font-family: Inter, sans-serif; font-weight: 600;
  color: #00e3fd; background: #000;
  padding: 2px 6px; border-radius: 4px;
}

/* ── Lock Row ─────────────────────────────────────── */
.lock-row {
  border-bottom: 1px solid #1A1A1A; padding: 16px 8px;
  display: flex; align-items: center; gap: 16px;
  cursor: pointer; transition: all .2s; border-radius: 10px;
}
.lock-row:hover { background: #050505; }

/* ── Setting Row ──────────────────────────────────── */
.setting-row {
  border-bottom: 1px solid #1A1A1A; padding: 18px 16px;
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; transition: background .2s;
}
.setting-row:hover        { background: #050505; }
.setting-row:last-child   { border-bottom: none; }

.section-label {
  font-size: 11px; letter-spacing: .15em;
  font-family: Inter, sans-serif; font-weight: 600;
  color: #444748; text-transform: uppercase;
  display: block; margin-top: 32px; padding-bottom: 8px;
}

/* ── Adjust Button (climate) ──────────────────────── */
.adj-btn {
  width: 48px; height: 48px; border: 1px solid #1A1A1A;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .3s;
  border-radius: 10px; background: transparent; color: #fff;
}
.adj-btn:hover { border-color: #00e3fd; color: #00e3fd; }

/* ── Danger Button (settings) ─────────────────────── */
.danger-btn {
  border: 1px solid #1A1A1A; padding: 14px 20px;
  font-size: 11px; letter-spacing: .15em;
  font-family: Inter, sans-serif; font-weight: 600;
  text-transform: uppercase; color: #666;
  cursor: pointer; transition: all .3s; background: transparent;
  width: 100%; text-align: left; border-radius: 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.danger-btn:hover { border-color: #ff4444; color: #ff4444; }

/* ── Routine Row ──────────────────────────────────── */
.routine-row {
  border-bottom: 1px solid #1A1A1A; padding: 20px 8px;
  cursor: pointer; transition: all .3s; border-radius: 10px;
}
.routine-row:hover { background: #050505; }

/* ── Persona Zone (selection screen) ─────────────── */
.persona-zone {
  transition: all .7s cubic-bezier(.2,0,0,1);
  position: relative; cursor: pointer;
}
.persona-name {
  color: #999999; transition: color .5s ease;
}
.persona-zone:hover .persona-name,
.persona-zone.active .persona-name  { color: #ffffff; }

.heartbeat-tick-persona {
  width: 1px; height: 0px; background-color: #00e3fd;
  transition: height .3s ease;
  position: absolute; bottom: -1px; left: 50%;
  transform: translateX(-50%);
}
.persona-zone:hover .heartbeat-tick-persona,
.persona-zone.active .heartbeat-tick-persona { height: 12px; }
.persona-zone.active .persona-name { animation: subtlePulse 4s infinite ease-in-out; }

.persona-image-container {}

@media (max-width: 768px) {
  .persona-mobile-stack  { flex-direction: column !important; }
  .persona-mobile-full   { width: 100% !important; height: 45vh !important; }
  .persona-divider-mobile{ display: none !important; }
  .persona-divider-h     { display: flex !important; }
}
.persona-divider-h { display: none; }

/* ── Boot Screen Animations ───────────────────────── */
.orb-container { opacity: 0; animation: fadeInSlow 2s ease-out 0s forwards; }
.boot-wordmark { opacity: 0; animation: fadeInSlow 2.5s ease-out .5s forwards; }
.boot-sub      { opacity: 0; animation: fadeInSlow 2s ease-out 1.5s forwards; }
.boot-trace    { opacity: 0; animation: fadeInSlow 1.5s ease-out 2.2s forwards; }
.boot-progress { opacity: 0; animation: fadeInSlow 1s ease-out 2.8s forwards; }
.progress-bar  { animation: progressGrow 3s ease-in-out 1s forwards; width: 0%; }

/* ── Conversation Message Bubbles ─────────────────── */
.msg-user { text-align: right; }
.msg-ai   { text-align: left; }
.msg-user .bubble {
  display: inline-block; border-bottom: 1px solid #1A1A1A;
  padding: 12px 0; max-width: 80%; text-align: right;
}
.msg-ai .bubble {
  display: inline-block; border-left: 1px solid #1A1A1A;
  padding-left: 16px; max-width: 85%;
}
.msg-area::-webkit-scrollbar       { width: 3px; }
.msg-area::-webkit-scrollbar-thumb { background: #1A1A1A; }

/* ── Architectural hairlines (conversation) ───────── */
.arch-line-l {
  position: fixed; left: 25%; top: 0; bottom: 0;
  width: 1px; background: #1A1A1A; opacity: .12;
  pointer-events: none; z-index: 0;
}
.arch-line-r {
  position: fixed; right: 25%; top: 0; bottom: 0;
  width: 1px; background: #1A1A1A; opacity: .12;
  pointer-events: none; z-index: 0;
}

/* ── Stat / Metric Card Grid ──────────────────────── */
/* Outer wrapper gets rounded, cells inherit via overflow:hidden */
.stat-grid {
  border-radius: 14px; overflow: hidden;
}

/* ── AI Panel ─────────────────────────────────────── */
.ai-panel {
  background: #0e0e0e; border: 1px solid #1A1A1A;
  border-radius: 14px; padding: 20px;
}

/* ── Minimal hamburger overlay ─────────────────────── */
.lumina-menu-btn {
  background: none; border: none; cursor: pointer; padding: 4px;
  color: #444748; display: flex; align-items: center; justify-content: center;
  min-width: 40px; min-height: 40px; transition: color .2s;
}
.lumina-menu-btn:hover { color: #00e3fd; }
.lumina-menu-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0,0,0,.55);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.lumina-menu-overlay.open { opacity: 1; pointer-events: auto; }
.lumina-menu-panel {
  position: absolute; top: 0; right: 0; height: 100%;
  width: min(280px, 86vw);
  background: #050505; border-left: 1px solid #1A1A1A;
  padding: 28px 20px 24px;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.25,.46,.45,.94);
  display: flex; flex-direction: column; gap: 4px;
}
.lumina-menu-overlay.open .lumina-menu-panel { transform: translateX(0); }
.lumina-menu-panel a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 8px; min-height: 44px;
  color: #c4c7c8; text-decoration: none;
  font-family: Inter, sans-serif; font-size: 14px;
  border-bottom: 1px solid #1A1A1A;
  transition: color .2s;
}
.lumina-menu-panel a:hover { color: #00e3fd; }
.lumina-menu-panel a .material-symbols-outlined { font-size: 20px; color: #444748; }
.lumina-menu-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px; letter-spacing: .25em; text-transform: uppercase;
  color: #444748; margin-bottom: 12px; opacity: .5;
}

/* ── Info Panel (generic bordered container) ──────── */
.info-panel {
  border: 1px solid #1A1A1A; border-radius: 14px;
  overflow: hidden;
}

/* ── Soft Card (generic card without hairline border) */
.soft-card {
  border: 1px solid #1A1A1A; border-radius: 14px;
  padding: 20px; background: #050505;
}