/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold: #c9a84c;
  --gold-light: #f0d080;
  --dark: #0a0a12;
  --dark2: #12121e;
  --card: rgba(255,255,255,0.06);
  --glass: rgba(255,255,255,0.08);
  --text: #f0eee8;
  --text-dim: #a09888;
  --accent: #4a9eff;
  --radius: 20px;
  --transition: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

html, body {
  width: 100%; height: 100%;
  background: var(--dark);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  overflow: hidden;
  user-select: none;
}

/* ===== BACKGROUND ===== */
.bg-overlay {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(201,168,76,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(74,158,255,0.08) 0%, transparent 50%),
    linear-gradient(135deg, #0a0a12 0%, #12121e 50%, #0d0d1a 100%);
}

/* ===== TOP BAR ===== */
.top-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 32px;
  background: rgba(10,10,18,0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201,168,76,0.2);
}

.hotel-name {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-transform: uppercase;
}

.clock {
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

/* ===== LANGUAGE BAR ===== */
.lang-bar {
  position: fixed; top: 64px; right: 24px; z-index: 10;
  display: flex; gap: 8px;
  padding: 8px;
  background: var(--glass);
  backdrop-filter: blur(8px);
  border-radius: 40px;
  border: 1px solid rgba(255,255,255,0.1);
}

.lang-btn {
  width: 44px; height: 36px;
  border: none; border-radius: 30px;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn:hover { color: var(--text); background: rgba(255,255,255,0.1); }

.lang-btn.active {
  background: var(--gold);
  color: var(--dark);
}

/* ===== MAIN CONTENT ===== */
.main-content {
  position: relative; z-index: 1;
  width: 100%; height: 100vh;
  display: flex; align-items: center; justify-content: center;
}

.screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  width: 100%;
  max-width: 640px;
  padding: 24px;
  animation: fadeIn 0.6s ease;
}

.screen.hidden { display: none; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== AVATAR ===== */
.avatar-wrap {
  position: relative;
  display: flex; align-items: center; justify-content: center;
}

.idle-avatar  { width: 220px; height: 220px; }
.chat-avatar  { width: 200px; height: 200px; }

.avatar-ring {
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 3px solid rgba(201,168,76,0.3);
  animation: pulse 3s ease-in-out infinite;
  pointer-events: none;
}

.avatar-ring.speaking {
  border-color: var(--gold);
  animation: speakRing 0.5s ease-in-out infinite alternate;
}

@keyframes pulse {
  0%, 100% { transform: scale(1);    opacity: 0.5; }
  50%       { transform: scale(1.05); opacity: 1;   }
}
@keyframes speakRing {
  from { transform: scale(1);    box-shadow: 0 0 0 0   rgba(201,168,76,0.5); }
  to   { transform: scale(1.07); box-shadow: 0 0 20px 4px rgba(201,168,76,0.2); }
}

.avatar-frame {
  width: 100%; height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(201,168,76,0.5);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
  background: linear-gradient(160deg, #1a1a2e, #0d1a30);
}

.avatar-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  animation: idleFloat 4s ease-in-out infinite;
}

.avatar-img.speaking {
  animation: speakBob 0.4s ease-in-out infinite alternate;
}

@keyframes idleFloat {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-4px); }
}
@keyframes speakBob {
  from { transform: translateY(0px) scale(1); }
  to   { transform: translateY(-2px) scale(1.01); }
}

/* ===== IDLE SCREEN ===== */
#screenIdle { cursor: pointer; }
.welcome-title {
  font-size: 2.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}

.welcome-sub {
  font-size: 1.1rem;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.6;
}

.tap-hint {
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
  animation: pulse 2s ease-in-out infinite;
}

/* ===== CHAT BUBBLE ===== */
.chat-bubble {
  width: 100%;
  background: var(--card);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 24px 28px;
  min-height: 80px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.chat-bubble p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
}

/* ===== INPUT AREA ===== */
.input-area {
  display: flex;
  gap: 12px;
  width: 100%;
  align-items: center;
}

#textInput {
  flex: 1;
  height: 52px;
  background: var(--glass);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 30px;
  color: var(--text);
  font-size: 1rem;
  padding: 0 20px;
  outline: none;
  transition: var(--transition);
}

#textInput:focus {
  border-color: var(--gold);
  background: rgba(255,255,255,0.1);
}

#textInput::placeholder { color: var(--text-dim); }

.mic-btn, .send-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}

.mic-btn {
  background: var(--glass);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text);
}

.mic-btn.listening {
  background: rgba(255, 60, 60, 0.3);
  border-color: #ff3c3c;
  animation: micPulse 0.8s ease-in-out infinite alternate;
}

@keyframes micPulse {
  from { transform: scale(1); }
  to   { transform: scale(1.1); }
}

.send-btn {
  background: var(--gold);
  color: var(--dark);
}

.send-btn:hover { background: var(--gold-light); }

/* ===== RESET BUTTON ===== */
.reset-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-dim);
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.reset-btn:hover { border-color: var(--gold); color: var(--gold); }

/* ===== STATUS BAR ===== */
.status-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: center; align-items: center; gap: 10px;
  padding: 10px 32px;
  background: rgba(10,10,18,0.8);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}

.dot.connected    { background: #4caf82; box-shadow: 0 0 6px #4caf82; }
.dot.disconnected { background: #ff5252; box-shadow: 0 0 6px #ff5252; }
.dot.connecting   { background: var(--gold); animation: blink 1s infinite; }

.nova-credit {
  position: absolute;
  right: 32px;
  font-size: 0.75rem;
  color: rgba(201,168,76,0.45);
  letter-spacing: 0.05em;
}

.camera-status {
  font-size: 0.85rem;
  opacity: 0.5;
  cursor: default;
  transition: opacity 0.3s;
}
.camera-status.active  { opacity: 1; filter: drop-shadow(0 0 4px #4caf82); }
.camera-status.error   { opacity: 0.8; filter: drop-shadow(0 0 4px #ff5252); }

@keyframes blink { 50% { opacity: 0; } }
