:root {
  --bg: #0c0f22;
  --card: rgba(255, 255, 255, 0.1);
  --text: #f7f8ff;
  --accent: #8392ff;
  --accent2: #8c56ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(1300px 900px at 80% -20%, #413fd1 0%, #171c3f 45%, #090b18 100%);
  color: var(--text);
  overflow-x: hidden;
  overflow-y: auto;
}

#particles-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.app {
  position: relative;
  z-index: 1;
  width: min(920px, 92vw);
  margin: 24px auto;
  display: grid;
  gap: 16px;
}

.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 40px rgba(2, 8, 40, 0.35);
  padding: 18px;
}

.hidden {
  display: none !important;
}

.intro-view h1,
.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 36px);
}

.hero p,
.intro-view p,
.footer-card p {
  margin: 0;
  opacity: 0.92;
}

.primary-btn {
  margin-top: 16px;
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(131, 146, 255, 0.45);
}

.main-view {
  display: grid;
  gap: 14px;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.menu-grid.menu-hidden {
  display: none;
}

.menu-card {
  position: relative;
  display: grid;
  place-items: center;
  gap: 8px;
  height: 140px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(131, 146, 255, 0.4), rgba(255, 255, 255, 0.08));
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}

.menu-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(131, 146, 255, 0.42);
}

.menu-card .emoji {
  font-size: 32px;
}

.dust {
  position: fixed;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #9ea9ff 45%, #7d69ff 100%);
  z-index: 4;
}

.panel {
  border: 1px solid rgba(143, 156, 255, 0.38);
}

.panel h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.accent-word {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  color: #bfa7ff;
  text-shadow: 0 0 14px rgba(191, 167, 255, 0.6);
}

.panel p {
  margin: 0 0 10px;
}

.panel ul {
  margin: 0 0 10px 20px;
  padding: 0;
}

.panel li {
  margin: 0 0 6px;
}

.muted {
  opacity: 0.85;
  font-style: italic;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.chat-box {
  height: 200px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  padding: 10px;
  background: rgba(8, 10, 30, 0.48);
  margin: 10px 0;
  display: grid;
  gap: 8px;
}

.chat-bubble {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.35;
  display: grid;
  gap: 4px;
}

.chat-bubble.out {
  margin-left: auto;
  background: linear-gradient(130deg, rgba(131, 146, 255, 0.95), rgba(159, 106, 255, 0.92));
}

.chat-bubble.sys {
  margin-right: auto;
  background: rgba(255, 255, 255, 0.14);
  opacity: 0.9;
}

.chat-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-meta {
  font-size: 11px;
  opacity: 0.72;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.chat-bubble.sys .chat-meta {
  justify-content: flex-start;
}

.chat-status.read {
  color: #a9ffd0;
}

.chat-status.failed {
  color: #ffb0b0;
}

.chat-day-separator {
  justify-self: center;
  font-size: 11px;
  opacity: 0.75;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.chat-form {
  display: flex;
  gap: 8px;
}

.chat-form input {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 10px 14px;
  outline: none;
}

.chat-form input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.chip-btn {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.chip-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.2);
}
