/* ===== CraveIQ Stylesheet ===== */
:root {
  --cyan: #22d3ee;
  --teal: #14b8a6;
  --purple: #a855f7;
  --border: rgba(34, 211, 238, 0.12);
  --card: #151d33;
  --bg: #0a0e1a;
  --input: #0f1525;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: #e2e8f0;
  min-height: 100vh;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(34, 211, 238, 0.3); border-radius: 4px; }

/* ── Animations ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes gradBg {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 15px rgba(34, 211, 238, 0.15); }
  50%       { box-shadow: 0 0 30px rgba(34, 211, 238, 0.3); }
}

.anim-fade { animation: fadeIn 0.4s ease both; }

/* ── Cards ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  animation: fadeIn 0.4s ease both;
}
.card:hover { border-color: rgba(34, 211, 238, 0.25); }

/* ── Inputs ── */
.input-dark {
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  color: #e2e8f0;
  font-size: 14px;
  width: 100%;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input-dark:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}

/* ── Buttons ── */
.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  color: #0a0e1a;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(34, 211, 238, 0.3);
}
.btn-secondary {
  background: rgba(34, 211, 238, 0.08);
  color: var(--cyan);
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
}
.btn-secondary:hover { background: rgba(34, 211, 238, 0.15); }
.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.2); }

/* ── Nav Tabs ── */
.tab-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  border: none;
  color: #94a3b8;
  transition: all 0.2s;
  white-space: nowrap;
}
.tab-btn.active { background: rgba(34, 211, 238, 0.12); color: var(--cyan); }
.tab-btn:hover:not(.active) { color: #e2e8f0; }

/* ── Modals ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-content {
  background: #151d33;
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 28px;
  animation: fadeIn 0.3s ease;
}

/* ── Emoji / Stars / Chips ── */
.emoji-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 2px solid transparent;
  background: rgba(34, 211, 238, 0.06);
  cursor: pointer;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.emoji-btn:hover, .emoji-btn.sel {
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.15);
}
.star { cursor: pointer; font-size: 22px; color: #334155; transition: color 0.15s; }
.star.filled { color: #f59e0b; }
.chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  margin: 1px;
}

/* ── Dropdown ── */
.dropdown-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #1c2744;
  border: 1px solid var(--border);
  border-radius: 10px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}
.dropdown-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(34, 211, 238, 0.06);
}
.dropdown-item:hover { background: rgba(34, 211, 238, 0.08); }

/* ── Deficiency Cards ── */
.deficiency-card {
  background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(168,85,247,0.06));
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 14px;
  padding: 18px;
}

/* ── Settings Tabs ── */
.settings-tab {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  border: none;
  color: #94a3b8;
  transition: all 0.2s;
}
.settings-tab.active { background: rgba(34, 211, 238, 0.12); color: var(--cyan); }

/* ── Password Strength ── */
.pw-strength {
  height: 4px;
  border-radius: 2px;
  background: #1e293b;
  margin-top: 6px;
  overflow: hidden;
}
.pw-strength-bar { height: 100%; border-radius: 2px; transition: width 0.3s, background 0.3s; }

/* ── Login ── */
.login-gradient {
  background: linear-gradient(135deg, #0a0e1a, #1a1040, #0a2540, #0a0e1a);
  background-size: 400% 400%;
  animation: gradBg 12s ease infinite;
}

/* ── Research ── */
.search-result-card {
  background: rgba(34, 211, 238, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 10px;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  #login-grid { grid-template-columns: 1fr !important; }
  .modal-content { padding: 18px; }
}
