/* ==========================================================================
   SlothMate Design System - Modern Glassmorphic Rainforest Theme
   Built for Hacktoberfest Week 3: Slow and Steady (International Sloth Day)
   ========================================================================== */

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

:root {
  --bg-primary: #080d0b;
  --bg-secondary: #0d1713;
  --bg-card: rgba(15, 27, 21, 0.78);
  --bg-card-hover: rgba(22, 38, 30, 0.88);
  --border-subtle: rgba(52, 211, 153, 0.14);
  --border-active: rgba(52, 211, 153, 0.45);
  
  --emerald-primary: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.28);
  --emerald-light: #34d399;
  
  --amber-primary: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.25);
  --amber-light: #fbbf24;
  
  --text-main: #f0fdf4;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-sloth: 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Sloth Mode (Extra relaxed, warm, low-contrast) */
body.sloth-mode {
  --bg-primary: #070908;
  --bg-secondary: #0c120f;
  --emerald-primary: #059669;
  --amber-primary: #d97706;
  --text-main: #e2e8f0;
  filter: contrast(0.96) brightness(0.95);
  transition: all var(--transition-sloth);
}

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

html, body {
  min-height: 100vh;
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(16, 185, 129, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(245, 158, 11, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(13, 23, 19, 0.5) 0%, transparent 100%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(8, 13, 11, 0.82);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.mascot-avatar {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--emerald-primary);
  box-shadow: 0 0 16px var(--emerald-glow);
  transition: transform var(--transition-normal);
}

.brand:hover .mascot-avatar {
  transform: rotate(-6deg) scale(1.08);
}

.brand-text h1 {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, var(--emerald-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-light);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 6px;
}

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

/* Sloth Mode Switch */
.sloth-toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--amber-light);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.sloth-toggle-btn:hover {
  background: rgba(245, 158, 11, 0.22);
  box-shadow: 0 0 14px var(--amber-glow);
  transform: translateY(-1px);
}

/* Hero Section */
.hero {
  padding: 48px 0 32px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--emerald-light);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  font-weight: 500;
}

.hero-tag .dot {
  width: 8px;
  height: 8px;
  background: var(--emerald-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--emerald-primary);
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); }
}

.hero-title {
  font-size: 2.85rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.hero-title span {
  color: var(--emerald-light);
  text-shadow: 0 0 24px var(--emerald-glow);
}

.hero-desc {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 24px;
}

/* Sloth Wisdom Speech Bubble */
.sloan-quote-box {
  background: rgba(16, 28, 22, 0.9);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--amber-primary);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  backdrop-filter: blur(12px);
  margin-bottom: 24px;
}

.sloan-quote-box .quote-icon {
  font-size: 1.4rem;
}

.sloan-quote-text {
  font-size: 0.92rem;
  color: #cbd5e1;
  font-style: italic;
}

.sloan-quote-author {
  display: block;
  font-size: 0.78rem;
  color: var(--amber-light);
  font-weight: 600;
  margin-top: 4px;
  font-style: normal;
}

/* Sloth Mascot Showcase Card */
.mascot-hero-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.mascot-hero-img {
  width: 100%;
  max-width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin: 0 auto 16px;
  display: block;
  border: 1px solid rgba(52, 211, 153, 0.25);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.2);
  animation: floatSlow 6s ease-in-out infinite;
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Sloth Energy Tracker (The Sloth Meter) */
.energy-tracker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.stat-item {
  text-align: center;
}

.stat-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--emerald-light);
}

.stat-lbl {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Engine Mode Bar */
.engine-bar {
  background: rgba(13, 23, 19, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.engine-bar-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.engine-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.engine-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.engine-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.engine-chip.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--emerald-primary);
  color: var(--emerald-light);
  font-weight: 600;
  box-shadow: 0 0 12px var(--emerald-glow);
}

/* Navigation Tabs */
.tabs-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  overflow-x: auto;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.98rem;
  font-weight: 600;
  font-family: inherit;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  color: #ffffff;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 16px var(--emerald-glow);
}

/* Workstation Layout */
.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

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

.workstation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 860px) {
  .workstation-grid {
    grid-template-columns: 1fr;
  }
}

/* Glass Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-normal);
}

.card:hover {
  border-color: var(--border-active);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Quick Sample Pills */
.sample-presets {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.sample-chip {
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sample-chip:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--emerald-primary);
  color: var(--emerald-light);
}

/* Inputs & Textareas */
textarea.input-box {
  width: 100%;
  height: 200px;
  background: rgba(8, 14, 11, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  color: var(--text-main);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition-fast);
}

textarea.input-box:focus {
  border-color: var(--emerald-primary);
  box-shadow: 0 0 12px var(--emerald-glow);
}

/* Primary Action Buttons */
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--emerald-primary) 0%, #059669 100%);
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  box-shadow: 0 4px 18px var(--emerald-glow);
  transition: all var(--transition-normal);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

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

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Output Containers */
.output-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 380px;
}

.summary-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 16px;
}

.summary-box h4 {
  color: var(--emerald-light);
  font-size: 0.95rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-bullet {
  font-size: 0.92rem;
  color: #e2e8f0;
  margin-bottom: 6px;
  padding-left: 14px;
  position: relative;
}

.summary-bullet::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--emerald-light);
  font-weight: bold;
}

/* 1-Click Lazy Replies */
.replies-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reply-card {
  background: rgba(13, 23, 19, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: all var(--transition-fast);
}

.reply-card:hover {
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(18, 32, 26, 0.9);
}

.reply-meta {
  flex: 1;
}

.reply-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--amber-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  display: block;
}

.reply-text {
  font-size: 0.92rem;
  color: #ffffff;
}

.copy-btn {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--emerald-light);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.copy-btn:hover {
  background: var(--emerald-primary);
  color: #ffffff;
}

/* SlothChef Styles */
.fridge-preview-box {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px dashed var(--border-subtle);
  margin-bottom: 14px;
  background: rgba(0, 0, 0, 0.2);
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fridge-preview-img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

.upload-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px;
  cursor: pointer;
}

.recipe-card {
  background: rgba(13, 23, 19, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
}

.recipe-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--amber-light);
  margin-bottom: 6px;
}

.recipe-meta {
  display: flex;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.recipe-meta span {
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.recipe-steps {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.5;
}

/* SlothSanctuary (Sound & Breath) */
.sanctuary-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 0;
}

.breath-circle-wrapper {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.breath-outer-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px dashed rgba(52, 211, 153, 0.3);
}

.breath-orb {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--emerald-light) 0%, rgba(16, 185, 129, 0.2) 70%);
  box-shadow: 0 0 40px var(--emerald-glow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: slothBreathe 10s ease-in-out infinite;
}

@keyframes slothBreathe {
  0%, 100% {
    transform: scale(0.85);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
  }
  50% {
    transform: scale(1.4);
    box-shadow: 0 0 60px rgba(16, 185, 129, 0.5);
  }
}

.breath-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.breath-cadence {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Sound Synthesizer Mixer */
.sound-mixer {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 20px;
}

@media (max-width: 600px) {
  .sound-mixer {
    grid-template-columns: 1fr;
  }
}

.mixer-channel {
  background: rgba(13, 23, 19, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
}

.mixer-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.sound-slider {
  width: 100%;
  accent-color: var(--emerald-primary);
  cursor: pointer;
}

/* Code Snippet Box */
.code-box {
  background: #050807;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: #a7f3d0;
  overflow-x: auto;
  white-space: pre;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(16, 28, 22, 0.95);
  border: 1px solid var(--emerald-primary);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0 32px;
  margin-top: 64px;
  background: rgba(8, 13, 11, 0.85);
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-links {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links a {
  color: var(--emerald-light);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-dim);
}
