/* LevelUp Local AI Academy — Custom Styles */

:root {
  --background: #0F172A;
  --foreground: #F8FAFC;
  --primary: #2C3262;
  --primary-hover: #1E2248;
  --accent: #F1BB56;
  --gold: #F1BB56;
  --surface: #1E293B;
  --surface-light: #334155;
  --muted: #94A3B8;
  --success: #10B981;
  --danger: #EF4444;
  --navy: #2C3262;
  --navy-light: #3D4480;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html { scroll-behavior: smooth; }

.font-display { font-family: 'Space Grotesk', system-ui, sans-serif; }

/* Strikethrough price animation */
.value-strike {
  text-decoration: line-through;
  text-decoration-color: var(--danger);
  text-decoration-thickness: 2px;
}

/* Glow effect for CTA */
.glow-button {
  box-shadow: 0 0 20px rgba(241, 187, 86, 0.3), 0 0 60px rgba(241, 187, 86, 0.1);
  transition: box-shadow 0.3s ease;
}
.glow-button:hover {
  box-shadow: 0 0 30px rgba(241, 187, 86, 0.5), 0 0 80px rgba(241, 187, 86, 0.2);
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--accent), #F5D78E);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-navy {
  background: linear-gradient(135deg, #4A52A0, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Blog content styles */
.blog-content h2 { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 1.75rem; font-weight: 700; margin-top: 2.5rem; margin-bottom: 1rem; color: var(--foreground); }
.blog-content h3 { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 1.35rem; font-weight: 600; margin-top: 2rem; margin-bottom: 0.75rem; color: var(--foreground); }
.blog-content p { color: var(--muted); line-height: 1.8; margin-bottom: 1.25rem; }
.blog-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; transition: opacity 0.2s; }
.blog-content a:hover { opacity: 0.8; }
.blog-content strong { color: var(--foreground); font-weight: 600; }
.blog-content em { font-style: italic; }
.blog-content ul, .blog-content ol { color: var(--muted); padding-left: 1.5rem; margin-bottom: 1.25rem; }
.blog-content ul { list-style-type: disc; }
.blog-content ol { list-style-type: decimal; }
.blog-content li { margin-bottom: 0.5rem; line-height: 1.7; }
.blog-content blockquote { border-left: 3px solid var(--accent); padding-left: 1.25rem; margin: 1.5rem 0; font-style: italic; }
.blog-content blockquote p { color: var(--foreground); }
.blog-content .loom-embed { margin-bottom: 2rem; border-radius: 12px; overflow: hidden; }
.blog-content code { background: var(--surface); padding: 0.15em 0.4em; border-radius: 4px; font-size: 0.9em; }

/* Custom colors for Tailwind */
.bg-background { background-color: var(--background); }
.bg-surface { background-color: var(--surface); }
.bg-surface-half { background-color: rgba(30, 41, 59, 0.5); }
.bg-surface-light { background-color: var(--surface-light); }
.bg-accent { background-color: var(--accent); }
.bg-primary { background-color: var(--primary); }
.bg-navy { background-color: var(--navy); }
.text-foreground { color: var(--foreground); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--muted); }
.text-background { color: var(--background); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-gold { color: var(--gold); }
.border-surface-light { border-color: var(--surface-light); }
.border-accent { border-color: var(--accent); }
.hover\:bg-primary-hover:hover { background-color: var(--primary-hover); }
.hover\:bg-accent-90:hover { background-color: rgba(241, 187, 86, 0.9); }

/* Pulse animation */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

/* Bounce animation */
@keyframes bounce {
  0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8,0,1,1); }
  50% { transform: translateY(0); animation-timing-function: cubic-bezier(0,0,0.2,1); }
}
.animate-bounce { animation: bounce 1s infinite; }

/* Spin animation */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.animate-spin { animation: spin 1s linear infinite; }

/* Line clamp */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Floating Chat Widget ─────────────────────────────────── */

/* FAB (Floating Action Button) */
.chat-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: var(--background);
  border: none;
  border-radius: 9999px;
  padding: 16px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(241, 187, 86, 0.4), 0 2px 8px rgba(0,0,0,0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.chat-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 28px rgba(241, 187, 86, 0.5), 0 4px 12px rgba(0,0,0,0.3);
}
.chat-fab-label {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

/* Chat Panel */
.chat-panel {
  position: fixed;
  bottom: 88px;
  right: 24px;
  z-index: 9998;
  width: 400px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  background: var(--background);
  border: 1px solid var(--surface-light);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
  overflow: hidden;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: bottom right;
}
.chat-panel-hidden {
  opacity: 0;
  transform: scale(0.92) translateY(12px);
  pointer-events: none;
}
.chat-panel-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--surface-light);
  background: rgba(30, 41, 59, 0.5);
}

.chat-panel-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-panel-footer {
  border-top: 1px solid var(--surface-light);
  padding: 12px 16px;
  background: rgba(30, 41, 59, 0.3);
}

.chat-textarea {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  resize: none;
  border-radius: 16px;
  border: 1px solid var(--surface-light);
  background: var(--surface);
  color: var(--foreground);
  padding: 10px 16px;
  font-size: 14px;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.2s;
}
.chat-textarea::placeholder { color: rgba(248, 250, 252, 0.35); }
.chat-textarea:focus { border-color: var(--accent); }

.chat-send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: var(--accent);
  color: var(--background);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.chat-send-btn:hover { background: rgba(241, 187, 86, 0.9); }
.chat-send-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Mobile: full-screen-ish chat panel */
@media (max-width: 480px) {
  .chat-panel {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
  }
  .chat-fab.chat-fab-hidden {
    display: none !important;
  }
  .chat-fab {
    bottom: 16px;
    right: 16px;
  }
}

/* CTA button that opens chat */
.chat-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 15px;
  transition: all 0.2s;
}
.chat-cta-btn:hover {
  background: rgba(241, 187, 86, 0.1);
  border-color: var(--accent);
}
