/* ============================================
   GROK 4.20 — MAXIMUM CHAOS STYLESHEET
   The Highest Intelligence™
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---- CSS VARIABLES ---- */
:root {
  --kush-green: #00ff6a;
  --kush-dark: #0a5c2a;
  --purple-haze: #9b30ff;
  --purple-deep: #6a0dad;
  --blunt-brown: #8B4513;
  --ash-gray: #1a1a2e;
  --smoke-white: rgba(255, 255, 255, 0.08);
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-tertiary: #1a1a28;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0b0;
  --glow-green: 0 0 20px rgba(0, 255, 106, 0.3);
  --glow-purple: 0 0 20px rgba(155, 48, 255, 0.3);
  --sidebar-width: 280px;
}

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  position: relative;
}

/* ---- TIE-DYE BACKGROUND ---- */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0, 255, 106, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(155, 48, 255, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(0, 200, 255, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 90%, rgba(255, 106, 0, 0.03) 0%, transparent 40%);
  animation: psychedelicShift 20s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes psychedelicShift {
  0%, 100% { filter: hue-rotate(0deg); }
  33% { filter: hue-rotate(30deg); }
  66% { filter: hue-rotate(-20deg); }
}

/* ---- SMOKE PARTICLES ---- */
#smoke-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  overflow: hidden;
}

.smoke-particle {
  position: absolute;
  bottom: -20px;
  width: 40px;
  height: 40px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: smokeRise var(--duration, 8s) ease-out var(--delay, 0s) infinite;
  opacity: 0;
  filter: blur(8px);
}

@keyframes smokeRise {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.5) rotate(0deg);
  }
  15% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.2;
    transform: translateY(-40vh) scale(1.5) rotate(45deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-100vh) scale(3) rotate(90deg);
  }
}

/* ---- FLOATING LEAVES ---- */
#leaf-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
  overflow: hidden;
}

.floating-leaf {
  position: absolute;
  top: -50px;
  font-size: var(--size, 24px);
  animation: leafFall var(--duration, 15s) linear var(--delay, 0s) infinite;
  opacity: 0.3;
  filter: drop-shadow(0 0 5px rgba(0, 255, 106, 0.3));
}

@keyframes leafFall {
  0% {
    transform: translateY(-50px) rotate(0deg) translateX(0px);
    opacity: 0;
  }
  10% {
    opacity: 0.3;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(calc(100vh + 50px)) rotate(720deg) translateX(var(--sway, 100px));
    opacity: 0;
  }
}

/* ---- LAYOUT ---- */
#app {
  display: flex;
  height: 100vh;
  position: relative;
  z-index: 1;
}

/* ---- SIDEBAR ---- */
#sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid rgba(0, 255, 106, 0.15);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  overflow-y: auto;
  transition: transform 0.3s ease, opacity 0.3s ease;
  position: relative;
  z-index: 10;
}

#sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, var(--kush-green), var(--purple-haze), var(--kush-green));
  animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

.sidebar-header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.logo-leaf {
  width: 40px;
  height: 40px;
  animation: leafPulse 2s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(0, 255, 106, 0.5));
}

@keyframes leafPulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.15) rotate(5deg); }
}

.logo-text {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.version {
  background: linear-gradient(135deg, var(--kush-green), var(--purple-haze));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.tagline {
  font-size: 11px;
  color: var(--kush-green);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
  text-shadow: 0 0 10px rgba(0, 255, 106, 0.3);
}

#new-chat-btn {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(0, 255, 106, 0.3);
  border-radius: 12px;
  background: rgba(0, 255, 106, 0.05);
  color: var(--kush-green);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

#new-chat-btn:hover {
  background: rgba(0, 255, 106, 0.15);
  box-shadow: var(--glow-green);
  transform: translateY(-1px);
}

/* Sidebar sections */
.sidebar-section {
  margin-bottom: 20px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar-section h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

/* Blazed toggle */
.toggle-container {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.toggle-container input {
  display: none;
}

.toggle-slider {
  width: 44px;
  height: 24px;
  background: #333;
  border-radius: 12px;
  position: relative;
  transition: background 0.3s;
  flex-shrink: 0;
}

.toggle-slider::after {
  content: '🌿';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border-radius: 50%;
  background: #555;
  transition: all 0.3s;
}

.toggle-container input:checked + .toggle-slider {
  background: linear-gradient(135deg, var(--kush-dark), var(--purple-deep));
  box-shadow: 0 0 15px rgba(0, 255, 106, 0.3);
}

.toggle-container input:checked + .toggle-slider::after {
  transform: translateX(20px);
  background: var(--kush-green);
  content: '🔥';
}

.toggle-label {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Highness slider */
#highness-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #333, var(--kush-green), var(--purple-haze), #ff4500);
  outline: none;
  cursor: pointer;
}

#highness-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--kush-green);
  cursor: pointer;
  box-shadow: 0 0 15px rgba(0, 255, 106, 0.5);
  border: 2px solid #fff;
  transition: transform 0.2s;
}

#highness-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.highness-value {
  text-align: center;
  font-size: 13px;
  color: var(--kush-green);
  margin-top: 6px;
  font-weight: 600;
}

/* Model select */
.stoner-select {
  width: 100%;
  padding: 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 255, 106, 0.2);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  outline: none;
}

.stoner-select option {
  background: var(--bg-secondary);
}

/* Stats */
.stats .stat-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.stats .stat-item:last-child {
  border-bottom: none;
}

.stats .stat-item span:last-child {
  color: var(--kush-green);
  font-weight: 600;
}

/* ---- SESH HISTORY ---- */
.sesh-history-section {
  max-height: min(240px, 30vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.conversation-list {
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.conversation-list::-webkit-scrollbar {
  width: 4px;
}

.conversation-list::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 106, 0.15);
  border-radius: 2px;
}

.conversation-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
  border: 1px solid transparent;
  min-height: 36px;
}

.conversation-item:hover {
  background: rgba(0, 255, 106, 0.06);
  border-color: rgba(0, 255, 106, 0.1);
}

.conversation-item.active {
  background: rgba(0, 255, 106, 0.1);
  border-color: rgba(0, 255, 106, 0.25);
}

.conversation-item-title {
  flex: 1;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  line-height: 1.3;
}

.conversation-item.active .conversation-item-title {
  color: var(--kush-green);
}

.conversation-item-delete {
  opacity: 0;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.2s;
  flex-shrink: 0;
  line-height: 1;
}

.conversation-item:hover .conversation-item-delete {
  opacity: 1;
}

.conversation-item-delete:hover {
  color: #ff4444;
  background: rgba(255, 68, 68, 0.1);
}

.conversation-list-empty {
  text-align: center;
  padding: 16px 8px;
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.6;
  font-style: italic;
}

/* Sidebar footer */
.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  text-align: center;
  font-size: 11px;
  color: var(--text-secondary);
}

.disclaimer {
  margin-top: 4px;
  font-size: 9px;
  opacity: 0.5;
  font-style: italic;
}

/* ---- MAIN CHAT AREA ---- */
#chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Header */
#chat-header {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  background: rgba(17, 17, 24, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 5;
}

#sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  margin-right: 12px;
}

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

.header-center h2 {
  font-size: 18px;
  font-weight: 600;
}

.header-version {
  background: linear-gradient(135deg, var(--kush-green), var(--purple-haze));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-badge {
  font-size: 9px;
  padding: 3px 8px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(0, 255, 106, 0.15), rgba(155, 48, 255, 0.15));
  border: 1px solid rgba(0, 255, 106, 0.3);
  color: var(--kush-green);
  font-weight: 600;
  letter-spacing: 1px;
}

.header-ca {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(0, 255, 106, 0.5);
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 360px;
  animation: badgePulse 3s ease-in-out infinite;
}

.header-social {
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(29, 161, 242, 0.12);
  border: 1px solid rgba(29, 161, 242, 0.3);
  color: #1da1f2;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: all 0.3s;
  white-space: nowrap;
}

.header-social:hover {
  background: rgba(29, 161, 242, 0.25);
  border-color: rgba(29, 161, 242, 0.6);
  box-shadow: 0 0 12px rgba(29, 161, 242, 0.2);
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 5px rgba(0, 255, 106, 0.2); }
  50% { box-shadow: 0 0 20px rgba(0, 255, 106, 0.4); }
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-clock {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.header-clock.its-420 {
  color: var(--kush-green) !important;
  text-shadow: 0 0 20px rgba(0, 255, 106, 0.8);
  animation: rainbowText 1s linear infinite;
  font-weight: 700;
}

@keyframes rainbowText {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* Visitor counter */
.visitor-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--kush-green);
  padding: 4px 10px;
  background: rgba(0, 255, 106, 0.06);
  border: 1px solid rgba(0, 255, 106, 0.15);
  border-radius: 20px;
  white-space: nowrap;
  transition: all 0.3s;
}

.visitor-bump {
  animation: visitorBump 0.4s ease;
}

@keyframes visitorBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

body.light-theme .visitor-count {
  background: rgba(10, 138, 58, 0.06);
  border-color: rgba(10, 138, 58, 0.2);
}

.munchies-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 165, 0, 0.3);
  background: rgba(255, 165, 0, 0.1);
  color: #ffa500;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.munchies-btn:hover {
  background: rgba(255, 165, 0, 0.2);
  box-shadow: 0 0 15px rgba(255, 165, 0, 0.3);
  transform: scale(1.05);
}

.munchies-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ff4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: badgeBounce 0.3s ease;
}

@keyframes badgeBounce {
  0% { transform: scale(0); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ---- MESSAGES CONTAINER ---- */
#messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  scroll-behavior: smooth;
}

#messages-container::-webkit-scrollbar {
  width: 6px;
}

#messages-container::-webkit-scrollbar-track {
  background: transparent;
}

#messages-container::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 106, 0.2);
  border-radius: 3px;
}

#messages-container::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 106, 0.4);
}

/* Welcome screen */
#welcome-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 40px 20px;
}

.welcome-logo {
  margin-bottom: 40px;
}

.big-leaf {
  width: 120px;
  height: 120px;
  animation: leafPulse 2s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(0, 255, 106, 0.4));
  margin-bottom: 16px;
}

.welcome-logo h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 8px;
}

.rainbow-text {
  background: linear-gradient(135deg, var(--kush-green), #00ff9d, var(--purple-haze), #ff6b6b, var(--kush-green));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rainbowGradient 4s ease infinite;
}

@keyframes rainbowGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.welcome-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.welcome-snoop {
  font-size: 14px;
  color: var(--purple-haze);
  font-style: italic;
  max-width: 400px;
  opacity: 0.8;
}

/* Suggestion cards */
.suggestion-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 600px;
  width: 100%;
}

.suggestion-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  font-family: inherit;
  color: var(--text-primary);
  font-size: 13px;
}

.suggestion-card:hover {
  background: rgba(0, 255, 106, 0.06);
  border-color: rgba(0, 255, 106, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.suggestion-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.suggestion-text {
  line-height: 1.4;
}

/* ---- CHAT MESSAGES ---- */
.message {
  max-width: 800px;
  margin: 0 auto 20px;
  padding: 16px 20px;
  border-radius: 16px;
  animation: messageIn 0.4s ease-out;
  line-height: 1.6;
  font-size: 15px;
}

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

.message.user {
  background: linear-gradient(135deg, rgba(0, 255, 106, 0.08), rgba(155, 48, 255, 0.08));
  border: 1px solid rgba(0, 255, 106, 0.15);
  margin-left: 60px;
}

.message.user::before {
  content: '🧑‍💻 You';
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--kush-green);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.message.assistant {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-right: 60px;
}

.message.assistant::before {
  content: '🌿 Grok 4.20';
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--purple-haze);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.message.assistant .cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--kush-green);
  margin-left: 2px;
  animation: cursorBlink 0.8s ease-in-out infinite;
  vertical-align: text-bottom;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.message-content {
  white-space: pre-wrap;
  word-wrap: break-word;
}

.message-content code {
  background: rgba(0, 255, 106, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
  color: var(--kush-green);
}

.message-content pre {
  background: rgba(0, 0, 0, 0.4);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 10px 0;
  border: 1px solid rgba(0, 255, 106, 0.1);
}

.message-content pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
}

/* ---- TYPING INDICATOR ---- */
#typing-indicator {
  max-width: 800px;
  margin: 0 auto;
  padding: 8px 0;
}

#typing-indicator.hidden {
  display: none;
}

.typing-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.typing-emoji {
  font-size: 18px;
  animation: smokeEmoji 1.5s ease-in-out infinite;
}

@keyframes smokeEmoji {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3) translateY(-3px); opacity: 0.6; }
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--kush-green);
  animation: dotBounce 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
  30% { transform: translateY(-8px); opacity: 1; }
}

/* ---- INPUT AREA ---- */
#input-area {
  padding: 12px 20px 16px;
  background: rgba(17, 17, 24, 0.8);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.input-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  align-items: flex-end;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 255, 106, 0.15);
  border-radius: 16px;
  padding: 8px 12px;
  transition: all 0.3s;
}

.input-container:focus-within {
  border-color: rgba(0, 255, 106, 0.4);
  box-shadow: var(--glow-green), inset 0 0 30px rgba(0, 255, 106, 0.03);
}

#chat-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  padding: 8px;
  resize: none;
  outline: none;
  max-height: 150px;
  line-height: 1.5;
}

#chat-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

#send-btn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--kush-green), var(--purple-haze));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  flex-shrink: 0;
}

#send-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 25px rgba(0, 255, 106, 0.4);
}

#send-btn:active {
  transform: scale(0.95);
}

.send-icon {
  font-size: 20px;
}

#send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.input-disclaimer {
  text-align: center;
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.5;
  margin-top: 8px;
}

/* ---- KONAMI OVERLAY ---- */
#konami-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: konamiIn 0.5s ease;
}

#konami-overlay.hidden {
  display: none;
}

@keyframes konamiIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.konami-content {
  text-align: center;
  animation: konamiPop 0.5s ease;
}

@keyframes konamiPop {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.konami-content h1 {
  font-size: 48px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--kush-green), var(--purple-haze));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.konami-content p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.konami-content .snoop-quote {
  font-style: italic;
  color: var(--purple-haze);
  max-width: 400px;
  margin: 16px auto;
}

.konami-content button {
  margin-top: 20px;
  padding: 12px 32px;
  border-radius: 30px;
  border: 2px solid var(--kush-green);
  background: transparent;
  color: var(--kush-green);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.konami-content button:hover {
  background: var(--kush-green);
  color: #000;
}

/* ---- 4:20 ALERT ---- */
#fourtwenty-alert {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fourtwentyIn 0.8s ease;
  cursor: pointer;
}

#fourtwenty-alert.hidden {
  display: none;
}

.fourtwenty-content {
  text-align: center;
}

.fourtwenty-content h1 {
  font-size: 64px;
  animation: rainbowGradient 2s ease infinite, textPulse 0.5s ease-in-out infinite;
  background: linear-gradient(135deg, var(--kush-green), gold, var(--purple-haze), orangered, var(--kush-green));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes textPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.fourtwenty-content p {
  font-size: 20px;
  color: var(--kush-green);
  margin-top: 16px;
}

/* ============================================
   HIGHERATS MUNCHIES PANEL
   ============================================ */

/* ---- OVERLAY ---- */
.munchies-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 4999;
  transition: opacity 0.3s ease;
}

/* ---- SLIDE-OUT PANEL ---- */
.munchies-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  height: 100%;
  background: var(--bg-secondary);
  border-left: 1px solid rgba(255, 165, 0, 0.2);
  z-index: 5000;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.munchies-panel.open {
  transform: translateX(0);
}

#munchies-panel-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  min-width: 0;
}

/* ---- PANEL HEADER ---- */
.munchies-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(255, 100, 0, 0.15), rgba(255, 165, 0, 0.1));
  border-bottom: 1px solid rgba(255, 165, 0, 0.15);
  flex-shrink: 0;
}

.munchies-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.munchies-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.munchies-brand-logo {
  font-size: 28px;
}

.munchies-brand h2 {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, #ffa500, #ff4500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.munchies-brand-tag {
  font-size: 9px;
  color: var(--text-secondary);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

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

.munchies-cart-btn {
  position: relative;
  background: rgba(255, 165, 0, 0.1);
  border: 1px solid rgba(255, 165, 0, 0.2);
  border-radius: 10px;
  padding: 8px 12px;
  color: #ffa500;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.munchies-cart-btn:hover {
  background: rgba(255, 165, 0, 0.2);
}

.munchies-cart-btn .cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ff4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.munchies-history-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

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

.munchies-close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}

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

/* ---- CATEGORY TABS ---- */
.munchies-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 20px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.munchies-tab {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.munchies-tab:hover {
  background: rgba(255, 165, 0, 0.1);
  border-color: rgba(255, 165, 0, 0.2);
}

.munchies-tab.active {
  background: rgba(255, 165, 0, 0.15);
  border-color: rgba(255, 165, 0, 0.4);
  color: #ffa500;
  font-weight: 600;
}

/* ---- SCROLLABLE CONTENT AREA ---- */
.munchies-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.munchies-body::-webkit-scrollbar {
  width: 4px;
}

.munchies-body::-webkit-scrollbar-thumb {
  background: rgba(255, 165, 0, 0.2);
  border-radius: 2px;
}

/* ---- ITEM CARDS ---- */
.munchies-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.munchies-item-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 14px;
  transition: all 0.25s ease;
  animation: cardIn 0.3s ease-out;
}

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

.munchies-item-card:hover {
  background: rgba(255, 165, 0, 0.04);
  border-color: rgba(255, 165, 0, 0.15);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.munchies-item-top {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.munchies-item-emoji {
  font-size: 36px;
  flex-shrink: 0;
  line-height: 1;
}

.munchies-item-info {
  flex: 1;
  min-width: 0;
}

.munchies-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.munchies-item-desc {
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.4;
}

.munchies-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.munchies-item-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.munchies-highness {
  font-size: 12px;
  letter-spacing: -1px;
}

.munchies-price {
  font-size: 13px;
  font-weight: 600;
  color: #ffa500;
}

.munchies-add-btn {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 165, 0, 0.4);
  background: rgba(255, 165, 0, 0.1);
  color: #ffa500;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.munchies-add-btn:hover {
  background: rgba(255, 165, 0, 0.25);
  transform: scale(1.05);
}

.munchies-add-btn:active {
  transform: scale(0.95);
}

/* Add to cart float animation */
.cart-float-anim {
  position: absolute;
  font-size: 14px;
  font-weight: 700;
  color: #ffa500;
  pointer-events: none;
  animation: floatUp 0.8s ease-out forwards;
  z-index: 5001;
}

@keyframes floatUp {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-40px); }
}

/* ---- CART VIEW ---- */
.munchies-cart-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.munchies-cart-empty-emoji {
  font-size: 48px;
  margin-bottom: 12px;
}

.munchies-cart-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.munchies-cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.munchies-cart-item-emoji {
  font-size: 28px;
  flex-shrink: 0;
}

.munchies-cart-item-info {
  flex: 1;
  min-width: 0;
}

.munchies-cart-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.munchies-cart-item-price {
  font-size: 12px;
  color: var(--text-secondary);
}

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

.munchies-qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 165, 0, 0.3);
  background: rgba(255, 165, 0, 0.1);
  color: #ffa500;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-family: inherit;
  line-height: 1;
}

.munchies-qty-btn:hover {
  background: rgba(255, 165, 0, 0.25);
}

.munchies-qty-display {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 20px;
  text-align: center;
}

/* ---- PANEL FOOTER (cart total + checkout) ---- */
.munchies-footer {
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 165, 0, 0.1);
  flex-shrink: 0;
}

.munchies-footer-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 14px;
}

.munchies-footer-total span:first-child {
  color: var(--text-secondary);
}

.munchies-footer-total span:last-child {
  color: #ffa500;
  font-weight: 700;
  font-size: 18px;
}

.munchies-checkout-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff8c00, #ff4500);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.munchies-checkout-btn:hover {
  box-shadow: 0 0 25px rgba(255, 100, 0, 0.4);
  transform: translateY(-1px);
}

.munchies-checkout-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.munchies-back-btn {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}

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

.munchies-tweet-btn {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(29, 155, 240, 0.4);
  border-radius: 12px;
  background: rgba(29, 155, 240, 0.1);
  color: #1d9bf0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 8px;
}

.munchies-tweet-btn:hover {
  background: rgba(29, 155, 240, 0.2);
  box-shadow: 0 0 20px rgba(29, 155, 240, 0.3);
  transform: translateY(-1px);
}

/* ---- CHECKOUT VIEW ---- */
.munchies-checkout-view {
  animation: slideLeft 0.3s ease;
}

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

.munchies-checkout-section {
  margin-bottom: 20px;
}

.munchies-checkout-section h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.munchies-payment-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.munchies-payment-option {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.munchies-payment-option:hover {
  background: rgba(255, 165, 0, 0.06);
  border-color: rgba(255, 165, 0, 0.2);
}

.munchies-payment-option.selected {
  background: rgba(255, 165, 0, 0.1);
  border-color: rgba(255, 165, 0, 0.4);
  color: #ffa500;
}

.munchies-text-field {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 6px;
}

.munchies-text-field:focus {
  border-color: rgba(255, 165, 0, 0.3);
}

.munchies-textarea {
  resize: none;
  min-height: 60px;
}

.munchies-order-summary {
  padding: 12px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  margin-bottom: 16px;
}

.munchies-order-summary-item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
  color: var(--text-secondary);
}

.munchies-order-summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 700;
  color: #ffa500;
  padding-top: 8px;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ---- PROCESSING VIEW ---- */
.munchies-processing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  text-align: center;
  animation: slideLeft 0.3s ease;
}

.munchies-processing-spinner {
  font-size: 64px;
  animation: processingPulse 1s ease-in-out infinite;
  margin-bottom: 20px;
}

@keyframes processingPulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.1) rotate(5deg); }
  50% { transform: scale(1) rotate(0deg); }
  75% { transform: scale(1.1) rotate(-5deg); }
}

.munchies-processing-text {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  min-height: 24px;
}

.munchies-processing-sub {
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.5;
}

/* ---- TRACKING VIEW ---- */
.munchies-tracking {
  animation: slideLeft 0.3s ease;
}

.munchies-tracking-header {
  text-align: center;
  margin-bottom: 24px;
}

.munchies-tracking-header h3 {
  font-size: 18px;
  color: #ffa500;
  margin-bottom: 4px;
}

.munchies-tracking-order-num {
  font-size: 12px;
  color: var(--text-secondary);
}

.munchies-eta {
  text-align: center;
  margin-bottom: 24px;
  padding: 14px;
  background: rgba(255, 165, 0, 0.06);
  border-radius: 12px;
  border: 1px solid rgba(255, 165, 0, 0.1);
}

.munchies-eta-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.munchies-eta-value {
  font-size: 24px;
  font-weight: 700;
  color: #ffa500;
}

/* Progress steps */
.munchies-progress {
  position: relative;
  padding-left: 30px;
  margin-bottom: 20px;
}

.munchies-progress::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.06);
}

.munchies-progress-step {
  position: relative;
  padding: 12px 0;
  padding-left: 16px;
}

.munchies-progress-step::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 16px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.15);
  transition: all 0.3s;
}

.munchies-progress-step.completed::before {
  background: #ffa500;
  border-color: #ffa500;
  box-shadow: 0 0 10px rgba(255, 165, 0, 0.4);
}

.munchies-progress-step.active::before {
  background: transparent;
  border-color: #ffa500;
  box-shadow: 0 0 10px rgba(255, 165, 0, 0.3);
  animation: stepPulse 1.5s ease-in-out infinite;
}

@keyframes stepPulse {
  0%, 100% { box-shadow: 0 0 5px rgba(255, 165, 0, 0.2); }
  50% { box-shadow: 0 0 15px rgba(255, 165, 0, 0.5); }
}

.munchies-step-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.3s;
}

.munchies-progress-step.completed .munchies-step-title,
.munchies-progress-step.active .munchies-step-title {
  color: var(--text-primary);
}

.munchies-step-desc {
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 2px;
  opacity: 0;
  transition: opacity 0.3s;
}

.munchies-progress-step.completed .munchies-step-desc,
.munchies-progress-step.active .munchies-step-desc {
  opacity: 1;
}

/* Tracking updates */
.munchies-tracking-updates {
  margin-top: 16px;
}

.munchies-tracking-update {
  padding: 10px 14px;
  background: rgba(255, 165, 0, 0.05);
  border-radius: 10px;
  border-left: 3px solid #ffa500;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  animation: updateIn 0.4s ease;
}

@keyframes updateIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Delivery car */
.munchies-delivery-car {
  font-size: 28px;
  position: relative;
  animation: deliveryCar 4s linear infinite;
  display: inline-block;
  margin: 12px 0;
}

@keyframes deliveryCar {
  0% { left: -30px; transform: scaleX(1); }
  45% { left: calc(100% + 30px); transform: scaleX(1); }
  50% { left: calc(100% + 30px); transform: scaleX(-1); }
  95% { left: -30px; transform: scaleX(-1); }
  100% { left: -30px; transform: scaleX(1); }
}

/* ---- ORDER HISTORY VIEW ---- */
.munchies-history {
  animation: slideLeft 0.3s ease;
}

.munchies-history-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.munchies-history-entry {
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  margin-bottom: 10px;
}

.munchies-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.munchies-history-order-num {
  font-size: 14px;
  font-weight: 600;
  color: #ffa500;
}

.munchies-history-time {
  font-size: 11px;
  color: var(--text-secondary);
}

.munchies-history-items {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.5;
}

.munchies-history-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.munchies-history-total {
  font-size: 13px;
  font-weight: 600;
  color: #ffa500;
}

.munchies-history-status {
  font-size: 11px;
  color: var(--kush-green);
  font-style: italic;
}

/* ---- FOOD EMOJI RAIN ---- */
.food-rain-emoji {
  position: fixed;
  top: -50px;
  font-size: var(--size, 30px);
  animation: foodFall var(--duration, 3s) linear var(--delay, 0s) forwards;
  pointer-events: none;
  z-index: 9998;
}

@keyframes foodFall {
  0% {
    transform: translateY(-50px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(calc(100vh + 50px)) rotate(360deg);
    opacity: 0;
  }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  #sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    transform: translateX(-100%);
    z-index: 100;
  }

  #sidebar.open {
    transform: translateX(0);
  }

  #sidebar-toggle {
    display: block;
  }

  .suggestion-grid {
    grid-template-columns: 1fr;
  }

  .message.user { margin-left: 20px; }
  .message.assistant { margin-right: 20px; }

  .welcome-logo h1 { font-size: 36px; }
  .big-leaf { width: 90px; height: 90px; }
  .fourtwenty-content h1 { font-size: 36px; }

  .munchies-panel { width: 100%; }
}

/* ---- UTILITY ---- */
.hidden {
  display: none !important;
}

/* Smooth scroll fix */
#messages {
  padding-bottom: 10px;
}

/* Weed cursor for fun (uncomment if desired) */
/*
* { cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><text y="18" font-size="18">🌿</text></svg>'), auto; }
*/

/* ---- SCREEN SHAKE for 420 ---- */
@keyframes screenShake {
  0%, 100% { transform: translate(0); }
  10% { transform: translate(-3px, 2px); }
  20% { transform: translate(3px, -2px); }
  30% { transform: translate(-2px, 3px); }
  40% { transform: translate(2px, -3px); }
  50% { transform: translate(-3px, -2px); }
  60% { transform: translate(3px, 2px); }
  70% { transform: translate(-2px, -3px); }
  80% { transform: translate(2px, 3px); }
  90% { transform: translate(-3px, 2px); }
}

body.shake {
  animation: screenShake 0.5s ease-in-out;
}

/* ============================================
   LIGHT THEME — "Sober Mode" 🌞
   ============================================ */

/* Theme toggle slider override */
.theme-toggle-slider::after {
  content: '🌙' !important;
}

.toggle-container input:checked + .theme-toggle-slider::after {
  content: '☀️' !important;
}

/* Light theme variable overrides */
body.light-theme {
  --bg-primary: #f5f2eb;
  --bg-secondary: #ede8df;
  --bg-tertiary: #e2ddd3;
  --text-primary: #1a1a1a;
  --text-secondary: #555555;
  --smoke-white: rgba(0, 0, 0, 0.04);
  --kush-green: #0a8a3a;
  --purple-haze: #7b1fa2;
  --glow-green: 0 0 20px rgba(10, 138, 58, 0.2);
  --glow-purple: 0 0 20px rgba(123, 31, 162, 0.2);
}

/* Tie-dye background — lighter */
body.light-theme::before {
  background:
    radial-gradient(ellipse at 20% 50%, rgba(10, 138, 58, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(123, 31, 162, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(0, 150, 200, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 90%, rgba(255, 140, 0, 0.04) 0%, transparent 40%);
}

/* Smoke particles — darker in light mode */
body.light-theme .smoke-particle {
  background: radial-gradient(circle, rgba(0, 0, 0, 0.06) 0%, transparent 70%);
}

/* Floating leaves — less glow */
body.light-theme .floating-leaf {
  filter: drop-shadow(0 0 3px rgba(10, 138, 58, 0.2));
  opacity: 0.25;
}

/* Sidebar */
body.light-theme #sidebar {
  background: var(--bg-secondary);
  border-right-color: rgba(10, 138, 58, 0.2);
}

body.light-theme #sidebar::before {
  background: linear-gradient(to bottom, var(--kush-green), var(--purple-haze), var(--kush-green));
  opacity: 0.2;
}

body.light-theme .sidebar-section {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme #new-chat-btn {
  border-color: rgba(10, 138, 58, 0.3);
  background: rgba(10, 138, 58, 0.06);
}

body.light-theme #new-chat-btn:hover {
  background: rgba(10, 138, 58, 0.12);
}

body.light-theme .stoner-select {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(10, 138, 58, 0.2);
  color: var(--text-primary);
}

body.light-theme .stoner-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* Header */
body.light-theme #chat-header {
  background: rgba(237, 232, 223, 0.9);
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .header-badge {
  background: linear-gradient(135deg, rgba(10, 138, 58, 0.12), rgba(123, 31, 162, 0.12));
  border-color: rgba(10, 138, 58, 0.3);
}

body.light-theme .header-ca {
  color: rgba(10, 138, 58, 0.5);
}

body.light-theme .header-social {
  background: rgba(29, 161, 242, 0.08);
  border-color: rgba(29, 161, 242, 0.25);
  color: #1a8cd8;
}

body.light-theme .header-clock {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-secondary);
}

body.light-theme .munchies-btn {
  border-color: rgba(200, 120, 0, 0.3);
  background: rgba(200, 120, 0, 0.08);
  color: #b87300;
}

/* Messages */
body.light-theme .message.user {
  background: linear-gradient(135deg, rgba(10, 138, 58, 0.08), rgba(123, 31, 162, 0.06));
  border-color: rgba(10, 138, 58, 0.15);
}

body.light-theme .message.assistant {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .message-content code {
  background: rgba(10, 138, 58, 0.08);
  color: #0a6e2e;
}

body.light-theme .message-content pre {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(10, 138, 58, 0.1);
}

body.light-theme .message-content pre code {
  color: var(--text-primary);
}

/* Input area */
body.light-theme #input-area {
  background: rgba(237, 232, 223, 0.9);
  border-top-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .input-container {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(10, 138, 58, 0.2);
}

body.light-theme .input-container:focus-within {
  border-color: rgba(10, 138, 58, 0.5);
  box-shadow: 0 0 15px rgba(10, 138, 58, 0.1);
}

body.light-theme #chat-input {
  color: var(--text-primary);
}

body.light-theme #chat-input::placeholder {
  color: #888;
}

/* Suggestion cards */
body.light-theme .suggestion-card {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .suggestion-card:hover {
  background: rgba(10, 138, 58, 0.06);
  border-color: rgba(10, 138, 58, 0.2);
}

/* Conversation history */
body.light-theme .conversation-item:hover {
  background: rgba(10, 138, 58, 0.06);
  border-color: rgba(10, 138, 58, 0.12);
}

body.light-theme .conversation-item.active {
  background: rgba(10, 138, 58, 0.1);
  border-color: rgba(10, 138, 58, 0.25);
}

/* Scrollbars */
body.light-theme #messages-container::-webkit-scrollbar-thumb {
  background: rgba(10, 138, 58, 0.15);
}

body.light-theme #messages-container::-webkit-scrollbar-thumb:hover {
  background: rgba(10, 138, 58, 0.3);
}

/* Toggle slider in light mode */
body.light-theme .toggle-slider {
  background: #ccc;
}

body.light-theme .toggle-container input:checked + .toggle-slider {
  background: linear-gradient(135deg, #0a8a3a, #7b1fa2);
}

/* Highness slider */
body.light-theme #highness-slider {
  background: linear-gradient(90deg, #ccc, #0a8a3a, #7b1fa2, #e64a19);
}

/* Munchies panel */
body.light-theme .munchies-panel {
  background: var(--bg-secondary);
  border-left-color: rgba(200, 120, 0, 0.2);
}

body.light-theme .munchies-header {
  background: linear-gradient(135deg, rgba(200, 120, 0, 0.1), rgba(200, 120, 0, 0.06));
  border-bottom-color: rgba(200, 120, 0, 0.12);
}

body.light-theme .munchies-item-card {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .munchies-item-card:hover {
  background: rgba(200, 120, 0, 0.04);
  border-color: rgba(200, 120, 0, 0.15);
}

body.light-theme .munchies-tab {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.02);
}

body.light-theme .munchies-tab.active {
  background: rgba(200, 120, 0, 0.12);
  border-color: rgba(200, 120, 0, 0.35);
}

body.light-theme .munchies-footer {
  background: rgba(0, 0, 0, 0.03);
  border-top-color: rgba(200, 120, 0, 0.1);
}

body.light-theme .munchies-overlay {
  background: rgba(0, 0, 0, 0.3);
}

/* Konami & 420 overlays stay dark — they look better that way */
