/* ============================================
   POLYSHARK HUNTER — STYLES
   ============================================ */

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

:root {
  --ps-deep:    #020b18;
  --ps-navy:    #041526;
  --ps-ocean:   #0a2540;
  --ps-teal:    #0d7c6e;
  --ps-cyan:    #1bbfa8;
  --ps-shark:   #7ee8d8;
  --ps-text:    #e8f4f2;
  --ps-muted:   #5a8a90;
  --ps-border:  rgba(27, 191, 168, 0.14);
  --ps-card:    rgba(10, 37, 64, 0.55);
  --ps-glow:    rgba(27, 191, 168, 0.08);
  --ps-amber:   #EF9F27;
  --ps-red:     #E24B4A;
  --ps-green:   #63C47D;
  --font:       'Space Grotesk', sans-serif;
  --mono:       'DM Mono', monospace;
  --radius:     10px;
  --radius-lg:  14px;
}

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--ps-deep);
  color: var(--ps-text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* ---- UTILITIES ---- */
.hidden { display: none !important; }

/* ---- LOGIN SCREEN ---- */
.login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ps-deep);
  z-index: 1000;
  overflow: hidden;
}

.login-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.login-wave {
  position: absolute;
  bottom: -60px;
  left: -10%;
  width: 120%;
  height: 300px;
  background: radial-gradient(ellipse at 50% 100%, rgba(27,191,168,0.08) 0%, transparent 70%);
  animation: waveDrift 8s ease-in-out infinite alternate;
}

.wave2 {
  bottom: -100px;
  animation-duration: 11s;
  animation-direction: alternate-reverse;
  opacity: 0.5;
}

@keyframes waveDrift {
  from { transform: translateX(-3%) scaleY(1); }
  to   { transform: translateX(3%) scaleY(1.1); }
}

.login-card {
  position: relative;
  background: rgba(4, 21, 38, 0.9);
  border: 1px solid var(--ps-border);
  border-radius: 20px;
  padding: 40px;
  width: 380px;
  max-width: 94vw;
  backdrop-filter: blur(20px);
  animation: fadeUp 0.5s ease forwards;
}

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

.login-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.logo-icon-lg {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #0d7c6e, #1bbfa8);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.login-brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--ps-shark);
  letter-spacing: -0.4px;
}

.login-sub {
  font-size: 12px;
  color: var(--ps-muted);
  margin-top: 2px;
}

.login-divider {
  height: 1px;
  background: var(--ps-border);
  margin-bottom: 24px;
}

.field-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ps-muted);
  margin-bottom: 7px;
}

.login-error {
  font-size: 12px;
  color: var(--ps-red);
  text-align: center;
  min-height: 18px;
  margin-top: 10px;
}

.login-footer {
  text-align: center;
  font-size: 11px;
  color: rgba(90,138,144,0.5);
  margin-top: 20px;
  font-family: var(--mono);
}

/* ---- APP LAYOUT ---- */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ---- SIDEBAR ---- */
.sidebar {
  width: 200px;
  flex-shrink: 0;
  background: rgba(4, 21, 38, 0.95);
  border-right: 1px solid var(--ps-border);
  display: flex;
  flex-direction: column;
  padding: 20px 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px 20px;
  border-bottom: 1px solid var(--ps-border);
  margin-bottom: 12px;
}

.logo-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #0d7c6e, #1bbfa8);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.logo-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--ps-shark);
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.sidebar-nav { flex: 1; padding: 0 10px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ps-muted);
  cursor: pointer;
  transition: all 0.18s;
  margin-bottom: 2px;
  position: relative;
}

.nav-item:hover { background: var(--ps-glow); color: var(--ps-text); }

.nav-item.active {
  background: rgba(27,191,168,0.12);
  color: var(--ps-cyan);
}

.nav-item svg { flex-shrink: 0; }

.badge {
  margin-left: auto;
  background: var(--ps-cyan);
  color: var(--ps-deep);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  font-family: var(--mono);
}

.sidebar-bottom {
  padding: 16px 18px 0;
  border-top: 1px solid var(--ps-border);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--ps-muted);
  font-family: var(--mono);
  margin-bottom: 10px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ps-cyan);
  animation: blink 2.2s infinite;
  flex-shrink: 0;
}

@keyframes blink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.25; }
}

.logout {
  font-size: 12px;
  color: rgba(90,138,144,0.6);
  cursor: pointer;
  transition: color 0.2s;
}

.logout:hover { color: var(--ps-red); }

/* ---- MAIN ---- */
.main {
  flex: 1;
  overflow-y: auto;
  background: var(--ps-deep);
  scrollbar-width: thin;
  scrollbar-color: var(--ps-border) transparent;
}

.tab-content { padding: 28px 32px; }
.tab-content.hidden { display: none; }
.tab-content.active { display: block; }

/* ---- PAGE HEADER ---- */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ps-shark);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.page-desc {
  font-size: 13px;
  color: var(--ps-muted);
}

.header-actions { display: flex; gap: 10px; align-items: center; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--ps-border);
  transition: all 0.18s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #0d7c6e, #1bbfa8);
  border-color: transparent;
  color: #020b18;
  font-weight: 600;
}

.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 4px 20px rgba(27,191,168,0.25); }

.btn-ghost {
  background: transparent;
  color: var(--ps-muted);
}

.btn-ghost:hover { color: var(--ps-text); border-color: rgba(27,191,168,0.3); background: var(--ps-glow); }

.btn-full { width: 100%; justify-content: center; }
.btn-sm { padding: 5px 12px; font-size: 12px; }

/* ---- INPUTS ---- */
input, select, textarea {
  background: rgba(4, 21, 38, 0.8);
  border: 1px solid var(--ps-border);
  border-radius: var(--radius);
  color: var(--ps-text);
  font-family: var(--font);
  font-size: 13px;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(27,191,168,0.5);
  box-shadow: 0 0 0 3px rgba(27,191,168,0.07);
}

input::placeholder { color: var(--ps-muted); }
select option { background: #041526; }

/* ---- FILTERS PANEL ---- */
.filters-panel {
  background: rgba(4, 21, 38, 0.5);
  border: 1px solid var(--ps-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}

.filters-row {
  display: grid;
  grid-template-columns: auto 1fr 1fr 1fr;
  gap: 16px;
  align-items: flex-start;
}

.filter-group { display: flex; flex-direction: column; gap: 8px; }

.filter-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ps-muted);
}

/* ---- PLATFORM PILLS ---- */
.platform-pills { display: flex; gap: 7px; flex-wrap: wrap; }

.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border-radius: 20px;
  border: 1px solid var(--ps-border);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
  color: var(--ps-muted);
  background: transparent;
  white-space: nowrap;
}

.platform-pill:hover { border-color: rgba(27,191,168,0.35); color: var(--ps-text); }

.platform-pill.active {
  border-color: var(--ps-cyan);
  color: var(--ps-cyan);
  background: rgba(27,191,168,0.09);
}

/* ---- HASHTAGS ---- */
.hashtag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.hashtag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(27,191,168,0.08);
  border: 1px solid rgba(27,191,168,0.2);
  font-size: 12px;
  color: var(--ps-shark);
  font-family: var(--mono);
}

.htag-x {
  cursor: pointer;
  color: var(--ps-muted);
  font-size: 14px;
  line-height: 1;
  margin-left: 2px;
}

.htag-x:hover { color: var(--ps-red); }

.hashtag-add-row { display: flex; gap: 6px; align-items: center; }
.hashtag-add-row input { width: 120px; }

/* ---- PROGRESS ---- */
.progress-container {
  background: rgba(4,21,38,0.5);
  border: 1px solid var(--ps-border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 16px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ps-muted);
  font-family: var(--mono);
  margin-bottom: 10px;
}

.progress-track {
  height: 4px;
  background: rgba(27,191,168,0.1);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--ps-teal), var(--ps-cyan));
  border-radius: 2px;
  transition: width 0.25s ease;
}

/* ---- RESULTS HEADER ---- */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.result-count {
  font-size: 24px;
  font-weight: 700;
  color: var(--ps-cyan);
  font-family: var(--mono);
  margin-right: 6px;
}

.result-label { font-size: 13px; color: var(--ps-muted); }

.results-controls { display: flex; gap: 8px; align-items: center; }

/* ---- RESULTS GRID ---- */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}

/* ---- INFLUENCER CARD ---- */
.inf-card {
  background: var(--ps-card);
  border: 1px solid var(--ps-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.inf-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--ps-cyan), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.inf-card:hover {
  border-color: rgba(27,191,168,0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(2,11,24,0.4);
}

.inf-card:hover::before { opacity: 1; }

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-user { display: flex; align-items: center; gap: 10px; }

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(27,191,168,0.12);
  border: 1px solid var(--ps-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--ps-cyan);
  flex-shrink: 0;
}

.card-name { font-size: 14px; font-weight: 600; color: var(--ps-text); }
.card-handle { font-size: 11px; color: var(--ps-muted); font-family: var(--mono); margin-top: 2px; }

.ai-score-box { text-align: right; }

.score-num {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--mono);
  line-height: 1;
}

.score-hi  { color: var(--ps-cyan); }
.score-mid { color: var(--ps-amber); }
.score-lo  { color: var(--ps-red); }

.score-lbl {
  font-size: 9px;
  color: var(--ps-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-top: 2px;
}

.card-bio {
  font-size: 12px;
  color: var(--ps-muted);
  line-height: 1.55;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.stat { text-align: center; }
.stat-val { font-size: 13px; font-weight: 600; color: var(--ps-text); font-family: var(--mono); }
.stat-key { font-size: 10px; color: var(--ps-muted); margin-top: 2px; }

.card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }

.tag {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--mono);
  font-weight: 500;
}

.tag-platform { background: rgba(27,191,168,0.1); color: var(--ps-cyan); border: 1px solid rgba(27,191,168,0.2); }
.tag-niche    { background: rgba(13,124,110,0.12); color: var(--ps-shark); border: 1px solid rgba(13,124,110,0.2); }

.card-contact {
  font-size: 11px;
  color: var(--ps-teal);
  font-family: var(--mono);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.card-actions {
  display: flex;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--ps-border);
}

.card-actions .btn { flex: 1; justify-content: center; font-size: 12px; padding: 6px 10px; }

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  grid-column: 1 / -1;
}

.empty-icon { font-size: 36px; margin-bottom: 14px; opacity: 0.35; }
.empty-title { font-size: 16px; font-weight: 600; color: var(--ps-text); margin-bottom: 8px; }
.empty-sub { font-size: 13px; color: var(--ps-muted); line-height: 1.6; max-width: 360px; margin: 0 auto; }

/* ---- MODAL ---- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2,11,24,0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  backdrop-filter: blur(4px);
}

.modal {
  background: #041526;
  border: 1px solid var(--ps-border);
  border-radius: 18px;
  padding: 28px;
  width: 500px;
  max-width: 95vw;
  max-height: 86vh;
  overflow-y: auto;
  animation: fadeUp 0.2s ease;
  scrollbar-width: thin;
  scrollbar-color: var(--ps-border) transparent;
}

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

.modal-title { font-size: 16px; font-weight: 600; color: var(--ps-shark); }

.modal-close {
  cursor: pointer;
  color: var(--ps-muted);
  font-size: 22px;
  line-height: 1;
  padding: 4px;
}

.modal-close:hover { color: var(--ps-text); }

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 9px 0;
  border-bottom: 1px solid rgba(27,191,168,0.07);
  font-size: 13px;
  gap: 12px;
}

.detail-key { color: var(--ps-muted); flex-shrink: 0; }
.detail-val { color: var(--ps-text); font-family: var(--mono); font-size: 12px; text-align: right; }

.ai-breakdown {
  background: rgba(10,37,64,0.5);
  border: 1px solid var(--ps-border);
  border-radius: 10px;
  padding: 16px;
  margin-top: 16px;
}

.ai-breakdown-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ps-muted);
  margin-bottom: 14px;
}

.ai-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
}

.ai-bar-label { font-size: 12px; color: var(--ps-muted); width: 100px; flex-shrink: 0; }

.ai-bar-track {
  flex: 1;
  height: 5px;
  background: rgba(27,191,168,0.08);
  border-radius: 3px;
  overflow: hidden;
}

.ai-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ps-teal), var(--ps-cyan));
  border-radius: 3px;
  transition: width 0.6s ease;
}

.ai-bar-val { font-size: 12px; font-family: var(--mono); color: var(--ps-cyan); width: 34px; text-align: right; }

.similar-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }

.similar-chip {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 12px;
  background: rgba(27,191,168,0.06);
  border: 1px solid var(--ps-border);
  color: var(--ps-muted);
  font-family: var(--mono);
}

/* ---- TRACKER TABLE ---- */
.tracker-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.tracker-table th {
  text-align: left;
  padding: 8px 14px;
  color: var(--ps-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 500;
  border-bottom: 1px solid var(--ps-border);
}

.tracker-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(27,191,168,0.05);
  vertical-align: middle;
}

.tracker-table tr:hover td { background: rgba(27,191,168,0.03); }

.status-select { width: auto; padding: 4px 8px; font-size: 11px; border-radius: 5px; }

/* ---- PLAYBOOK ---- */
.playbook-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.playbook-card {
  background: var(--ps-card);
  border: 1px solid var(--ps-border);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.playbook-card-wide { grid-column: 1 / -1; }

.playbook-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ps-shark);
  margin-bottom: 16px;
}

.playbook-steps {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 14px;
}

.playbook-steps li {
  font-size: 13px;
  color: var(--ps-muted);
  line-height: 1.5;
}

.playbook-steps strong { color: var(--ps-text); font-weight: 500; }

.playbook-steps code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ps-cyan);
  background: rgba(27,191,168,0.08);
  padding: 1px 5px;
  border-radius: 4px;
}

.playbook-tip {
  font-size: 12px;
  color: var(--ps-teal);
  background: rgba(13,124,110,0.1);
  border: 1px solid rgba(13,124,110,0.2);
  border-radius: 8px;
  padding: 10px 12px;
  line-height: 1.5;
}

.scoring-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.score-def {}
.score-def-label { font-size: 12px; font-weight: 600; color: var(--ps-cyan); margin-bottom: 5px; }
.score-def-desc  { font-size: 11px; color: var(--ps-muted); line-height: 1.55; }

/* ---- AI TOGGLE ---- */
.ai-toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(4,21,38,0.6);
  border: 1px solid var(--ps-border);
  border-radius: 8px;
  padding: 6px 12px;
}

.ai-toggle-label {
  font-size: 12px;
  color: var(--ps-muted);
  font-weight: 500;
  white-space: nowrap;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.toggle-switch input { display: none; }

.toggle-track {
  display: block;
  width: 36px;
  height: 20px;
  background: rgba(27,191,168,0.1);
  border: 1px solid var(--ps-border);
  border-radius: 20px;
  transition: background 0.2s, border-color 0.2s;
  position: relative;
}

.toggle-switch input:checked + .toggle-track {
  background: rgba(27,191,168,0.25);
  border-color: var(--ps-cyan);
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ps-muted);
  transition: transform 0.2s, background 0.2s;
}

.toggle-switch input:checked + .toggle-track .toggle-thumb {
  transform: translateX(16px);
  background: var(--ps-cyan);
}

.ai-toggle-status {
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 500;
  min-width: 20px;
}

.ai-toggle-status.off { color: var(--ps-muted); }
.ai-toggle-status.on  { color: var(--ps-cyan); }

/* ---- CANCEL BUTTON ---- */
.btn-cancel {
  background: rgba(226,75,74,0.08);
  border-color: rgba(226,75,74,0.35);
  color: #E24B4A;
  font-weight: 600;
}

.btn-cancel:hover {
  background: rgba(226,75,74,0.15);
  border-color: rgba(226,75,74,0.6);
  transform: none;
}

@media (max-width: 900px) {
  .filters-row { grid-template-columns: 1fr 1fr; }
  .playbook-grid { grid-template-columns: 1fr; }
  .playbook-card-wide { grid-column: 1; }
  .scoring-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .sidebar { display: none; }
  .tab-content { padding: 18px 16px; }
  .filters-row { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: 1fr; }
}
