:root {
  --bg: #1a1a2e;
  --surface: #16213e;
  --surface2: #0f3460;
  --text: #e0e0e0;
  --text2: #a0a0b0;
  --accent: #e94560;
  --accent-hover: #ff6b81;
  --border: #2a2a4a;
  --row-alt: rgba(255,255,255,0.03);
  --green: #2ecc71;
  --yellow: #f1c40f;
}
[data-theme="light"] {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --surface2: #e8e8e8;
  --text: #1a1a2e;
  --text2: #555;
  --accent: #e94560;
  --accent-hover: #d63851;
  --border: #ddd;
  --row-alt: rgba(0,0,0,0.03);
  --green: #27ae60;
  --yellow: #f39c12;
}

* { margin:0; padding:0; box-sizing:border-box; }
body { background:var(--bg); color:var(--text); font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif; min-height:100vh; }
.container { max-width:1060px; margin:0 auto; padding:20px 16px; }

/* Header */
header { margin-bottom:24px; border-bottom:1px solid var(--border); padding-bottom:16px; }
.header-top { display:flex; justify-content:space-between; align-items:center; }
.logo { font-size:1.5rem; font-weight:700; text-decoration:none; color:var(--text); }
nav { display:flex; align-items:center; gap:12px; }
.nav-link { color:var(--text2); text-decoration:none; font-size:0.95rem; padding:6px 12px; border-radius:8px; position:relative; }
.nav-link:hover { background:var(--surface); color:var(--text); }
.nav-link.active-nav { color:var(--accent); font-weight:600; }
.badge { position:absolute; top:-4px; right:-4px; background:var(--accent); color:#fff; font-size:0.7rem; padding:1px 6px; border-radius:10px; }
.subtitle { color:var(--text2); margin-top:6px; margin-bottom:16px; font-size:0.95rem; }
.theme-btn { background:none; border:none; font-size:1.3rem; cursor:pointer; padding:4px 8px; border-radius:8px; color:var(--text); }
.theme-btn:hover { background:var(--surface2); }

/* Search */
.search-box { background:var(--surface); padding:20px; border-radius:12px; border:1px solid var(--border); margin-bottom:20px; }
.search-row { display:flex; gap:10px; flex-wrap:wrap; }
.search-row input, .search-row select { flex:1; min-width:150px; padding:12px 14px; border-radius:8px; border:1px solid var(--border); background:var(--bg); color:var(--text); font-size:1rem; }
.search-row select { flex:0.5; min-width:120px; }
.search-row button, .btn-primary { padding:12px 24px; border-radius:8px; border:none; background:var(--accent); color:#fff; font-size:1rem; font-weight:600; cursor:pointer; white-space:nowrap; }
.search-row button:hover, .btn-primary:hover { background:var(--accent-hover); }

/* Status & Loader */
.status { padding:12px 16px; border-radius:8px; margin-bottom:16px; font-size:0.9rem; }
.status.error { background:#4a1525; color:#ff6b81; border:1px solid #6b2040; }
[data-theme="light"] .status.error { background:#ffe0e6; color:#c0392b; border-color:#f5c6cb; }
.loader { text-align:center; padding:40px; display:flex; flex-direction:column; align-items:center; gap:12px; color:var(--text2); }
.spinner { width:36px; height:36px; border:3px solid var(--border); border-top-color:var(--accent); border-radius:50%; animation:spin 0.8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

/* Results */
.results-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; flex-wrap:wrap; gap:8px; }
#count { font-weight:600; color:var(--text2); }
#exportBtn { padding:8px 16px; border-radius:8px; border:1px solid var(--border); background:var(--surface); color:var(--text); cursor:pointer; font-size:0.85rem; }
#exportBtn:hover { background:var(--surface2); }

.table-wrap { overflow-x:auto; border-radius:10px; border:1px solid var(--border); }
table { width:100%; border-collapse:collapse; font-size:0.9rem; }
th { background:var(--surface2); padding:12px 10px; text-align:left; font-weight:600; white-space:nowrap; }
td { padding:10px; border-top:1px solid var(--border); }
tr:nth-child(even) { background:var(--row-alt); }
a { color:var(--accent); text-decoration:none; }
a:hover { text-decoration:underline; }

.action-btns { display:flex; gap:6px; align-items:center; }
.action-btns button, .action-btns a { background:none; border:none; cursor:pointer; font-size:1.1rem; padding:4px; border-radius:4px; text-decoration:none; }
.action-btns button:hover, .action-btns a:hover { background:var(--surface2); }
.shortlist-btn { transition:transform 0.2s; }
.shortlist-btn.active { transform:scale(1.2); }

.load-more { display:block; margin:16px auto; padding:10px 24px; border-radius:8px; border:1px solid var(--border); background:var(--surface); color:var(--text); cursor:pointer; font-size:0.9rem; }
.load-more:hover { background:var(--surface2); }

/* Empty state */
.empty-state { text-align:center; padding:60px 20px; color:var(--text2); }
.empty-state p { margin-bottom:8px; }

/* Back button */
.back-btn { background:none; border:none; color:var(--text2); cursor:pointer; font-size:0.95rem; padding:8px 0; margin-bottom:16px; }
.back-btn:hover { color:var(--text); }

/* Detail page */
.detail-header { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:16px; flex-wrap:wrap; }
.detail-header h2 { font-size:1.6rem; }
.tag { display:inline-block; background:var(--surface2); padding:4px 12px; border-radius:20px; font-size:0.8rem; margin-top:6px; color:var(--text2); }
.detail-rating { text-align:right; }
.detail-rating .stars { font-size:1.4rem; color:var(--yellow); }
.detail-rating .count { font-size:0.85rem; color:var(--text2); }

.detail-meta { background:var(--surface); padding:16px 20px; border-radius:12px; border:1px solid var(--border); margin-bottom:24px; }
.detail-meta p { margin-bottom:6px; font-size:0.95rem; }

.detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.card { background:var(--surface); padding:20px; border-radius:12px; border:1px solid var(--border); }
.card h3 { margin-bottom:12px; font-size:1.1rem; }
.card.full-width { grid-column:1 / -1; }
.hint { font-size:0.82rem; color:var(--text2); margin-bottom:12px; }

/* Tags */
.tags { display:flex; flex-wrap:wrap; gap:8px; }
.tags .trait { background:var(--surface2); padding:6px 14px; border-radius:20px; font-size:0.85rem; }

/* Reviews */
.review { border-bottom:1px solid var(--border); padding:12px 0; }
.review:last-child { border-bottom:none; }
.review-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; }
.review-author { font-weight:600; font-size:0.9rem; }
.review-stars { color:var(--yellow); font-size:0.85rem; }
.review-text { font-size:0.9rem; color:var(--text2); line-height:1.5; }
.review-time { font-size:0.75rem; color:var(--text2); margin-top:4px; opacity:0.7; }
.no-reviews { color:var(--text2); font-style:italic; }

/* Prompt box */
.prompt-box { background:var(--bg); border:1px solid var(--border); border-radius:8px; padding:16px; position:relative; }
.prompt-box pre { white-space:pre-wrap; word-wrap:break-word; font-size:0.85rem; line-height:1.6; font-family:inherit; max-height:300px; overflow-y:auto; }
.copy-btn { margin-top:12px; padding:8px 16px; border-radius:6px; border:1px solid var(--border); background:var(--surface); color:var(--text); cursor:pointer; font-size:0.85rem; }
.copy-btn:hover { background:var(--surface2); }
.btn-row { display:flex; gap:8px; margin-top:12px; flex-wrap:wrap; }
.wa-send-btn { display:inline-block; padding:8px 16px; border-radius:6px; background:#25D366; color:#fff !important; font-size:0.85rem; text-decoration:none !important; font-weight:600; }
.wa-send-btn:hover { background:#1da851; }

/* Domains */
.domain-list { display:flex; flex-direction:column; gap:6px; }
.domain-item { display:flex; justify-content:space-between; align-items:center; padding:8px 12px; background:var(--bg); border-radius:8px; font-size:0.9rem; }
.domain-item .domain-name { font-family:monospace; font-weight:600; }
.domain-item .domain-type { font-size:0.75rem; color:var(--text2); }
.domain-item a { font-size:0.8rem; }

footer { text-align:center; margin-top:40px; padding:16px; color:var(--text2); font-size:0.85rem; }
.hidden { display:none !important; }

@media(max-width:700px) {
  .search-row { flex-direction:column; }
  .search-row select { flex:1; }
  .detail-grid { grid-template-columns:1fr; }
  .detail-header { flex-direction:column; }
  .detail-rating { text-align:left; }
  h2 { font-size:1.3rem; }
}
