/* LearnWorld.ai — Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: #0a0a0f; color: #e0e0e0; overflow: hidden; }
#app { display: flex; height: 100vh; }
#world-container { flex: 1; position: relative; }

/* Header */
#header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  padding: 12px 20px;
  background: linear-gradient(180deg, rgba(8,8,14,0.95) 0%, rgba(8,8,14,0.5) 60%, transparent 100%);
  display: flex; align-items: center; gap: 14px;
}
.logo-icon { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, #6C63FF, #4ecdc4); display: flex; align-items: center; justify-content: center; font-size: 22px; box-shadow: 0 2px 8px rgba(108,99,255,0.3); }
#header h1 { font-size: 24px; font-weight: 700; }
#header h1 span { background: linear-gradient(135deg, #6C63FF, #4ecdc4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.subtitle { font-size: 14px; color: #99bbdd; font-weight: 400; }
.header-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.badge { padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; background: rgba(108,99,255,0.2); color: #c4b5fd; border: 1px solid rgba(108,99,255,0.3); }
.badge.live { background: rgba(74,222,128,0.15); color: #4ade80; border-color: rgba(74,222,128,0.3); }

/* Room & camera controls */
#room-label { position: absolute; bottom: 60px; left: 16px; z-index: 10; background: rgba(8,8,14,0.85); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.12); padding: 10px 18px; border-radius: 12px; font-size: 15px; font-weight: 500; color: #ddd; }
#controls, #camera-btns { position: absolute; bottom: 14px; z-index: 10; display: flex; gap: 4px; background: rgba(8,8,14,0.9); backdrop-filter: blur(10px); border-radius: 12px; padding: 5px; border: 1px solid rgba(255,255,255,0.1); }
#controls { left: 16px; }
#camera-btns { left: 220px; }
.ctrl-btn { padding: 10px 20px; border-radius: 10px; border: none; background: transparent; color: #bbb; cursor: pointer; font-size: 15px; font-weight: 600; font-family: 'Inter', sans-serif; transition: all 0.2s; }
.ctrl-btn:hover { color: #fff; background: rgba(255,255,255,0.12); }
.ctrl-btn.active { background: rgba(108,99,255,0.4); color: #fff; }

/* Dashboard */
#dashboard { width: 350px; background: #0b0b12; border-left: 1px solid #181822; display: flex; flex-direction: column; }
.dash-header { padding: 12px 16px; border-bottom: 1px solid #181822; display: flex; align-items: center; gap: 8px; }
.dash-header h2 { font-size: 15px; font-weight: 600; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; animation: pulse 2s infinite; }
.dash-tabs { display: flex; border-bottom: 1px solid #181822; }
.dash-tab { flex: 1; padding: 10px; text-align: center; font-size: 13px; font-weight: 600; color: #666; cursor: pointer; border: none; background: none; font-family: 'Inter', sans-serif; border-bottom: 2px solid transparent; transition: all 0.2s; }
.dash-tab.active { color: #6C63FF; border-bottom-color: #6C63FF; }
.dash-tab:hover { color: #888; }
.dash-content { flex: 1; overflow-y: auto; }
.dash-section { padding: 14px 16px; border-bottom: 1px solid #131320; }
.dash-section h3 { font-size: 9px; text-transform: uppercase; letter-spacing: 1.5px; color: #444; margin-bottom: 10px; font-weight: 600; }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-card { background: #0f0f18; border-radius: 8px; padding: 10px; border: 1px solid #181822; }
.stat-card .label { font-size: 11px; color: #777; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-card .value { font-size: 24px; font-weight: 700; }
.stat-card .value.green { color: #4ade80; }
.stat-card .value.purple { color: #a5b4fc; }
.stat-card .value.yellow { color: #fbbf24; }
.stat-card .value.pink { color: #f9a8d4; }

/* Emotion bars */
.emotion-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.emotion-icon { font-size: 18px; width: 24px; }
.emotion-label { font-size: 13px; color: #888; width: 60px; }
.emotion-track { flex: 1; height: 8px; background: #1a1a28; border-radius: 4px; overflow: hidden; }
.emotion-fill { height: 100%; border-radius: 4px; transition: width 0.8s ease; }
.emotion-val { font-size: 13px; color: #ccc; width: 38px; text-align: right; font-weight: 600; }

/* Vocabulary cloud */
#vocab-cloud { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; }
#vocab-full { display: flex; flex-direction: column; gap: 4px; }
.vocab-full-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; background: rgba(15,15,22,0.6); border: 1px solid #1a1a28; }
.vocab-full-row .vocab-num { color: #444; font-size: 11px; width: 24px; font-weight: 600; }
.vocab-full-row .vocab-sig { font-size: 11px; color: #666; margin-left: auto; }
.vocab-word { padding: 4px 12px; border-radius: 16px; font-size: 13px; font-weight: 500; animation: fadeIn 0.5s ease; cursor: default; }
.vocab-word.DANGER { background: rgba(248,113,113,0.1); color: #f87171; border: 1px solid rgba(248,113,113,0.2); }
.vocab-word.PERSON { background: rgba(165,180,252,0.1); color: #a5b4fc; border: 1px solid rgba(165,180,252,0.2); }
.vocab-word.OBJECT { background: rgba(134,239,172,0.1); color: #86efac; border: 1px solid rgba(134,239,172,0.2); }
.vocab-word.ACTION { background: rgba(251,191,36,0.1); color: #fbbf24; border: 1px solid rgba(251,191,36,0.2); }
.vocab-word.SOCIAL { background: rgba(196,181,253,0.1); color: #c4b5fd; border: 1px solid rgba(196,181,253,0.2); }
.vocab-word.EMOTION { background: rgba(249,168,212,0.1); color: #f9a8d4; border: 1px solid rgba(249,168,212,0.2); }

/* Event log */
#event-log { padding: 6px 12px; }
.event { padding: 12px 14px; margin-bottom: 6px; border-radius: 8px; background: rgba(15,15,22,0.8); border-left: 4px solid #1a1a2a; animation: slideIn 0.3s ease; font-size: 13px; line-height: 1.5; }
.event.learning { border-left-color: #4ade80; background: rgba(74,222,128,0.06); }
.event .meta { display: flex; justify-content: space-between; margin-bottom: 3px; }
.event .agent-name { font-weight: 700; font-size: 13px; }
.event .agent-name.mom { color: #f9a8d4; }
.event .agent-name.dad { color: #60a5fa; }
.event .agent-name.baby { color: #fbbf24; }
.event .agent-name.peer { color: #c4b5fd; }
.event .agent-name.visitor { color: #4ecdc4; }
.event .agent-name.teacher { color: #86efac; }
.event .utterance { color: #ddd; font-size: 14px; margin: 4px 0; }
.event .action { color: #99aabb; font-style: italic; font-size: 12px; margin-top: 2px; }
.event .new-word { color: #4ade80; font-weight: 700; font-size: 13px; margin-top: 6px; }
.event .timestamp { color: #555; font-size: 11px; }

/* Interaction panel */
#interaction-panel { border-top: 1px solid #181822; padding: 10px 14px; background: #090912; }
.interaction-actions { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.action-btn { padding: 8px 14px; border-radius: 20px; border: 1px solid #333; background: rgba(108,99,255,0.08); color: #aaa; cursor: pointer; font-size: 13px; font-family: 'Inter', sans-serif; transition: all 0.2s; }
.action-btn:hover { background: rgba(108,99,255,0.15); border-color: #6C63FF; color: #ccc; }
.action-btn.teach { background: rgba(74,222,128,0.06); color: #6bbd80; border-color: rgba(74,222,128,0.2); }
.action-btn.teach:hover { background: rgba(74,222,128,0.15); }
.chat-input-row { display: flex; gap: 6px; }
.chat-input { flex: 1; padding: 12px 16px; border-radius: 10px; border: 1px solid #333; background: #12121e; color: #eee; font-size: 14px; font-family: 'Inter', sans-serif; outline: none; }
.chat-input:focus { border-color: #6C63FF; }
.chat-input::placeholder { color: #333; }
.send-btn { padding: 12px 24px; border-radius: 10px; border: none; background: linear-gradient(135deg, #6C63FF, #5a52e0); color: #fff; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif; font-size: 14px; }
.send-btn:hover { box-shadow: 0 2px 8px rgba(108,99,255,0.3); }
.filter-msg { color: #f87171; font-size: 10px; padding: 4px 0; display: none; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
