/* ──────────────────────────────────────────────────────────────
   Monero247 — Design: strict minimalism, like codefor.food
   Palette: near-black background, warm whites, subtle XMR orange
   ────────────────────────────────────────────────────────────── */

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

:root {
  --bg:          #0f0f0f;
  --surface:     #161616;
  --surface-2:   #1d1d1d;
  --border:      #272727;
  --border-2:    #333;
  --text:        #f0ece6;
  --text-muted:  #7a7370;
  --text-faint:  #444;
  --accent:      #f26822;   /* XMR orange */
  --accent-dim:  rgba(242, 104, 34, 0.12);
  --accent-glow: rgba(242, 104, 34, 0.25);
  --green:       #4ebd7e;
  --red:         #e05c5c;
  --font:        'Inter', system-ui, -apple-system, sans-serif;
  --radius:      12px;
  --radius-sm:   8px;
  --transition:  0.18s ease;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Layout ──────────────────────────────────────────────────── */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 0 4rem;
  gap: 2.5rem;
}

/* ── Header ──────────────────────────────────────────────────── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-icon {
  color: var(--accent);
  font-size: 1.2rem;
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.logo-text .accent {
  color: var(--accent);
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  width: 100%;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--text);
}

.hero-title em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* ── Card ────────────────────────────────────────────────────── */
.card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── Form fields ─────────────────────────────────────────────── */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.input-row {
  position: relative;
  display: flex;
  align-items: center;
}

.input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -moz-appearance: textfield;
}

.input::-webkit-outer-spin-button,
.input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

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

.input-row .input {
  padding-right: 4rem;
}

.input-badge {
  position: absolute;
  right: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  pointer-events: none;
}

.textarea {
  resize: none;
  font-size: 0.85rem;
  font-family: 'SFMono-Regular', 'Consolas', monospace;
  line-height: 1.5;
}

/* ── Currency tabs ───────────────────────────────────────────── */
.currency-tabs {
  display: flex;
  gap: 0.5rem;
}

.tab {
  padding: 0.5rem 1.25rem;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 999px;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.tab:hover {
  border-color: var(--accent);
  color: var(--text);
}

.tab.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Quote box ───────────────────────────────────────────────── */
.quote-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.quote-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.quote-row:last-of-type {
  border-bottom: none;
}

.quote-row.total {
  font-weight: 600;
  color: var(--text);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-2);
}

.quote-timer {
  padding: 0.5rem 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.timer-icon {
  font-size: 0.85rem;
}

/* ── Error ───────────────────────────────────────────────────── */
.error-msg {
  background: rgba(224, 92, 92, 0.08);
  border: 1px solid rgba(224, 92, 92, 0.3);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-size: 0.85rem;
  padding: 0.75rem 1rem;
  animation: fadeIn 0.2s ease;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-primary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.5rem;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: -0.01em;
}

.btn-primary:hover:not(:disabled) {
  background: #ff7a30;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: none;
}

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

.btn-icon {
  transition: transform var(--transition);
}

.btn-primary:hover:not(:disabled) .btn-icon {
  transform: translateX(3px);
}

.btn-secondary {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  width: 100%;
}

.btn-secondary:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

/* ── Payment icons ───────────────────────────────────────────── */
.payment-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-faint);
}

.pay-icon {
  font-size: 1rem;
}

.divider {
  color: var(--border-2);
}

/* ── Status page ─────────────────────────────────────────────── */
.status-block {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.status-row:last-child {
  border-bottom: none;
}

.status-row span:first-child {
  color: var(--text-muted);
  flex-shrink: 0;
}

.mono {
  font-family: 'SFMono-Regular', 'Consolas', monospace;
  font-size: 0.8rem;
  color: var(--text);
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
  text-align: right;
}

.status-badge {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
}

.status-badge.confirmed  { background: rgba(78, 189, 126, 0.12); color: var(--green); }
.status-badge.processing { background: rgba(242, 104, 34, 0.12); color: var(--accent); }
.status-badge.completed  { background: rgba(78, 189, 126, 0.12); color: var(--green); }
.status-badge.failed     { background: rgba(224, 92, 92, 0.12);  color: var(--red); }

.info-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-faint);
  line-height: 1.8;
}

.footer-note {
  color: var(--text-faint);
  opacity: 0.6;
}

/* ── Loading spinner ─────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 480px) {
  .page {
    padding: 0 1rem;
  }

  .card {
    padding: 1.5rem;
  }

  .hero-title {
    font-size: 2.2rem;
  }
}
