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

:root {
  --bg: #0d0d0f;
  --surface: #18181b;
  --border: #2a2a2e;
  --accent: #7c6af7;
  --accent-dim: rgba(124, 106, 247, 0.15);
  --text: #f4f4f5;
  --muted: #71717a;
  --radius: 14px;
  --font: 'Inter', system-ui, sans-serif;
}

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Hero / search ── */
.page {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 80px 16px 40px;
  transition: padding 0.3s ease;
}

.page.compact {
  padding: 28px 16px 20px;
}

.hero {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.logo {
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #a78bfa, #7c6af7, #5eead4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

/* ── Search form ── */
.search-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: flex-end;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 12px 12px 16px;
  gap: 8px;
  transition: border-color 0.2s;
}

.input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  resize: none;
  max-height: 160px;
  overflow-y: auto;
}

.search-input::placeholder { color: var(--muted); }

.search-btn {
  flex-shrink: 0;
  background: var(--accent);
  border: none;
  border-radius: 9px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.search-btn:hover { opacity: 0.85; }
.search-btn:active { transform: scale(0.95); }
.search-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Filters ── */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.85rem;
  padding: 6px 10px;
  cursor: pointer;
  transition: border-color 0.2s;
  flex: 1;
  min-width: 100px;
}

.filter-select:focus { outline: none; border-color: var(--accent); }
.filter-select:disabled { opacity: 0.4; cursor: not-allowed; }
.filter-select option { background: #1c1c1e; }

/* ── Loading ── */
.loading {
  display: flex;
  gap: 6px;
  padding: 24px;
  justify-content: center;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: bounce 1.2s ease-in-out infinite;
}

.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ── Results ── */
.results-section {
  width: 100%;
  max-width: 680px;
  padding: 0 16px 60px;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--muted);
}

.sort-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sort-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.82rem;
  padding: 4px 8px;
  cursor: pointer;
}

.sort-select:focus { outline: none; border-color: var(--accent); }
.sort-select option { background: #1c1c1e; }

.results-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Card ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: border-color 0.2s, transform 0.15s;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.card-body { flex: 1; min-width: 0; }

.card-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.card-name {
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-price {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.card-location {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  display: flex;
  gap: 12px;
  font-size: 0.8rem;
  margin-bottom: 10px;
}

.card-rating { color: #fbbf24; }
.card-vibe   { color: var(--accent); }

/* ── Card actions (votos + reportar) ── */
.card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-vote {
  display: flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.78rem;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-vote:hover { border-color: var(--accent); color: var(--text); }

.btn-like.active  { background: rgba(52, 211, 153, 0.15); border-color: #34d399; color: #34d399; }
.btn-dislike.active { background: rgba(248, 113, 113, 0.15); border-color: #f87171; color: #f87171; }

.btn-correction {
  display: flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 4px 6px;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: var(--font);
  margin-left: auto;
  transition: color 0.15s;
}

.btn-correction:hover { color: #fbbf24; }

/* ── Sugerir hotel button ── */
.results-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-suggest-hotel {
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--accent);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 5px 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-suggest-hotel:hover { background: rgba(124, 106, 247, 0.28); }

.card-link {
  flex-shrink: 0;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}

.card-link:hover { background: rgba(124, 106, 247, 0.28); }

.card-link.no-link {
  opacity: 0.3;
  pointer-events: none;
}

/* ── Modal ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 101;
  padding: 16px;
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  width: 100%;
  max-width: 520px;
  max-height: 90dvh;
  overflow-y: auto;
  position: relative;
}

.modal-box h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.modal-desc {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 20px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

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

/* ── Forms ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group label {
  font-size: 0.82rem;
  color: var(--muted);
}

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 8px 12px;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea { resize: vertical; }
.form-group select option { background: #1c1c1e; }

.btn-submit {
  width: 100%;
  background: var(--accent);
  border: none;
  border-radius: 9px;
  color: #fff;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 10px;
  cursor: pointer;
  margin-top: 4px;
  transition: opacity 0.15s;
}

.btn-submit:hover   { opacity: 0.85; }
.btn-submit:disabled { opacity: 0.4; cursor: not-allowed; }

.form-feedback {
  font-size: 0.85rem;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.feedback-ok  { background: rgba(52, 211, 153, 0.1); color: #34d399; }
.feedback-err { background: rgba(248, 113, 113, 0.1); color: #f87171; }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 32px 0;
  font-size: 0.95rem;
}

/* ── Utilities ── */
.hidden { display: none !important; }

/* ── Responsive ── */
@media (max-width: 480px) {
  .logo { font-size: 1.9rem; }
  .card { flex-direction: column; align-items: flex-start; }
  .card-link { align-self: flex-end; }
  .form-row { grid-template-columns: 1fr; }
  .results-header-actions { gap: 8px; }
}
