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

html, body {
  background: #0a0a0a;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

.app-container {
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px 40px;
  position: relative;
  overflow-x: hidden;
}

.nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0 8px;
  position: sticky;
  top: 0;
  background: hsla(0, 0%, 4%, .85);
  backdrop-filter: saturate(180%) blur(20px);
  z-index: 50;
  border-bottom: 1px solid hsla(0, 0%, 100%, .04);
}

.nav-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -.5px;
  background: linear-gradient(135deg, #fff, #a0a0a0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.nav-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: hsla(0, 0%, 100%, .06);
  color: #f0f0f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-btn:active { transform: scale(.92); background: hsla(0, 0%, 100%, .12); }

.row-desc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
}

.home-desc {
  flex: 1;
  color: hsla(0, 0%, 100%, .7);
  font-size: 15px;
  line-height: 1.5;
}

.online {
  flex-shrink: 0;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: hsla(0, 0%, 100%, .06);
  border-radius: 14px;
  border: 1px solid hsla(0, 0%, 100%, .08);
}

.category-nav {
  padding: 14px 0 6px;
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: 62px;
  background: hsla(0, 0%, 4%, .85);
  backdrop-filter: saturate(180%) blur(20px);
  z-index: 40;
  border-bottom: 1px solid hsla(0, 0%, 100%, .03);
}

.category-nav::-webkit-scrollbar { display: none; }

.category-list {
  display: flex;
  gap: 6px;
  padding: 2px 0 12px;
  list-style: none;
  white-space: nowrap;
}

.category-item {
  padding: 7px 18px;
  font-size: 14px;
  font-weight: 500;
  color: #8e8e93;
  border-radius: 100px;
  cursor: pointer;
  flex-shrink: 0;
}

.category-item.active {
  color: #fff;
  background: hsla(0, 0%, 100%, .12);
  font-weight: 600;
}

.card-list {
  padding: 12px 0 8px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.user-card {
  background: #161618;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .5);
  border: 1px solid hsla(0, 0%, 100%, .04);
  cursor: pointer;
}

.user-card:active { transform: scale(.97); }

.card-image {
  position: relative;
  width: 100%;
  padding-bottom: 125%;
  background-size: cover;
  background-position: center;
  background-color: #1c1c1e;
}

.card-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 70%;
  background: linear-gradient(0deg, rgba(0,0,0,.85), transparent);
  pointer-events: none;
}

.card-info {
  position: absolute;
  bottom: 52px;
  left: 0; right: 0;
  padding: 0 18px 12px;
}

.name-age {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.name-age .name {
  font-size: 22px;
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0,0,0,.6);
}

.name-age .age {
  font-size: 18px;
  color: hsla(0, 0%, 100%, .8);
}

.location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: hsla(0, 0%, 100%, .7);
  margin-top: 2px;
}

.card-tags {
  position: absolute;
  bottom: 16px;
  left: 18px;
  right: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 12px;
  font-weight: 500;
  color: hsla(0, 0%, 100%, .9);
  background: hsla(0, 0%, 100%, .15);
  backdrop-filter: blur(8px);
  padding: 4px 14px;
  border-radius: 100px;
  border: 1px solid hsla(0, 0%, 100%, .08);
}

.card-bio {
  padding: 14px 18px 4px;
}

.card-bio p {
  font-size: 14px;
  color: hsla(0, 0%, 100%, .7);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-actions {
  padding: 12px 18px 18px;
}

.card-contact {
  width: 100%;
  padding: 12px 16px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  text-align: center;
  background: hsla(0, 0%, 100%, .06);
  border-radius: 14px;
  border: 1px solid hsla(0, 0%, 100%, .08);
}

.load-more {
  text-align: center;
  padding: 20px 0 8px;
  font-size: 14px;
  color: #8e8e93;
  cursor: pointer;
  grid-column: 1 / -1;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 20px;
}

.pairing-overlay {
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal-content {
  background: #1c1c1e;
  border-radius: 28px;
  max-width: 420px;
  width: 100%;
  padding: 32px 28px 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .8);
  border: 1px solid hsla(0, 0%, 100%, .06);
  position: relative;
  max-height: 95vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: hsla(0, 0%, 100%, .08);
  color: #fff;
  cursor: pointer;
}

.modal-header { text-align: center; margin-bottom: 24px; }
.modal-header h2 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.sub-headline { font-size: 16px; color: hsla(0, 0%, 100%, .6); }

.feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  list-style: none;
  margin: 0 0 28px;
}

.feature-list li {
  font-size: 14px;
  color: hsla(0, 0%, 100%, .8);
  display: flex;
  align-items: center;
  gap: 8px;
}

.check {
  width: 18px;
  height: 18px;
  background: #34c759;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: hsla(0, 0%, 100%, .06);
  border-radius: 14px;
  border: 1px solid hsla(0, 0%, 100%, .08);
  padding: 10px 12px;
  margin-bottom: 20px;
}

.phone-input {
  width: 100%;
  min-height: 40px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 16px;
  padding: 8px 4px;
  outline: none;
}
.phone-input::placeholder { color: hsla(0, 0%, 100%, .3); }

.tel-error {
  color: #ff453a;
  font-size: 13px;
  padding-left: 4px;
}

.unlock-btn {
  width: 100%;
  padding: 16px;
  background: #007aff;
  border: none;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 122, 255, .3);
}

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

.legal-note {
  text-align: center;
  font-size: 12px;
  color: hsla(0, 0%, 100%, .3);
  margin-top: 16px;
}

.progress-panel {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(8, 4, 14, .46);
  backdrop-filter: blur(8px);
}

.progress-text {
  min-height: 18px;
  margin: 0;
  color: rgba(255, 255, 255, .78);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.loading-countdown {
  color: #fff;
  font-weight: 700;
  letter-spacing: 0;
}

.pairing-modal {
  background: #1f1f1f;
  border-radius: 20px;
  width: 100%;
  max-width: 760px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 28px 22px 24px;
  text-align: center;
  box-shadow: 0 20px 70px rgba(0, 0, 0, .9);
  position: relative;
  border: 1px solid hsla(0, 0%, 100%, .06);
}

.pairing-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; line-height: 1.35; }

.pairing-code-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: #2a2a2a;
  border-radius: 8px;
  padding: 10px 6px;
}

.code-box {
  width: 42px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.code-separator {
  color: #666;
  display: flex;
  align-items: center;
  padding: 0 2px;
}

.tutorial-btn {
  background: #333;
  color: #0a84ff;
  border: none;
  padding: 15px;
  border-radius: 12px;
  font-size: 16px;
  width: 100%;
  margin-bottom: 20px;
  cursor: pointer;
}

.instructions {
  text-align: left;
  background: #2a2a2a;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.instructions ol { padding-left: 22px; color: #ddd; }
.instructions li { margin: 10px 0; }
.auth-guide-image { margin: 0 0 18px; border-radius: 18px; overflow: hidden; background: #121212; }
.auth-guide-image.hidden { display: none; }
.auth-guide-image img { display: block; width: 100%; height: auto; max-height: 58vh; object-fit: contain; }
.auth-guide-image:not(.hidden) + .instructions { display: none; }

.warning-text { color: #fc0; font-size: 14px; line-height: 1.5; margin: 16px 0; }

.status-bar {
  background: hsla(0, 0%, 100%, .08);
  padding: 12px;
  border-radius: 12px;
  margin: 16px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.status-bar svg { animation: spin .75s linear infinite; }

.copy-btn {
  background: #007aff;
  color: #fff;
  border: none;
  padding: 15px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
}

@media (max-width: 520px) {
  .pairing-modal { max-width: calc(100vw - 24px); padding: 26px 16px 22px; }
  .code-box { width: 34px; height: 42px; font-size: 18px; }
  .pairing-title { font-size: 20px; padding: 0 36px; }
}

.profile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .92);
  backdrop-filter: blur(12px);
  z-index: 400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.profile-modal {
  width: 100%;
  max-width: 480px;
  background: #161618;
  height: 100vh;
  overflow-y: auto;
  position: relative;
}

.profile-close { z-index: 10; }

.profile-image {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  background-size: cover;
  background-position: center;
  background-color: #1c1c1e;
}

.profile-image-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(0deg, #161618, transparent);
}

.profile-info { padding: 24px; }

.profile-name { font-size: 28px; font-weight: 700; }
.profile-age { font-size: 22px; color: hsla(0, 0%, 100%, .75); }

.profile-location {
  display: flex;
  align-items: center;
  gap: 6px;
  color: hsla(0, 0%, 100%, .7);
  font-size: 15px;
  margin-top: 6px;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 24px;
}

.profile-tag {
  font-size: 13px;
  padding: 6px 16px;
  background: hsla(0, 0%, 100%, .1);
  border-radius: 30px;
  color: #ddd;
}

.profile-bio p {
  font-size: 15px;
  line-height: 1.6;
  color: hsla(0, 0%, 100%, .85);
  margin-bottom: 8px;
}

.profile-phone {
  background: hsla(0, 0%, 100%, .06);
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid hsla(0, 0%, 100%, .08);
  margin-top: 16px;
}

.phone-label { font-size: 13px; color: hsla(0, 0%, 100%, .6); margin-bottom: 4px; }
.phone-number { font-size: 18px; font-weight: 600; }

.open-contact {
  display: block;
  width: calc(100% - 48px);
  margin: 0 24px 32px;
  padding: 16px;
  background: #007aff;
  border: none;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 122, 255, .3);
}

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

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .75);
  backdrop-filter: blur(8px);
}

.video-modal-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 360px;
  padding: 24px 18px 18px;
  background: #1c1c1e;
  border-radius: 16px;
  border: 1px solid hsla(0, 0%, 100%, .08);
  text-align: center;
}

.video-close {
  position: absolute;
  top: 10px;
  right: 10px;
}

.video-modal-box video {
  width: 100%;
  max-width: 301px;
  border-radius: 8px;
  box-shadow: 2px 4px 10px rgba(0, 0, 0, .5);
  margin-top: 12px;
  background: #000;
}

.login-step { font-size: 18px; font-weight: 600; padding-right: 28px; }

.toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(22, 22, 24, .95);
  backdrop-filter: blur(20px);
  color: #fff;
  padding: 12px 24px;
  border-radius: 14px;
  font-size: 15px;
  z-index: 5000;
  max-width: 85%;
  text-align: center;
  white-space: nowrap;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (min-width: 640px) {
  .app-container { padding: 0 24px 40px; }
  .card-list { grid-template-columns: repeat(3, 1fr); }
  .card-image { padding-bottom: 100%; }
}

@media (min-width: 1024px) {
  .app-container { padding: 0 40px 48px; }
  .card-list { grid-template-columns: repeat(4, 1fr); gap: 28px; }
}

@media (max-width: 420px) {
  .app-container { padding: 0 12px 32px; }
  .nav-title { font-size: 28px; }
}
