* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

:root {
  --bg: #0a0a0a;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-border: rgba(255, 255, 255, 0.10);
  --amber: #f59e0b;
  --text: #f0f0f0;
  --text-muted: #888;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Views ─────────────────────────────────── */

.view {
  display: none;
  flex-direction: column;
  min-height: 100vh;
}

.view.active {
  display: flex;
  position: relative;
  z-index: 2;
  animation: fadeIn 0.2s ease;
}

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

/* ── Global Background ──────────────────────── */

.global-bg {
  position: fixed;
  inset: 0;
  background-image: url('images/bar-bg.jpg');
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.global-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.7) 100%
  );
  z-index: 1;
}

/* ── Landing ────────────────────────────────── */

.landing-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 2rem;
  text-align: center;
  gap: 1rem;
  min-height: 100vh;
}

.bar-name {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text);
}

.subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.landing-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 320px;
  margin-top: 1.5rem;
}

/* ── Buttons ────────────────────────────────── */

.btn {
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.15s, transform 0.1s;
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--amber);
  color: #0a0a0a;
}

.btn-secondary {
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--surface-border);
  color: var(--text);
}

.btn:hover:not(:disabled) {
  opacity: 0.85;
}

/* ── View Header ────────────────────────────── */

.view-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10;
}

.view-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.back-btn {
  background: none;
  border: none;
  color: var(--amber);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.25rem 0;
  white-space: nowrap;
}

/* ── Tabs ───────────────────────────────────── */

.tab-bar {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-bar::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex-shrink: 0;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.tab-btn.active {
  background: var(--amber);
  border-color: var(--amber);
  color: #0a0a0a;
}

/* ── Drink Cards ────────────────────────────── */

.drink-list {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.drink-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  transition: border-color 0.15s;
}

.drink-img {
  width: 120px;
  align-self: stretch;
  flex-shrink: 0;
  object-fit: cover;
}

.drink-info {
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.drink-card:hover {
  border-color: rgba(245, 158, 11, 0.3);
}

.drink-card h3 {
  font-size: 1rem;
  font-weight: 700;
}

.drink-desc {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.tag {
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.06);
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  color: var(--amber);
}

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

.empty-tab {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 2rem 1rem;
}

.btn-pedir {
  align-self: flex-start;
  margin-top: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--amber);
  color: #0a0a0a;
  border: none;
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.btn-pedir:active {
  transform: scale(0.96);
  opacity: 0.85;
}

/* ── Chat ───────────────────────────────────── */

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.message {
  max-width: 80%;
  padding: 0.75rem 1rem;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.message.user {
  background: var(--amber);
  color: #0a0a0a;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  font-weight: 600;
}

.message.model {
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--surface-border);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.input-area {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  bottom: 0;
}

.input-area input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
}

.input-area input:focus {
  border-color: var(--amber);
}

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