/* static/style.css – Jarvis Gold/Black UI */

/* ---- Theme tokens ---- */
:root {
  --bg: #050507;
  --bg-panel: #0b0b12;
  --bg-panel-alt: #12131d;
  --gold: #f5c85b;
  --gold-soft: #fbe4a6;
  --gold-neon: #ffcc4d;
  --border-gold: #705629;
  --text-main: #f8f5e9;
  --text-muted: #a38f62;
  --accent: #ffb63b;
  --cyan: #00f6ff;
}

/* ---- Global ---- */
body {
  margin: 0;
  background:
    radial-gradient(circle at top, #2b2110 0, #050507 55%) fixed;
  color: var(--text-main);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* ---- Main grid ---- */
#jarvis-app {
  display: grid;
  grid-template-columns: 2.2fr 5fr 3.2fr;
  grid-gap: 18px;
  padding: 16px 18px;
  height: 80vh;
  box-sizing: border-box;
}

/* ---- Panels ---- */
.jarvis-panel {
  background:
    radial-gradient(circle at top left, #18141a 0, var(--bg-panel) 58%);
  border-radius: 14px;
  border: 1px solid rgba(255, 204, 77, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.9),
    0 16px 34px rgba(0, 0, 0, 0.85),
    0 0 26px rgba(255, 204, 77, 0.08);
}

/* Panel headers */
.jarvis-panel-header {
  background:
    linear-gradient(
      90deg,
      rgba(255, 204, 77, 0.25),
      rgba(0, 0, 0, 0.6)
    );
  color: var(--gold-neon);
  font-weight: 600;
  font-size: 11px;
  padding: 9px 12px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  border-bottom: 1px solid rgba(255, 204, 77, 0.35);
}

/* Left system activity */
.jarvis-panel-body {
  padding: 10px;
  overflow-y: auto;
  flex: 1;
  font-family: Consolas, Monaco, monospace;
  font-size: 11px;
  color: var(--text-muted);
}

/* ---- Chat column ---- */
.jarvis-middle {
  position: relative;
}

#chat-window {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 4px;
  font-size: 13px;
}

/* Chat messages */
.chat-msg {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  max-width: 86%;
}

.chat-msg .label {
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 3px;
  color: var(--text-muted);
}

/* USER: right-aligned, bright gold bubble */
.chat-msg.user {
  align-items: flex-end;
}

.chat-msg.user > .label {
  color: var(--gold-soft);
  font-weight: 600;
}

.chat-msg.user > .text {
  background: linear-gradient(135deg, #fbe9b9, #f5c85b);
  color: #33240a;
  border-radius: 18px 4px 18px 18px;
  padding: 8px 12px;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.65);
}

/* JARVIS: left-aligned, dark/gold bubble */
.chat-msg.jarvis {
  align-items: flex-start;
}

.chat-msg.jarvis > .label {
  color: var(--gold-neon);
  font-weight: 600;
}

.chat-msg.jarvis > .text {
  background:
    radial-gradient(circle at top left, #241b10 0, #120f0a 60%);
  color: var(--text-main);
  border-radius: 4px 18px 18px 18px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 204, 77, 0.45);
  box-shadow:
    0 0 12px rgba(255, 204, 77, 0.16),
    0 5px 19px rgba(0, 0, 0, 0.85);
}

/* ---- Input row ---- */
#input-row {
  display: flex;
  padding: 10px 12px 12px;
  gap: 10px;
  border-top: 1px solid rgba(255, 204, 77, 0.28);
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.35),
    rgba(8, 8, 8, 0.95)
  );
}

#user-input {
  flex: 1;
  resize: none;
  background-color: #050507;
  color: var(--text-main);
  border-radius: 12px;
  border: 1px solid rgba(255, 204, 77, 0.5);
  padding: 8px 10px;
  font-family: inherit;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.85);
}

#user-input::placeholder {
  color: rgba(222, 201, 150, 0.5);
}

/* ---- Buttons ---- */
#jarvis-app button {
  background:
    radial-gradient(circle at top, #21170e 0, #0b0805 60%);
  color: var(--gold-soft);
  border: 1px solid rgba(255, 204, 77, 0.75);
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 10px;
  border-radius: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  transition:
    background 0.14s ease-out,
    color 0.14s ease-out,
    box-shadow 0.14s ease-out,
    transform 0.06s ease-out;
}

#jarvis-app button:hover {
  background: linear-gradient(135deg, #ffcf6e, #f5b93d);
  color: #33240a;
  box-shadow:
    0 0 14px rgba(255, 204, 77, 0.75),
    0 4px 12px rgba(0, 0, 0, 0.92);
  transform: translateY(-1px);
}

#jarvis-app button:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 0 6px rgba(255, 204, 77, 0.55);
}

#jarvis-app button.active {
  background: linear-gradient(135deg, #ffcf6e, #f5b93d);
  color: #33240a;
  border-color: #ffcf6e;
}

/* ---- Video panel ---- */
#video-preview {
  width: 100%;
  height: 100%;
  background-color: #000;
  object-fit: contain;
}

#video-controls {
  display: flex;
  gap: 8px;
  padding: 10px;
}

/* ---- JARVIS “core” / voice bubble canvas ---- */
#jarvis-sphere {
  width: 100%;
  height: 220px;
  background:
    radial-gradient(circle at top, #18120a 0, #050507 72%);
  border-bottom: 1px solid rgba(255, 204, 77, 0.45);
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.95),
    0 -1px 0 rgba(255, 204, 77, 0.06);
}

/* Optional scrollbar polish */
.jarvis-panel-body::-webkit-scrollbar,
#chat-window::-webkit-scrollbar {
  width: 6px;
}
.jarvis-panel-body::-webkit-scrollbar-track,
#chat-window::-webkit-scrollbar-track {
  background: transparent;
}
.jarvis-panel-body::-webkit-scrollbar-thumb,
#chat-window::-webkit-scrollbar-thumb {
  background: rgba(255, 204, 77, 0.35);
  border-radius: 3px;
}

/* ---- Global page shell for multi-page layout ---- */

#page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#top-bar {
  height: 40px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-bottom: 1px solid rgba(245, 200, 91, 0.25);
  background: radial-gradient(circle at top, #151018 0, #050507 70%);
}

.top-bar-title {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

#page-main {
  flex: 1;
  padding: 16px;
  padding-bottom: 80px; /* room for bottom nav */
}

/* ---- Bottom navigation ---- */

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  background: radial-gradient(circle at top, #19120b 0, #050507 60%);
  border-top: 1px solid rgba(245, 200, 91, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
}

.bottom-nav-inner {
  display: flex;
  gap: 24px;
}

.bottom-nav-item {
  color: var(--gold-soft);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.bottom-nav-item:hover {
  border-color: rgba(255, 204, 77, 0.75);
  box-shadow: 0 0 14px rgba(255, 204, 77, 0.5);
}

/* ---- Global Jarvis header input ---- */

.top-bar-left {
  display: flex;
  align-items: center;
}

.top-bar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* Override earlier #top-bar to space between title + controls */
#top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Container for the header input row */
.jarvis-header-input {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 520px;
  width: 100%;
}

/* Reuse existing #user-input styles but tweak for header */
#top-bar #user-input {
  flex: 1;
  min-height: 32px;
  max-height: 80px;
  resize: vertical;
  font-size: 12px;
  padding: 4px 8px;
}

/* Buttons in header */
#top-bar #send-btn,
#top-bar #mic-btn {
  white-space: nowrap;
  padding-inline: 10px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#top-bar #mic-btn.active {
  box-shadow: 0 0 14px rgba(255, 204, 77, 0.6);
}

/* Smaller header on phones */
@media (max-width: 768px) {
  .jarvis-header-input {
    max-width: 100%;
  }

  #top-bar #user-input {
    font-size: 11px;
  }

  #top-bar #send-btn {
    display: none; /* optional: mic-only on mobile */
  }
}

/* ---- Auth / login page ---- */

.page-login #page-main {
  padding-top: 80px;
  padding-bottom: 0;
}

.page-login .bottom-nav {
  display: none; /* Hide bottom nav on login */
}

.page-login #top-bar {
  border-bottom: 1px solid rgba(255, 204, 77, 0.25);
}

.top-bar-tagline {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted, #aca28a);
}

/* Centered login card */

.auth-page {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: radial-gradient(circle at top, #17141a 0, #050507 60%);
  border-radius: 16px;
  border: 1px solid rgba(255, 204, 77, 0.3);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.8);
  padding: 24px 24px 20px;
}

.auth-title {
  margin: 0 0 6px;
  font-size: 20px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-soft, #f5c85b);
}

.auth-subtitle {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--text-muted, #b0a78d);
}

/* Form fields */

.form-field {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted, #b0a78d);
}

.form-input {
  width: 100%;
  background: #050507;
  border-radius: 8px;
  border: 1px solid rgba(245, 200, 91, 0.3);
  padding: 7px 9px;
  font-size: 13px;
  color: var(--text-main, #f7f4e9);
}

.form-input:focus {
  outline: none;
  border-color: rgba(255, 225, 140, 0.8);
  box-shadow: 0 0 0 1px rgba(255, 225, 140, 0.3);
}

.form-error {
  margin-top: 4px;
  font-size: 11px;
  color: #ff9b9b;
}

.form-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.auth-submit {
  width: 100%;
}

.auth-messages {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  font-size: 12px;
  color: #ffb76b;
}


