/* ==========================================================================
   Studio Loïc AI / LoïcAI.Com - Modern High-Tech Glassmorphism Dark UI
   100% Height Viewport - Zero Awkward Voids - Ultra-Responsive
   ========================================================================== */

:root {
  --bg-primary: #060911;
  --bg-secondary: #0b1120;
  --bg-card: rgba(15, 23, 42, 0.8);
  --bg-card-hover: rgba(30, 41, 59, 0.9);
  --border-color: rgba(0, 240, 255, 0.18);
  --border-glow: rgba(0, 240, 255, 0.45);
  --accent-cyan: #00f0ff;
  --accent-blue: #3b82f6;
  --accent-purple: #a855f7;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --header-height: 60px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--bg-primary);
  color: var(--text-primary);
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: rgba(11, 17, 32, 0.6);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* Text Colors */
.text-cyan { color: var(--accent-cyan); }
.text-amber { color: var(--accent-amber); }
.text-emerald { color: var(--accent-emerald); }
.hidden { display: none !important; }

/* ==========================================================================
   TOP HEADER BAR
   ========================================================================== */
header {
  height: var(--header-height);
  min-height: var(--header-height);
  background: rgba(8, 13, 24, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-badge {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  color: #000;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.4);
}

.logo-text h1 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, #fff, var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.logo-text p {
  font-size: 11px;
  color: var(--text-muted);
}

/* NAVIGATION TABS */
.nav-tabs {
  display: flex;
  gap: 6px;
  background: rgba(15, 23, 42, 0.7);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tab-btn {
  padding: 7px 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(59, 130, 246, 0.22));
  color: var(--accent-cyan);
  border: 1px solid var(--border-glow);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

.tab-count-badge {
  background: rgba(0, 240, 255, 0.2);
  color: var(--accent-cyan);
  font-size: 10.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  border: 1px solid rgba(0, 240, 255, 0.4);
}

/* HEADER STATUS & DOMAIN BADGES */
.header-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.domain-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.35);
  color: var(--accent-cyan);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.domain-pill:hover {
  background: rgba(0, 240, 255, 0.18);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(16, 185, 129, 0.1);
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.dot-pulse {
  width: 8px;
  height: 8px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
}

/* ==========================================================================
   MAIN VIEWPORT & TAB CONTAINERS (100% HEIGHT)
   ========================================================================== */
main {
  height: calc(100vh - var(--header-height));
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.tab-content {
  width: 100%;
  height: 100%;
  flex: 1 1 0;
  min-height: 0;
  display: none;
  overflow: hidden;
}

.tab-content.active {
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   STUDIO LAYOUT & DUAL-PANE WORKSPACE
   ========================================================================== */
.studio-layout {
  width: 100%;
  height: 100%;
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

/* LEFT PANE: CHAT */
.chat-panel {
  flex: 1 1 0;
  min-width: 320px;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  transition: flex 0.25s ease;
}

/* CHAT CONTROLS TOPBAR */
.chat-controls {
  height: 48px;
  min-height: 48px;
  padding: 0 16px;
  background: rgba(10, 15, 28, 0.9);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chat-controls-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.model-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

select.model-dropdown {
  background: #151d30;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

select.model-dropdown:focus {
  border-color: var(--accent-cyan);
}

.perplexity-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s;
}

.perplexity-toggle-wrap:hover {
  background: rgba(255, 255, 255, 0.08);
}

.perplexity-toggle-wrap.active {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* WORKSPACE LAYOUT TOGGLES */
.layout-toggle-group {
  display: flex;
  background: #101626;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid #1e293b;
  gap: 2px;
}

.layout-btn {
  padding: 4px 10px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.layout-btn:hover {
  color: var(--text-primary);
}

.layout-btn.active {
  background: var(--accent-cyan);
  color: #050811;
  font-weight: 700;
}

/* LAYOUT MODE MODIFIERS */
.studio-layout.chat-only .chat-panel {
  flex: 1 1 100%;
  border-right: none;
}
.studio-layout.chat-only .preview-panel {
  display: none !important;
}

.studio-layout.sandbox-only .chat-panel {
  display: none !important;
}
.studio-layout.sandbox-only .preview-panel {
  flex: 1 1 100%;
  border-left: none;
}

/* CHAT MESSAGES STREAM (Scrollable) */
.chat-messages {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.msg-row {
  display: flex;
  gap: 12px;
  max-width: 90%;
}

.msg-row.ai {
  align-self: flex-start;
}

.msg-row.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #000;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.msg-row.user .msg-avatar {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-rose));
  color: white;
}

.msg-bubble {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.6;
  color: #e2e8f0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.msg-row.user .msg-bubble {
  background: #1e293b;
  border-color: rgba(168, 85, 247, 0.3);
  color: #fff;
}

.msg-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--accent-cyan);
  margin-bottom: 6px;
}

.msg-features-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
}

/* QUICK ACTIONS BAR */
.quick-actions {
  padding: 8px 18px;
  background: rgba(10, 14, 24, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
}

.action-pill {
  padding: 5px 11px;
  background: #131b2e;
  border: 1px solid #1e293b;
  border-radius: 16px;
  color: #cbd5e1;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.action-pill:hover {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* CHAT INPUT BAR (Firmly pinned at bottom) */
.chat-input-bar {
  padding: 12px 18px;
  background: rgba(8, 12, 22, 0.95);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.input-wrap {
  flex: 1;
}

.chat-input {
  width: 100%;
  background: #101626;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  font-size: 14px;
  outline: none;
  resize: none;
  height: 44px;
  line-height: 22px;
  transition: border-color 0.2s;
}

.chat-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

.send-btn {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  border: none;
  border-radius: 10px;
  color: #030712;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, box-shadow 0.2s;
}

.send-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.5);
}

/* ==========================================================================
   RIGHT PANE: LIVE SANDBOX & 3D GAME PREVIEW
   ========================================================================== */
.preview-panel {
  flex: 1 1 0;
  min-width: 320px;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #000;
  border-left: 1px solid var(--border-color);
  transition: flex 0.25s ease;
}

.preview-header {
  height: 48px;
  min-height: 48px;
  background: #090e1a;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.preview-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-cyan);
}

.preview-game-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #f1f5f9;
}

.preview-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hotkey-btn {
  padding: 5px 10px;
  background: #141c2e;
  border: 1px solid #1e293b;
  border-radius: 6px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.hotkey-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.btn-close-preview {
  padding: 5px 8px;
  color: #ef4444;
}
.btn-close-preview:hover {
  border-color: #ef4444;
  color: #f87171;
}

.preview-content-wrap {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  display: flex;
  position: relative;
  overflow: hidden;
  background: #03050a;
}

.preview-iframe {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
  display: block;
}

/* SANDBOX SPLASH SCREEN */
.sandbox-splash {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #0c1527 0%, #03060d 100%);
  padding: 24px;
  z-index: 10;
}

.splash-card {
  max-width: 480px;
  text-align: center;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.15);
}

.splash-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 240, 255, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 12px;
}

.splash-card h2 {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}

.splash-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 22px;
}

.splash-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-splash-play {
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  border: none;
  border-radius: 10px;
  color: #030712;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
  transition: transform 0.15s;
}

.btn-splash-play:hover {
  transform: scale(1.02);
}

.btn-splash-secondary {
  padding: 9px 14px;
  background: #141d30;
  border: 1px solid #1e293b;
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-splash-secondary:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* ==========================================================================
   TAB 2: PROJETS TERMINÉS & TÉLÉCHARGEMENTS
   ========================================================================== */
.projects-section-container {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 32px;
  gap: 20px;
  overflow-y: auto;
  max-width: 1500px;
  margin: 0 auto;
  width: 100%;
}

.projects-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 18px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 13.5px;
  margin-top: 4px;
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  background: #141c2e;
  border: 1px solid #1e293b;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--accent-cyan);
  color: #030712;
  border-color: var(--accent-cyan);
  font-weight: 700;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.proj-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.proj-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cyan);
  box-shadow: 0 8px 25px rgba(0, 240, 255, 0.18);
}

.proj-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.proj-icon-box {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: white;
  flex-shrink: 0;
  background: linear-gradient(135deg, #0ea5e9, #3b82f6);
}

.proj-header-info {
  flex: 1;
}

.proj-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0, 240, 255, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
  margin-bottom: 5px;
}

.proj-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.proj-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 6px 0 0 0;
}

.proj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.proj-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #0b101c;
  color: #94a3b8;
  border: 1px solid #1e293b;
}

.proj-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.proj-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
}

.proj-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-download:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.4);
}

.btn-play-online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: white;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-play-online:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 14px rgba(14, 165, 233, 0.4);
}

/* ==========================================================================
   TAB 3: JEUX 3D WEB DÉDIÉS
   ========================================================================== */
.games-gallery-container {
  flex: 1 1 0;
  min-height: 0;
  padding: 28px 32px;
  overflow-y: auto;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.games-featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 22px;
}

.game-featured-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s;
}

.game-featured-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cyan);
}

.game-card-banner {
  height: 140px;
  display: flex;
  align-items: flex-start;
  padding: 14px;
  position: relative;
}

.sao-banner {
  background: linear-gradient(135deg, #0f172a, #0369a1);
}
.cyberpunk-banner {
  background: linear-gradient(135deg, #3b0764, #9333ea);
}
.snake-banner {
  background: linear-gradient(135deg, #064e3b, #059669);
}

.game-tag {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.game-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  justify-content: space-between;
}

.game-card-body h3 {
  font-size: 18px;
  color: #fff;
}

.game-card-body p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.game-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

/* ==========================================================================
   TAB 4: REMOTE PC STREAM
   ========================================================================== */
.remote-desktop-container {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 16px;
  gap: 12px;
}

.screen-stream-box {
  flex: 1 1 0;
  min-height: 0;
  background: #000;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screen-stream-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: crosshair;
}

.remote-controls-bar {
  height: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.controls-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.controls-info {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   TAB 5: MODEL FORGE
   ========================================================================== */
.model-forge-container {
  flex: 1 1 0;
  min-height: 0;
  padding: 28px 32px;
  overflow-y: auto;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.models-status-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.status-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
}

.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.model-badge-card {
  background: #0e1526;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.model-tag-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
}

.model-tag-badge.flagship { background: rgba(0, 240, 255, 0.2); color: var(--accent-cyan); }
.model-tag-badge.math { background: rgba(168, 85, 247, 0.2); color: var(--accent-purple); }
.model-tag-badge.logic { background: rgba(59, 130, 246, 0.2); color: var(--accent-blue); }
.model-tag-badge.engine { background: rgba(245, 158, 11, 0.2); color: var(--accent-amber); }
.model-tag-badge.vision { background: rgba(244, 63, 94, 0.2); color: var(--accent-rose); }
.model-tag-badge.search { background: rgba(16, 185, 129, 0.2); color: var(--accent-emerald); }

.model-badge-card h4 {
  font-size: 15px;
  color: #fff;
  font-family: monospace;
}

.model-badge-card p {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.model-vram {
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid #1a233a;
  padding-top: 6px;
  margin-top: 4px;
}
