* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #FFFFFF;
  --bg-secondary: #F4F4F4;
  --bg-dark: #000000;
  --accent: #1863DC;
  --accent-hover: #1454b8;
  --accent-glow: rgba(24, 99, 220, 0.25);
  --red: #CC0000;
  --text-primary: #212121;
  --text-secondary: #555;
  --text-muted: #999;
  --text-on-dark: #FFFFFF;
  --border: #EBEBEB;
  --border-dark: #333;
  --msg-user: #EBF0FA;
  --msg-goggins: #F8F8F8;
}

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
}

#app {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg-dark);
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(24, 99, 220, 0.02) 2px,
      rgba(24, 99, 220, 0.02) 4px
    );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem;
  max-width: 600px;
}

.hero-badge {
  display: inline-block;
  font-family: 'Oswald', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 6px 18px;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.hero h1 {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(3.5rem, 10vw, 6rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 2px;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  color: #FFFFFF;
}

.hero-accent {
  color: var(--accent);
  text-shadow: 0 0 40px var(--accent-glow);
}

.hero-tagline {
  font-size: 1rem;
  color: #aaa;
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.hero-quotes {
  margin-bottom: 2.5rem;
}

.rotating-quote {
  font-family: 'Oswald', sans-serif;
  font-size: 1.15rem;
  color: var(--red);
  font-style: italic;
  font-weight: 400;
  opacity: 0.9;
  min-height: 1.8em;
  transition: opacity 0.4s ease;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  border: none;
  padding: 16px 40px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 30px var(--accent-glow), 0 4px 20px rgba(0,0,0,0.4);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 50px var(--accent-glow), 0 4px 30px rgba(0,0,0,0.5);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-icon {
  font-size: 1.2rem;
}

.hero-features {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 3rem;
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.feature-icon {
  font-size: 1.5rem;
}

.feature-text {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #888;
}

/* ============ CHAT ============ */
.chat-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
}

.chat-container.hidden {
  display: none;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border-dark);
  flex-shrink: 0;
}

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

.avatar {
  width: 42px;
  height: 42px;
  background: var(--accent);
  color: #fff;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.chat-title {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #FFFFFF;
}

.chat-subtitle {
  font-size: 0.75rem;
  color: #888;
}

.btn-reset {
  background: none;
  border: 1px solid var(--border-dark);
  color: #888;
  font-size: 1.3rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

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

/* Messages */
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
  background: var(--bg-primary);
}

.messages::-webkit-scrollbar {
  width: 6px;
}

.messages::-webkit-scrollbar-track {
  background: transparent;
}

.messages::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.message {
  max-width: 80%;
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.6;
  animation: slideIn 0.3s ease;
  white-space: pre-wrap;
  word-wrap: break-word;
}

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

.message.user {
  align-self: flex-end;
  background: var(--accent);
  border: none;
  border-bottom-right-radius: 4px;
  color: #FFFFFF;
}

.message.assistant {
  align-self: flex-start;
  background: var(--msg-goggins);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  color: var(--text-primary);
}

.message.assistant .msg-label {
  display: block;
  font-family: 'Oswald', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 6px;
}

.typing-indicator {
  display: inline-flex;
  gap: 5px;
  padding: 8px 0 0;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: bounce 1.2s infinite;
  opacity: 0.6;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.15s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.3s; }

@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-8px); }
}

/* Input Area */
.input-area {
  padding: 16px 20px;
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 8px 8px 8px 18px;
  transition: border-color 0.2s;
}

.input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

#user-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  resize: none;
  outline: none;
  max-height: 120px;
  padding: 6px 0;
  line-height: 1.5;
}

#user-input::placeholder {
  color: var(--text-muted);
}

.btn-send {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.btn-send:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-send:not(:disabled):hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

.input-disclaimer {
  text-align: center;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Mobile */
@media (max-width: 600px) {
  .hero-features {
    gap: 1.2rem;
  }

  .hero h1 {
    font-size: 3.2rem;
  }

  .message {
    max-width: 90%;
  }

  .messages {
    padding: 12px;
  }

  .input-area {
    padding: 10px 12px;
  }
}

/* Hidden utility */
.hidden {
  display: none !important;
}
