/* Shared styles for login.html and account.html (same look as index.html). */
:root {
  --primary: #4F46E5;
  --secondary: #06B6D4;
  --accent: #A855F7;
  --dark: #0F172A;
  --dark-card: #1E293B;
  --dark-lighter: #273549;
  --border: #334155;
  --light: #F8FAFC;
  --muted: #94A3B8;
  --success: #22C55E;
  --warning: #EAB308;
  --error: #EF4444;
  --crypto: #F7931A;
  --gradient: linear-gradient(135deg, #2563EB, #06B6D4, #7C3AED);
  --glow-primary: 0 0 40px rgba(79, 70, 229, 0.3);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Montserrat', -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  background: var(--dark);
  color: var(--light);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--secondary); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }
main { flex: 1; padding: 112px 0 56px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 12px;
  font: 600 14px 'Montserrat', sans-serif;
  border: none; cursor: pointer; transition: transform .2s, box-shadow .2s, border-color .2s, opacity .2s;
  color: #fff; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }
.btn-primary { background: var(--gradient); box-shadow: var(--glow-primary); }
.btn-primary:not(:disabled):hover { transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--light); border: 1px solid var(--border); }
.btn-outline:not(:disabled):hover { border-color: var(--primary); }
.btn-crypto { background: var(--crypto); }
.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.link-btn { background: none; border: none; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--light); }

/* Navbar */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 14px 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo-wrap { display: flex; align-items: center; gap: 10px; }
.logo-wrap:hover { text-decoration: none; }
.logo-wrap img { width: 32px; height: 32px; }
.logo-text {
  font-size: 22px; font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.nav-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.nav-user { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; min-width: 0; }
.nav-user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.nav-user-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex-shrink: 0; }
@media (max-width: 600px) { .nav-user { display: none; } }
.lang-select {
  appearance: none; -webkit-appearance: none;
  padding: 7px 28px 7px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--dark) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2394A3B8' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--light); font: 600 13px 'Montserrat', 'PingFang SC', 'Microsoft YaHei', sans-serif; cursor: pointer;
}
.lang-select:focus { outline: none; border-color: var(--primary); }
.lang-select option { background: var(--dark-card); color: var(--light); }

/* Cards */
.card {
  background: var(--dark-card); border: 1px solid var(--border);
  border-radius: 20px; padding: 24px;
}
.card + .card { margin-top: 20px; }
.card-title {
  font-size: 12px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px;
}
.page-title { font-size: 28px; font-weight: 800; margin-bottom: 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Forms */
.auth-box { max-width: 420px; margin: 0 auto; }
.auth-box h1 { font-size: 26px; font-weight: 800; text-align: center; margin-bottom: 6px; }
.auth-box .subtitle { color: var(--muted); font-size: 14px; text-align: center; margin-bottom: 24px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 12px; background: var(--dark); border: 1px solid var(--border); margin-bottom: 22px; }
.tab { padding: 9px; border-radius: 9px; border: none; background: none; color: var(--muted); font: 600 13px 'Montserrat', sans-serif; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--dark-lighter); color: var(--light); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
.form-input {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--dark);
  color: var(--light); font: 14px 'Montserrat', sans-serif; outline: none; transition: border-color .2s;
}
.form-input:focus { border-color: var(--primary); }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.or-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 18px 0; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.google-btn { display: flex; justify-content: center; min-height: 44px; }
.app-handoff { text-align: center; }
.app-handoff .who { font-weight: 700; word-break: break-all; margin: 6px 0 18px; }
.app-handoff .btn + .link-btn { margin-top: 12px; }

/* Notices */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 13px; margin-bottom: 16px; border: 1px solid; }
.notice-info { background: rgba(6,182,212,.08); border-color: rgba(6,182,212,.35); color: #A5F3FC; }
.notice-ok { background: rgba(34,197,94,.08); border-color: rgba(34,197,94,.35); color: #BBF7D0; }
.notice-err { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.35); color: #FECACA; }
.notice-warn { background: rgba(234,179,8,.08); border-color: rgba(234,179,8,.35); color: #FEF08A; }

/* Account summary */
.summary { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: rgba(79,70,229,.2); display: flex; align-items: center; justify-content: center; font-weight: 800; color: #A5B4FC; flex-shrink: 0; }
.summary-main { flex: 1; min-width: 0; }
.summary-email { font-weight: 700; word-break: break-all; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.badge-free { background: rgba(148,163,184,.15); color: var(--muted); }
.badge-premium { background: rgba(168,85,247,.15); color: var(--accent); }

/* Plan and coin choices */
.step-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; margin: 4px 0 10px; }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.choice-grid.coins { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
@media (max-width: 640px) { .choice-grid { grid-template-columns: 1fr; } }
.choice {
  position: relative; background: var(--dark-lighter); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 12px; text-align: center; cursor: pointer;
  color: var(--light); font-family: inherit; transition: border-color .2s, box-shadow .2s;
}
.choice:hover { border-color: var(--primary); }
.choice[aria-pressed="true"] { border-color: var(--primary); box-shadow: var(--glow-primary); }
.choice-name { font-size: 14px; font-weight: 700; }
.choice-price { font-size: 26px; font-weight: 900; line-height: 1.3; }
.choice-sub { font-size: 11px; color: var(--muted); }
.choice-tag { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); background: var(--success); color: #052e16; font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.coins .choice { padding: 12px 8px; }
.coins .choice-name { font-size: 15px; }
.network-list { display: flex; flex-direction: column; gap: 6px; }
.network {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--dark); color: var(--muted); font: 600 13px 'Montserrat', sans-serif; cursor: pointer; text-align: left;
}
.network:hover { color: var(--light); }
.network:disabled { opacity: .55; cursor: not-allowed; }
.network:disabled:hover { color: inherit; }
.network small { font-size: 12px; font-weight: 500; color: var(--muted); }
.network[aria-pressed="true"] { border-color: var(--primary); color: var(--light); background: rgba(79,70,229,.12); }
/* As many equal columns as there are methods (one when only card or only crypto is configured). */
.methods { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; margin-top: 6px; }
@media (max-width: 640px) { .methods { grid-auto-flow: row; } }
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.step-head .title { font-weight: 700; }

/* Orders */
.orders { width: 100%; border-collapse: collapse; font-size: 13px; }
.orders th { text-align: left; font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 0 8px 8px; }
.orders td { padding: 10px 8px; border-top: 1px solid var(--border); }
.orders-wrap { overflow-x: auto; }
.status { font-weight: 700; }
.status-paid { color: var(--success); }
.status-pending, .status-processing { color: var(--warning); }
.status-failed, .status-expired, .status-refunded, .status-review { color: var(--error); }

/* Spinner */
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: spin .6s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); padding: 48px 0; }

/* Footer */

/* Privacy policy and terms */
.legal { max-width: 780px; margin: 0 auto; }
.legal h1 { font-size: clamp(22px, 6.5vw, 30px); font-weight: 800; margin-bottom: 6px; overflow-wrap: break-word; hyphens: auto; }
.legal { overflow-wrap: break-word; }
@media (max-width: 480px) { .legal.card { padding: 20px 16px; } }
.legal .updated { color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.legal h2 { font-size: 18px; font-weight: 700; margin: 30px 0 10px; }
/* Footer links jump to sections (#refunds…); keep the heading clear of the fixed navbar. */
.legal h2[id] { scroll-margin-top: 84px; }
.legal p, .legal li { font-size: 14.5px; line-height: 1.75; color: #CBD5E1; }
.legal p + p { margin-top: 10px; }
.legal ul { padding-left: 22px; margin: 8px 0; }
.legal li + li { margin-top: 4px; }
.legal strong { color: var(--light); }
.legal .note { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.agree { font-size: 12px; color: var(--muted); text-align: center; margin-top: 14px; }
.agree a { color: var(--secondary); }
