/* ==========================================================================
   WAKEUP AI ALARM - MODERN DARK SYSTEM CSS
   Didesain untuk tampilan responsif, futuristik dengan glassmorphism & neon accent
   ========================================================================== */

/* --- CSS Variables / Custom Properties --- */
:root {
  /* Color Palette */
  --bg-dark: #0b0f19;
  --bg-darker: #060810;
  --card-bg: rgba(20, 28, 46, 0.65);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-glow: rgba(139, 92, 246, 0.15);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Accent Colors */
  --primary-violet: #8b5cf6;
  --primary-violet-hover: #7c3aed;
  --accent-cyan: #06b6d4;
  --accent-cyan-hover: #0891b2;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --danger-crimson: #ef4444;
  --danger-crimson-hover: #dc2626;

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
  --grad-danger: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
  --grad-success: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  --grad-card: linear-gradient(145deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));

  /* Layout & Fonts */
  --font-family-body: 'Plus Jakarta Sans', sans-serif;
  --font-family-heading: 'Outfit', sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-lg: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
  --shadow-neon: 0 0 25px rgba(139, 92, 246, 0.3);
}

/* --- Global Reset & Base Styles --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-body);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* --- Ambient Background Glow Orbs --- */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
}

.bg-glow-1 {
  top: -10%;
  left: 20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--primary-violet) 0%, transparent 70%);
}

.bg-glow-2 {
  bottom: 10%;
  right: -5%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
}

.bg-glow-3 {
  top: 40%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #ec4899 0%, transparent 70%);
}

/* --- Container & Main Layout --- */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* --- Typography Utilities --- */
h1, h2, h3, h4 {
  font-family: var(--font-family-heading);
  letter-spacing: -0.02em;
}

.text-gradient {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-cyan { color: var(--accent-cyan); }
.text-violet { color: var(--primary-violet); }
.text-amber { color: var(--accent-amber); }
.text-accent { color: var(--primary-violet); }

/* --- App Header --- */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 0.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

.brand-text h1 {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.ai-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.status-dot.warning { background-color: var(--accent-amber); }
.status-dot.online { background-color: var(--accent-emerald); }
.status-dot.error { background-color: var(--danger-crimson); }

.pulse {
  animation: pulse-animation 1.8s infinite;
}

@keyframes pulse-animation {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* --- Cards & Glassmorphism System --- */
.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.card-title h2 {
  font-size: 1.35rem;
  font-weight: 700;
}

.card-title i {
  font-size: 1.25rem;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* --- Main Layout Grid --- */
.main-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .main-content {
    grid-template-columns: 1fr 1fr;
  }
  .clock-card { grid-column: span 1; }
  .settings-card { grid-column: span 1; }
  .challenge-card { grid-column: span 2; }
  .objects-card { grid-column: span 2; }
  .info-card { grid-column: span 2; }
}

/* --- Digital Clock Section --- */
.clock-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.card-header-badge {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.digital-clock-display {
  font-family: var(--font-family-heading);
  font-size: 3.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin: 0.5rem 0 1rem 0;
  text-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem;
}

.clock-ampm {
  font-size: 1.25rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Active Alarm Indicator Tag */
.active-alarm-status {
  width: 100%;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.alarm-active-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
}

.ring-animation {
  font-size: 1.5rem;
  animation: bell-ring 2s infinite ease-in-out;
}

@keyframes bell-ring {
  0%, 100% { transform: rotate(0deg); }
  10%, 30%, 50%, 70% { transform: rotate(15deg); }
  20%, 40%, 60% { transform: rotate(-15deg); }
}

.alarm-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
}

.time-remaining-tag {
  display: block;
  font-size: 0.75rem;
  color: var(--accent-cyan);
}

/* --- Alarm Form & Inputs --- */
.alarm-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-inputs-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 500px) {
  .form-inputs-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

.input-group label {
  font-size: 0.9rem;
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.time-input-wrapper {
  position: relative;
}

.time-input,
.sound-select-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1.5px solid var(--card-border);
  color: #fff;
  font-family: var(--font-family-heading);
  font-size: 1.2rem;
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.25s ease;
  color-scheme: dark;
}

.time-input {
  font-size: 1.75rem;
}

.sound-select-input option {
  background: #0f172a;
  color: #fff;
}

.time-input:focus,
.sound-select-input:focus {
  border-color: var(--primary-violet);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

/* Modal Stats Badges */
.stats-badge-box {
  display: flex;
  gap: 0.85rem;
  width: 100%;
  justify-content: center;
  margin: 0.5rem 0;
}

.stat-badge {
  flex: 1;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
}

.stat-badge i {
  font-size: 1.5rem;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.stat-badge strong {
  font-size: 1rem;
  color: #fff;
}
  border-color: var(--primary-violet);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

.preset-buttons-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.preset-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.preset-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn-preset {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-preset:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--primary-violet);
  color: #fff;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

@media (min-width: 500px) {
  .form-actions {
    flex-direction: row;
  }
  .form-actions .btn { flex: 1; }
}

/* --- Button Component Styling --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-family-body);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-lg {
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--card-border);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.btn-outline-danger {
  background: transparent;
  border: 1px solid var(--danger-crimson);
  color: var(--danger-crimson);
}
.btn-outline-danger:hover {
  background: var(--danger-crimson);
  color: #fff;
}

.btn-outline-secondary {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text-muted);
}
.btn-outline-secondary:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text-main);
}

.btn-outline-light {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-main);
}
.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* --- Active Alarm Mode & Challenge Section --- */
.challenge-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  border: 2px solid var(--danger-crimson);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.25);
  animation: alarm-border-glow 2s infinite alternate;
}

@keyframes alarm-border-glow {
  0% { box-shadow: 0 0 15px rgba(239, 68, 68, 0.2); border-color: rgba(239, 68, 68, 0.7); }
  100% { box-shadow: 0 0 40px rgba(239, 68, 68, 0.5); border-color: rgba(239, 68, 68, 1); }
}

.alarm-alert-banner {
  background: var(--grad-danger);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  color: #fff;
}

.banner-pulse-icon {
  font-size: 2rem;
  animation: bounce-icon 1s infinite alternate;
}

@keyframes bounce-icon {
  from { transform: translateY(0); }
  to { transform: translateY(-5px); }
}

.alarm-banner-title {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
}

.alarm-banner-sub {
  font-size: 0.85rem;
  opacity: 0.95;
}

.challenge-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.challenge-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.challenge-tag {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
}

.target-item-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 1.1rem;
}

.target-item-badge strong {
  font-family: var(--font-family-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 50%, #06b6d4 100%);
  padding: 0.35rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: 0 0 25px rgba(236, 72, 153, 0.4);
  letter-spacing: 0.02em;
  animation: badge-pulse 2s infinite alternate;
}

@keyframes badge-pulse {
  from { transform: scale(1); box-shadow: 0 0 15px rgba(139, 92, 246, 0.4); }
  to { transform: scale(1.03); box-shadow: 0 0 30px rgba(6, 182, 212, 0.6); }
}

/* Confetti Overlay Canvas */
.confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 10000;
}

/* Radar Target Ring Overlay inside Camera Viewport */
.radar-target-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 180px;
  height: 180px;
  border: 2px dashed rgba(6, 182, 212, 0.7);
  border-radius: 50%;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: spin-radar 12s linear infinite;
}

@keyframes spin-radar {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.radar-crosshair {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: inset 0 0 15px rgba(139, 92, 246, 0.3);
}

.radar-text {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--accent-cyan);
  letter-spacing: 0.15em;
  background: rgba(15, 23, 42, 0.7);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.challenge-instruction {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* --- Camera & Predictions Grid --- */
.camera-predictions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .camera-predictions-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.camera-viewport-card {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.camera-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--danger-crimson);
}

.red-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--danger-crimson);
  animation: pulse-red 1s infinite;
}

@keyframes pulse-red {
  0% { opacity: 1; }
  50% { opacity: 0.3; }
  100% { opacity: 1; }
}

.webcam-container {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Webcam Element Dynamic Sizing */
.webcam-container canvas,
.webcam-container video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  transform: scaleX(-1); /* Mirror camera view for standard webcam UX */
}

.webcam-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-dim);
  text-align: center;
  padding: 1rem;
}

.webcam-placeholder p {
  font-size: 0.85rem;
}

/* Scanner Line FX */
.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  box-shadow: 0 0 10px var(--accent-cyan);
  animation: scan 2.5s infinite linear;
  pointer-events: none;
}

@keyframes scan {
  0% { top: 0; }
  100% { top: 100%; }
}

/* Hold Verification Meter Bar */
.hold-meter-wrapper {
  background: rgba(30, 41, 59, 0.5);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.hold-meter-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.hold-meter-bar-bg {
  width: 100%;
  height: 12px;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--card-border);
}

.hold-meter-bar-fill {
  height: 100%;
  background: var(--grad-success);
  width: 0%;
  transition: width 0.15s ease-out;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

.hold-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.35rem;
  text-align: center;
}

/* --- Predictions Feed Card --- */
.predictions-card {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.predictions-header {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 0.5rem;
}

.predictions-header h3 {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.confidence-info {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.predictions-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

/* Custom Scrollbar */
.predictions-list::-webkit-scrollbar {
  width: 5px;
}
.predictions-list::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
}
.predictions-list::-webkit-scrollbar-thumb {
  background: var(--card-border);
  border-radius: 999px;
}

.prediction-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.5rem 0.75rem;
  background: rgba(30, 41, 59, 0.4);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.prediction-item.is-target {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.4);
}

.prediction-item.is-match {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

.prediction-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
}

.prediction-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 999px;
  overflow: hidden;
}

.prediction-bar-fill {
  height: 100%;
  background: var(--primary-violet);
  width: 0%;
  transition: width 0.15s ease-out;
  border-radius: 999px;
}

.prediction-item.is-target .prediction-bar-fill {
  background: var(--grad-primary);
}

.prediction-item.is-match .prediction-bar-fill {
  background: var(--grad-success);
}

.challenge-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* --- Detectable Objects Chips --- */
.object-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.chip:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--primary-violet);
  transform: translateY(-1px);
}

.chip-icon {
  color: var(--accent-cyan);
}

.skeleton-chip {
  opacity: 0.6;
  font-style: italic;
}

/* --- Info & Guide Section --- */
.guide-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.guide-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 600px) {
  .guide-steps {
    grid-template-columns: 1fr 1fr;
  }
}

.guide-step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-violet);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.step-text a {
  color: var(--accent-cyan);
  text-decoration: none;
}
.step-text a:hover {
  text-decoration: underline;
}

.step-text code {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-family: monospace;
  color: #fff;
}

.custom-model-input-box {
  background: rgba(30, 41, 59, 0.5);
  border: 1px dashed var(--card-border);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.custom-model-input-box label {
  font-size: 0.85rem;
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
}

.url-input-flex {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.text-input {
  flex: 1;
  min-width: 240px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--card-border);
  color: #fff;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  outline: none;
  font-size: 0.85rem;
}

.text-input:focus {
  border-color: var(--primary-violet);
}

/* --- Modal Overlay & Dialog --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(6, 8, 16, 0.85);
  backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}

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

.modal-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  border: 1px solid var(--accent-emerald);
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-xl);
  padding: 2.25rem 2rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  animation: scaleUp 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleUp {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-icon-wrapper {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.15);
  border: 2px solid var(--accent-amber);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
}

.modal-card h2 {
  font-size: 1.6rem;
  font-weight: 800;
}

.modal-msg {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.modal-msg strong {
  color: var(--accent-emerald);
}

.modal-actions {
  width: 100%;
  margin-top: 0.5rem;
}

.modal-actions .btn {
  width: 100%;
}

/* --- Footer --- */
.app-footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.app-footer strong {
  color: var(--text-muted);
}
