:root {
  --bg: #0f1115;
  --panel: #151922;
  --panel-soft: #13161c;
  --panel-2: #0f131a;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --gold: #f5c249;
  --ok: #4ade80;
  --danger: #ff6b6b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

html {
  scrollbar-gutter: stable;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

a,
a:visited,
a:active,
a:hover {
  color: inherit;
  text-decoration: none;
}

.nav-root {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background-color: #0f1115;
  background-image: none;
  border-bottom: 1px solid var(--line);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1;
}

.nav-container {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
}

.nav-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-main {
  flex: 0 0 auto;
  min-width: 0;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  transition: 0.18s ease;
  line-height: 1.15;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-btn.is-active {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.03);
  color: var(--gold);
}

.profile-pill,
.login-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 800;
  color: #000;
  background: var(--gold);
  border: 1px solid var(--gold);
  white-space: nowrap;
  line-height: 1.1;
}

.profile-pill:hover,
.login-pill:hover {
  filter: brightness(0.95);
}

.app-shell {
  max-width: 1160px;
  margin: 0 auto;
  padding: 108px 16px 42px;
}

.kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--gold);
  margin-bottom: 8px;
}

.page-title {
  font-size: 34px;
  line-height: 1.16;
  font-weight: 300;
  margin: 0 0 10px;
}

.page-desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.ycut-card {
  background: linear-gradient(180deg, rgba(21, 25, 34, 0.98), rgba(14, 18, 25, 0.98));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.ycut-card + .ycut-card {
  margin-top: 14px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--muted-2);
  margin-bottom: 6px;
}

input,
select,
textarea,
button {
  font: inherit;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 12px;
  padding: 13px 14px;
  outline: none;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(245, 194, 73, 0.5);
  box-shadow: 0 0 0 2px rgba(245, 194, 73, 0.15);
}

.textarea {
  min-height: 110px;
  resize: vertical;
}

.btn {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 13px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2px;
  transition: 0.16s ease;
}

.btn-primary {
  background: var(--gold);
  color: #111;
  border-color: var(--gold);
}

.btn-primary:hover {
  filter: brightness(0.95);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  color: #dce4ef;
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
}

.btn-success {
  background: #1f8f47;
  border-color: #1f8f47;
  color: #fff;
}

.btn-danger {
  background: transparent;
  border-color: rgba(255, 107, 107, 0.6);
  color: #ff8f8f;
}

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

.note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.note.gold {
  color: var(--gold);
}

.notice {
  background: rgba(245, 194, 73, 0.12);
  border: 1px solid rgba(245, 194, 73, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
}

.notice-title {
  font-size: 12px;
  color: var(--gold);
  font-weight: 800;
}

.notice-copy {
  margin-top: 4px;
  font-size: 12px;
  color: #cbd5e1;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: #0a0c10;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gold);
  transition: width 0.35s ease;
}

.progress-text {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
}

.result-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 11px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  padding: 16px;
  z-index: 10020;
}

.modal.open {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 460px;
  background: #13161c;
  border: 1px solid rgba(245, 194, 73, 0.35);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.gift-pop-overlay {
  position: fixed;
  inset: 0;
  z-index: 10030;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.72);
}

.gift-pop-overlay.open {
  display: flex;
}

.gift-pop-card {
  width: 100%;
  max-width: 460px;
  background: linear-gradient(180deg, #161a22, #10151e);
  border: 1px solid rgba(245, 194, 73, 0.45);
  border-radius: 18px;
  padding: 20px 18px 16px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
  position: relative;
  overflow: hidden;
}

.gift-pop-card::before,
.gift-pop-card::after {
  content: "";
  position: absolute;
  top: -18px;
  width: 76px;
  height: 44px;
  background: rgba(245, 194, 73, 0.16);
  border: 1px solid rgba(245, 194, 73, 0.3);
}

.gift-pop-card::before {
  left: -26px;
  transform: rotate(-24deg);
}

.gift-pop-card::after {
  right: -26px;
  transform: rotate(24deg);
}

.gift-pop-head {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.gift-pop-box {
  width: 56px;
  height: 46px;
  border-radius: 10px;
  background: linear-gradient(180deg, #f7cc5d, #f2b932);
  border: 1px solid rgba(255, 240, 190, 0.55);
  position: relative;
  box-shadow: 0 10px 24px rgba(245, 194, 73, 0.28);
}

.gift-pop-box::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 9px;
  height: 100%;
  background: rgba(255, 255, 255, 0.72);
  transform: translateX(-50%);
}

.gift-pop-box::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -11px;
  width: 30px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.85);
  border-top: none;
  border-radius: 0 0 18px 18px;
  transform: translateX(-50%);
}

.gift-pop-title {
  font-size: 21px;
  font-weight: 800;
  color: #f5c249;
  letter-spacing: 0.4px;
  margin: 0;
}

.gift-pop-sub {
  margin: 0;
  color: #cbd5e1;
  font-size: 13px;
  text-align: center;
  line-height: 1.45;
}

.gift-pop-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.gift-pop-offer {
  border: 1px solid rgba(245, 194, 73, 0.34);
  border-radius: 11px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #f8fafc;
  background: rgba(245, 194, 73, 0.08);
  font-size: 12px;
  font-weight: 700;
}

.gift-pop-offer:hover {
  background: rgba(245, 194, 73, 0.16);
}

.gift-pop-discount {
  color: #f5c249;
  font-weight: 900;
}

.gift-pop-actions {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.gift-pop-close {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 14px;
  cursor: pointer;
}

.gift-pop-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.hr {
  border: none;
  height: 1px;
  background: var(--line);
  margin: 14px 0;
}

@media (max-width: 900px) {
  .nav-root {
    position: sticky;
  }

  .nav-container {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 8px 10px;
  }

  .nav-group {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
  }

  .nav-auth {
    border-top: 1px solid var(--line);
    padding-top: 8px;
  }

  .nav-btn {
    font-size: 11px;
    padding: 6px 10px;
  }

  .app-shell {
    padding-top: 22px;
  }

  .page-title {
    font-size: 28px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 901px) {
  html {
    overflow-y: scroll;
  }
}
