

:root {
  --bg: #171412;
  --bg-card: #221d18;
  --text: #f2ece1;
  --muted: #a3988a;
  --accent: #d99e5a;
  --accent2: #cf7f55;
  --accent-rgb: 217, 158, 90;
  --btn-text: #221608;
  --grad: linear-gradient(135deg, #d99e5a, #cf7f55);
  --font-display: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
  --font-body: 'Figtree', 'Segoe UI', sans-serif;
}

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


[hidden] { display: none !important; }


.icon {
  width: 24px; height: 24px;
  display: block;
  flex-shrink: 0;
}
.icon-inline { display: inline; width: 14px; height: 14px; vertical-align: -2px; }


html { background: #12100d; }
body.app-body {
  max-width: 430px;
  width: 100%;
  margin: 0 auto;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.85);
}
@media (min-width: 480px) {
  body.app-body {
    border-left: 1px solid rgba(255,255,255,0.06);
    border-right: 1px solid rgba(255,255,255,0.06);
  }
}

body.app-body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

body.app-body h1, body.app-body h2, body.app-body h3 { font-family: var(--font-display); letter-spacing: -0.01em; }


.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 8px;
  padding-top: calc(16px + env(safe-area-inset-top));
}
.logo-mini { display: flex; }
.logo-mini img { border-radius: 8px; }
.app-topbar h1 {
  font-size: 20px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}
.icon-btn {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text);
  width: 38px; height: 38px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.1s;
}
.icon-btn:hover { background: rgba(255,255,255,0.08); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn .icon { width: 20px; height: 20px; }


.deck {
  flex: 1;
  position: relative;
  padding: 12px 16px;
  overflow: hidden;
}

.card {
  position: absolute;
  inset: 12px 16px;
  background: var(--bg-card);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  transition: transform 0.3s ease, opacity 0.3s ease;
  touch-action: pan-y;
}
.card.swiping-left { transform: translateX(-120%) rotate(-20deg); opacity: 0; }
.card.swiping-right { transform: translateX(120%) rotate(20deg); opacity: 0; }
.card.swiping-up { transform: translateY(-120%) scale(0.9); opacity: 0; }

.card-img {
  height: 68%;
  border-radius: 24px 24px 0 0;
  overflow: hidden;
  background: linear-gradient(160deg, #2b231b, #221d18);
  position: relative;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}


.card-actions {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 5;
  display: flex;
  gap: 10px;
}
.card-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: rgba(21, 18, 16, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s, background 0.15s;
}
.card-btn .icon { width: 20px; height: 20px; }
.card-btn:active { transform: scale(0.86); }
.card-btn.fav-active { background: var(--grad); color: var(--btn-text); }
.card-btn.pulse { animation: btnPulse 0.45s ease; }
@keyframes btnPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.25); }
  100% { transform: scale(1); }
}
.card-info { padding: 16px 20px; }
.card-info h2 { font-size: 24px; display: flex; align-items: baseline; gap: 10px; }
.card-info .dist { font-size: 14px; color: var(--muted); font-weight: 400; }
.card-info p { color: var(--muted); margin-top: 4px; font-size: 15px; }


.actions {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 16px 0 24px;
}
.action-btn {
  width: 60px; height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.action-btn:hover { transform: translateY(-2px) scale(1.05); }
.action-btn:hover.like { box-shadow: 0 10px 24px rgba(0,0,0,0.4); }
.action-btn:active { transform: scale(0.9); }
.action-btn .icon { width: 26px; height: 26px; }
.action-btn.pass { background: #2b231b; color: #e07a6a; }
.action-btn.like { background: var(--grad); color: var(--btn-text); }
.action-btn.like .icon { width: 30px; height: 30px; }
.action-btn.star { background: #2b231b; color: #e8c27a; }


.bottom-nav {
  display: flex;
  justify-content: space-around;
  padding: 10px 0 calc(14px + env(safe-area-inset-bottom));
  background: var(--bg-card);
  border-top: 1px solid rgba(255,255,255,0.06);
}
.tab {
  background: none;
  border: none;
  padding: 6px 18px;
  cursor: pointer;
  opacity: 0.62;
  color: #b9b0cc;
  transition: opacity 0.2s, transform 0.2s, color 0.2s;
  position: relative;
}
.tab .icon { width: 24px; height: 24px; }
.tab:hover { opacity: 0.9; }
.tab.active {
  opacity: 1;
  color: var(--accent);
  transform: translateY(-2px);
}
.tab-badge {
  position: absolute;
  top: 0; right: 10px;
  min-width: 17px; height: 17px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--btn-text);
  font-size: 11px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}


.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  animation: screenIn 0.22s ease;
}
@keyframes screenIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  scrollbar-width: none;
}
.scroll::-webkit-scrollbar { display: none; }

.screen-empty {
  text-align: center;
  padding: 25% 24px 0;
  color: var(--muted);
}
.screen-empty .icon { width: 48px; height: 48px; margin: 0 auto 16px; opacity: 0.6; }
.screen-empty h3 { color: var(--text); font-size: 19px; margin-bottom: 6px; }
.screen-empty p { font-size: 14px; line-height: 1.5; }


.like-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 12px 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.15s;
}
.like-item:active { transform: scale(0.98); }
.like-item:hover { border-color: rgba(var(--accent-rgb), 0.4); }
.like-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: linear-gradient(160deg, #2b231b, #221d18);
}
.like-item h3 { font-size: 16px; flex: 1; }
.like-item small { display: block; color: var(--muted); font-size: 12px; }
.like-remove {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.1s;
}
.like-remove:active { transform: scale(0.88); }
.like-remove .icon { width: 16px; height: 16px; }


.ct-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.ct-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.ct-head h2 { font-size: 17px; flex: 1; }
.ct-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: none;
}
.ct-msgs::-webkit-scrollbar { display: none; }
.ct-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.45;
  animation: ctIn 0.2s ease;
}
@keyframes ctIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ct-bubble.them { align-self: flex-start; background: var(--bg-card); border: 1px solid rgba(255,255,255,0.06); }
.ct-bubble.me { align-self: flex-end; background: var(--grad); color: var(--btn-text); }
.ct-input {
  display: flex;
  gap: 10px;
  padding: 10px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.ct-input input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  padding: 12px 18px;
  outline: none;
}
.ct-input input:focus { border-color: rgba(var(--accent-rgb), 0.6); }
.ct-input button {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--grad);
  color: var(--btn-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.12s;
}
.ct-input button:active { transform: scale(0.88); }
.chat-item { cursor: pointer; }
.chat-item .ct-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


.profile-card {
  text-align: center;
  padding: 20px 0 4px;
}
.profile-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 14px;
  border: 3px solid var(--grad);
  background: linear-gradient(160deg, #2b231b, #221d18);
}
.profile-card h2 { font-size: 24px; }
.profile-card p { color: var(--muted); font-size: 14px; }
.profile-section {
  margin-top: 18px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  overflow: hidden;
}
.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 15px;
}
.profile-row:last-child { border-bottom: none; }
.profile-row > span {
  display: flex;
  align-items: center;
  gap: 10px;
}
.profile-row button.action-row {
  background: none;
  border: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  padding: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}
.profile-row .icon { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.profile-row .danger { color: #ff5a5a; }
.switch {
  position: relative;
  width: 46px; height: 26px;
  border-radius: 13px;
  background: #3a3348;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}
.switch.on { background: var(--grad); }
.switch.on::after { transform: translateX(20px); }


#app-toast {
  position: fixed;
  left: 50%;
  bottom: 110px;
  transform: translateX(-50%) translateY(12px);
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 1200;
  white-space: nowrap;
}
#app-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.icon.flip { transform: scaleX(-1); }


.offer-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 8, 18, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: offerFade 0.25s ease;
}
@keyframes offerFade { from { opacity: 0; } to { opacity: 1; } }

.offer-box {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 28px 24px 22px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  position: relative;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: scale(0.92) translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
.offer-box.open { opacity: 1; transform: scale(1) translateY(0); }

.offer-close {
  position: absolute;
  top: 10px; right: 10px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 8px;
  display: flex;
  transition: color 0.15s;
}
.offer-close:hover { color: var(--text); }
.offer-close .icon { width: 18px; height: 18px; }

.offer-logo {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 18px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
}
.offer-logo .icon { width: 28px; height: 28px; color: var(--btn-text); }

.offer-box h2 { font-size: 22px; margin-bottom: 6px; }
.offer-sub { color: var(--muted); font-size: 14px; margin-bottom: 20px; }

.offer-step h3 {
  font-size: 15px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
}
.offer-step.step-in { animation: offerStepIn 0.3s ease; }
@keyframes offerStepIn {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: translateX(0); }
}

.offer-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.offer-opt {
  background: #292218;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px 4px 12px;
  cursor: pointer;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.offer-opt .icon { width: 26px; height: 26px; color: var(--muted); transition: color 0.15s; }
.offer-opt:hover { border-color: rgba(var(--accent-rgb), 0.5); }
.offer-opt:hover .icon { color: var(--text); }
.offer-opt:active { transform: scale(0.95); }
.offer-opt.selected {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
}
.offer-opt.selected .icon { color: var(--accent); }

#offer-register {
  width: 100%;
  margin-top: 4px;
  background: var(--grad);
  color: var(--btn-text);
  border: none;
  padding: 15px 32px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
#offer-register:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35); }
#offer-register:active { transform: translateY(0); }
#offer-register:disabled { opacity: 0.7; cursor: default; transform: none; }


.offer-install { margin-bottom: 18px; }
.offer-install-icon {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  border-radius: 20px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
}
.offer-install-icon .icon { width: 30px; height: 30px; color: var(--btn-text); }
.offer-install-text { color: var(--muted); font-size: 14px; margin-top: 6px; line-height: 1.5; }

#offer-continue {
  width: 100%;
  margin-top: 4px;
  background: var(--grad);
  color: var(--btn-text);
  border: none;
  padding: 15px 32px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}
#offer-continue:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35); }
#offer-continue:active { transform: translateY(0); }

.offer-note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}
