/* ============================================
   RSHOP — Premium Dark Theme Design System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

/* ── CSS Variables ── */
:root {
  --bg-base:       #0a0b0f;
  --bg-surface:    #111219;
  --bg-elevated:   #191b24;
  --bg-card:       #1e2030;

  --accent:        #6c63ff;
  --accent-hover:  #8b85ff;
  --accent-glow:   rgba(108,99,255,.25);

  --green:         #22d3a0;
  --green-glow:    rgba(34,211,160,.2);

  --red:           #ff4a6e;
  --red-glow:      rgba(255,74,110,.2);

  --gold:          #f6b83d;

  --border:        rgba(255,255,255,.07);
  --border-accent: rgba(108,99,255,.35);

  --text-primary:  #e8eaf6;
  --text-secondary: #8b8fa8;
  --text-muted:    #4a4d64;

  --radius:        12px;
  --radius-sm:     8px;
  --radius-lg:     18px;

  --shadow-card:   0 4px 24px rgba(0,0,0,.4);
  --shadow-glow:   0 0 40px var(--accent-glow);

  --transition:    0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── Grid/Dot background pattern ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.04) 1px, transparent 0);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ==============================
   NAVBAR
   ============================== */
.rs-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10,11,15,.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.rs-navbar__logo {
  font-family: 'Space Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--accent), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: opacity var(--transition);
}
.rs-navbar__logo:hover { opacity: .8; }

.rs-navbar__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.rs-navbar__links a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.rs-navbar__links a:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}
.rs-navbar__links a.active {
  color: var(--accent);
  background: rgba(108,99,255,.12);
}

.rs-navbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rs-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
  z-index: 1100;
}

/* ==============================
   USER INFO STRIP
   ============================== */
.rs-userbar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
  height: 46px;
  font-size: 13px;
  position: relative;
  z-index: 1;
}

.rs-userbar__item {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
}
.rs-userbar__item strong {
  color: var(--text-primary);
  font-weight: 600;
}

.rs-userbar__balance strong {
  color: var(--green);
}

.rs-userbar__actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

/* ==============================
   BUTTONS
   ============================== */
.rs-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 9px 20px;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-align: center;
  white-space: nowrap;
}

.rs-btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
}
.rs-btn--primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 32px var(--accent-glow);
  transform: translateY(-1px);
}

.rs-btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.rs-btn--ghost:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  background: rgba(108,99,255,.08);
}

.rs-btn--green {
  background: var(--green);
  color: #0a0b0f;
  box-shadow: 0 0 20px var(--green-glow);
}
.rs-btn--green:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.rs-btn--red {
  background: transparent;
  color: var(--red);
  border: 1px solid rgba(255,74,110,.35);
}
.rs-btn--red:hover {
  background: var(--red-glow);
  border-color: var(--red);
}

.rs-btn--sm {
  font-size: 12px;
  padding: 6px 14px;
}

.rs-btn--loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
  min-width: 40px;
}

.rs-btn--loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 50%;
  left: 50%;
  margin-top: -9px;
  margin-left: -9px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rs-spin 0.6s linear infinite;
}

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

/* ==============================
   PAGE LAYOUT
   ============================== */
.rs-page {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.rs-page--centered {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rs-page-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.rs-page-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* ==============================
   CARDS
   ============================== */
.rs-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.rs-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.rs-card--flat { transform:none; }
.rs-card--flat:hover { transform: none; }

/* ==============================
   BANK CARD GRID
   ============================== */
.rs-bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.rs-bank-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.rs-bank-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--green));
  opacity: 0;
  transition: opacity var(--transition);
}
.rs-bank-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}
.rs-bank-card:hover::before { opacity: 1; }

.rs-bank-card__name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.rs-bank-card__footer {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
}

/* ==============================
   TABLE
   ============================== */
.rs-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  overflow-x: auto;
}

.rs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.rs-table thead {
  background: var(--bg-elevated);
}
.rs-table thead th {
  padding: 14px 20px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.rs-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.rs-table tbody tr:last-child { border-bottom: none; }
.rs-table tbody tr:hover { background: var(--bg-elevated); }

.rs-table tbody td,
.rs-table tbody th {
  padding: 16px 20px;
  color: var(--text-secondary);
  font-weight: 400;
}
.rs-table tbody th {
  color: var(--text-primary);
  font-weight: 500;
}

.rs-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.rs-badge--green {
  background: var(--green-glow);
  color: var(--green);
  border: 1px solid rgba(34,211,160,.25);
}
.rs-badge--purple {
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(108,99,255,.25);
}
.rs-badge--gold {
  background: rgba(246,184,61,.15);
  color: var(--gold);
  border: 1px solid rgba(246,184,61,.25);
}

/* ==============================
   MODAL (BACKDROP OVERLAY)
   ============================== */
.rs-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  animation: fadeIn .18s ease;
}
.rs-modal-overlay.open { display: flex; }

@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes slideUp { from { opacity:0; transform: translateY(28px); } to { opacity:1; transform: none; } }

.rs-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: min(480px, 95vw);
  position: relative;
  animation: slideUp .22s cubic-bezier(0.22, 1, 0.36, 1);
}

.rs-modal__close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all var(--transition);
}
.rs-modal__close:hover {
  color: var(--text-primary);
  border-color: var(--red);
  background: var(--red-glow);
}

.rs-modal__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
}

/* ==============================
   FORM ELEMENTS
   ============================== */
.rs-form { display: flex; flex-direction: column; gap: 14px; }

.rs-form label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .5px;
  display: block;
  margin-bottom: 5px;
}

.rs-input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  padding: 11px 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.rs-input::placeholder { color: var(--text-muted); }
.rs-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ==============================
   SECTION LABEL
   ============================== */
.rs-section-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.rs-section-label::before {
  content: '';
  display: block;
  width: 4px; height: 20px;
  background: linear-gradient(180deg, var(--accent), var(--green));
  border-radius: 4px;
}

/* ==============================
   HOME / LANDING PAGE
   ============================== */
.rs-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  position: relative;
  z-index: 1;
  text-align: center;
}

.rs-hero__logo {
  font-family: 'Space Mono', monospace;
  font-size: clamp(56px, 12vw, 96px);
  font-weight: 700;
  letter-spacing: 6px;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 50%, var(--green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  line-height: 1;
}

.rs-hero__tagline {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 400px;
  letter-spacing: .3px;
}

.rs-hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Ambient glow orbs */
.rs-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: .18;
}
.rs-orb--purple {
  width: 600px; height: 600px;
  background: var(--accent);
  top: -200px; right: -200px;
}
.rs-orb--green {
  width: 400px; height: 400px;
  background: var(--green);
  bottom: -100px; left: -100px;
}

/* ==============================
   STAT CARDS (Dashboard)
   ============================== */
.rs-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}

.rs-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.rs-stat-card__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.rs-stat-card__value {
  font-family: 'Space Mono', monospace;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}
.rs-stat-card__value--green { color: var(--green); }
.rs-stat-card__value--accent { color: var(--accent); }

/* ==============================
   CART / CHECKOUT
   ============================== */
.rs-cart-total {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
}
.rs-cart-total__label {
  font-size: 14px;
  color: var(--text-secondary);
}
.rs-cart-total__amount {
  font-family: 'Space Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--green);
}

/* ==============================
   NOTICE / TERMS
   ============================== */
.rs-notice {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-top: 32px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}
.rs-notice h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.rs-notice h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 16px 0 6px;
}

/* ==============================
   TOAST (Custom)
   ============================== */
.rs-toast-container {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.rs-toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 14px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: all;
  box-shadow: 0 8px 30px rgba(0,0,0,.5);
  animation: slideUp .25s ease;
  max-width: 320px;
  border-left: 3px solid var(--accent);
}
.rs-toast--success { border-left-color: var(--green); }
.rs-toast--error { border-left-color: var(--red); }

/* ==============================
   ADD-TO-CART BUTTON STATES
   ============================== */
.rs-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.rs-add-btn:hover, .rs-add-btn.in-cart {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 16px var(--accent-glow);
}
.rs-add-btn.in-cart {
  background: rgba(108,99,255,.18);
  color: var(--accent);
  border-color: var(--border-accent);
  box-shadow: none;
}

/* BTC QR code section */
.rs-btc-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  margin: 16px 0;
}
.rs-btc-box img {
  border-radius: var(--radius-sm);
  border: 4px solid var(--bg-card);
  display: block;
  margin: 0 auto 12px;
}
.rs-btc-box__addr {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--text-secondary);
  word-break: break-all;
  line-height: 1.6;
}

/* Admin Dashboard Layout */
.rs-admin-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 32px;
  align-items: start;
}

/* Navbar Collapse Container (Mobile Fix) */
.rs-navbar__collapse {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: space-between;
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (min-width: 993px) {
  .rs-stats-grid { display: none; }
}

@media (max-width: 992px) {
  .rs-menu-toggle { display: block; }
  
  .rs-navbar__collapse {
    display: none;
    position: fixed;
    top: 64px;
    left: 0; right: 0;
    bottom: 0;
    background: var(--bg-surface);
    flex-direction: column;
    padding: 32px 24px;
    border-top: 1px solid var(--border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow-y: auto;
    justify-content: flex-start;
    gap: 32px;
  }
  
  .nav-open .rs-navbar__collapse { display: flex; z-index: 1001; }
  
  .rs-navbar__links { flex-direction: column; width: 100%; gap: 8px; }
  .rs-navbar__links a { width: 100%; text-align: center; font-size: 18px; padding: 16px; border-bottom: 1px solid var(--border); }
  
  .rs-navbar__right { flex-direction: column; width: 100%; gap: 12px; }
  .rs-navbar__right .rs-btn { width: 100%; justify-content: center; padding: 14px; font-size: 15px; }
}
  /* Admin Panel Responsiveness */
  .rs-admin-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .rs-navbar { padding: 0 16px; }
  .rs-page { padding: 20px 16px 48px; }
  .rs-bank-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .rs-stat-mini { padding: 8px 12px; }
  .rs-stat-mini__value { font-size: 16px; }
  .rs-cart-total { flex-direction: column; gap: 12px; text-align: center; }
  .rs-page-title { font-size: 22px; }
  .rs-modal { padding: 24px; }
  .rs-table thead th, .rs-table tbody td { padding: 12px 14px; font-size: 13px; }
}
