/* ─── Shell Market - Blue Theme ─── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg: #0a0e1a;
  --bg2: #111827;
  --bg3: #1a2235;
  --card: #151d2e;
  --card-hover: #1a2540;
  --border: #1e2a42;
  --blue1: #3b82f6;
  --blue2: #2563eb;
  --blue3: #1d4ed8;
  --blue-glow: rgba(59, 130, 246, 0.15);
  --cyan: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.1);
  --text: #e2e8f0;
  --text2: #94a3b8;
  --text3: #64748b;
  --green: #10b981;
  --red: #ef4444;
  --orange: #f59e0b;
  --radius: 12px;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--blue1); text-decoration: none; transition: color .2s; }
a:hover { color: var(--cyan); }

/* ─── Navbar ─── */
.navbar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.nav-brand svg { width: 28px; height: 28px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text2);
  font-size: .9rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  transition: all .2s;
}

.nav-links a:hover { color: var(--text); background: var(--bg3); }
.nav-links a.active { color: var(--blue1); background: var(--blue-glow); }

.nav-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.balance-badge {
  background: linear-gradient(135deg, var(--blue3), var(--blue1));
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 600;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue2), var(--blue1));
  color: #fff;
  box-shadow: 0 4px 15px rgba(37, 99, 235, .3);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, .4);
  color: #fff;
}

.btn-secondary {
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--card-hover); color: var(--text); }

.btn-success { background: var(--green); color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

/* ─── Hero ─── */
.hero {
  text-align: center;
  padding: 5rem 2rem 3rem;
  background: radial-gradient(ellipse at top, var(--blue-glow), transparent 60%);
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text), var(--blue1));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--text2);
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
}

.hero-stat {
  text-align: center;
}

.hero-stat .num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--blue1);
}

.hero-stat .label {
  font-size: .85rem;
  color: var(--text3);
  margin-top: 4px;
}

/* ─── Container ─── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ─── Section ─── */
.section {
  padding: 3rem 0;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ─── Shell Cards Grid (list layout) ─── */
.shell-grid {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.shell-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all .25s;
  position: relative;
  overflow: hidden;
}

.shell-card:hover {
  border-color: var(--blue1);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, .1);
}

.shell-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue2), var(--cyan));
  opacity: 0;
  transition: opacity .25s;
}

.shell-card:hover::before { opacity: 1; }

.shell-domain {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .25rem;
}

/* Row card layout */
.shell-card-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
}
.shell-card-left {
  flex-shrink: 0;
}
.shell-card-mid {
  flex: 1;
  min-width: 0;
}
.shell-card-tags {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-top: .25rem;
}
.shell-tag {
  font-size: .72rem;
  color: var(--text2);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 4px;
}
.shell-card-right {
  flex-shrink: 0;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .4rem;
}

.shell-type {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: .75rem;
}

.type-wordpress { background: rgba(6, 182, 212, .15); color: var(--cyan); }
.type-joomla { background: rgba(245, 158, 11, .15); color: var(--orange); }
.type-custom { background: rgba(59, 130, 246, .15); color: var(--blue1); }
.type-html { background: rgba(16, 185, 129, .15); color: var(--green); }

.shell-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  margin-bottom: 1rem;
}

.metric {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  color: var(--text2);
}

.metric-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.metric-value {
  font-weight: 600;
  color: var(--text);
}

.shell-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
}

.shell-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--blue1);
}

.shell-price span { font-size: .8rem; color: var(--text3); font-weight: 400; }

/* ─── AS Badge ─── */
.as-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-weight: 700;
  font-size: .9rem;
}

.as-high { background: rgba(16, 185, 129, .15); color: var(--green); border: 2px solid rgba(16, 185, 129, .3); }
.as-mid { background: rgba(245, 158, 11, .15); color: var(--orange); border: 2px solid rgba(245, 158, 11, .3); }
.as-low { background: rgba(239, 68, 68, .15); color: var(--red); border: 2px solid rgba(239, 68, 68, .3); }

/* ─── Forms ─── */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text2);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: .9rem;
  font-family: 'Inter', sans-serif;
  transition: border-color .2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--blue1);
  box-shadow: 0 0 0 3px var(--blue-glow);
}

select.form-control { cursor: pointer; }

/* ─── Auth Pages ─── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at top, var(--blue-glow), transparent 50%);
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1rem;
  font-size: .85rem;
  color: var(--text3);
}

.error-msg {
  background: rgba(239, 68, 68, .1);
  border: 1px solid rgba(239, 68, 68, .3);
  color: var(--red);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: .85rem;
  margin-bottom: 1rem;
}

.success-msg {
  background: rgba(16, 185, 129, .1);
  border: 1px solid rgba(16, 185, 129, .3);
  color: var(--green);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: .85rem;
  margin-bottom: 1rem;
}

/* ─── Wallet ─── */
.wallet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.crypto-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-align: center;
}

.crypto-card h4 {
  color: var(--blue1);
  margin-bottom: .5rem;
}

.crypto-addr {
  font-size: .72rem;
  color: var(--text2);
  word-break: break-all;
  background: var(--bg);
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .2s;
}

.crypto-addr:hover { background: var(--bg3); }

/* ─── Table ─── */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 10px 14px;
  text-align: left;
  font-size: .85rem;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--text3);
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
}

tr:hover { background: var(--bg3); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 600;
}

.badge-pending { background: rgba(245, 158, 11, .15); color: var(--orange); }
.badge-approved { background: rgba(16, 185, 129, .15); color: var(--green); }
.badge-rejected { background: rgba(239, 68, 68, .15); color: var(--red); }
.badge-active { background: rgba(59, 130, 246, .15); color: var(--blue1); }
.badge-sold { background: rgba(16, 185, 129, .15); color: var(--green); }

/* ─── Filter Bar ─── */
.filter-bar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-bar .form-control {
  width: auto;
  min-width: 120px;
}

/* ─── Admin ─── */
.admin-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.admin-section h3 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .75rem;
}

/* ─── New Layout Classes ─── */
.tg-link { color: var(--cyan); font-size: .8rem; display: flex; align-items: center; gap: 4px; }
.features-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; text-align: center; }
.features-grid > div { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; margin-bottom: 2rem; }
.payment-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; margin-top: 1.5rem; }
.stats-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-bottom: 1.5rem; }
.metrics-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.deposit-form-row { display: flex; gap: .75rem; align-items: end; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; margin-bottom: .75rem; }
.filter-row-2 { display: flex; gap: .75rem; align-items: end; flex-wrap: wrap; }
.minmax-pair { display: flex; gap: 4px; }
.minmax-pair .form-control { width: 50%; }
.amount-buttons { display: flex; gap: 1rem; margin-top: 1.5rem; }
.amount-buttons > div { flex: 1; background: var(--bg); border-radius: 8px; padding: 1rem; text-align: center; cursor: pointer; }
.amount-buttons > div:hover { background: var(--bg3); }
.payment-right { display: flex; flex-direction: column; gap: 1rem; }
.qr-placeholder { width: 250px; height: 250px; display: flex; align-items: center; justify-content: center; color: #999; }

/* Copy Box */
.copy-box {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 6px;
  padding: 8px 10px;
  gap: 8px;
}
.copy-box span {
  flex: 1;
  font-size: .8rem;
  font-weight: 600;
  color: #1a2235;
  word-break: break-all;
  letter-spacing: .3px;
}
.copy-btn {
  flex-shrink: 0;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  color: #555;
}
.copy-btn:hover { background: #e0e0e0; color: #222; }
.copy-btn.copied { background: #10b981; border-color: #10b981; color: #fff; }

/* ─── Mobile ─── */
@media (max-width: 768px) {
  /* Global */
  .container { padding: 0 .75rem; }
  .section { padding: 1.5rem 0; }
  .section-title { font-size: 1.1rem; }
  .btn-lg { width: 100%; justify-content: center; }

  /* Navbar: hamburger-free compact */
  .navbar { height: auto; padding: .5rem .75rem; flex-wrap: wrap; gap: .4rem; }
  .nav-brand { font-size: 1rem; }
  .nav-brand svg { width: 20px; height: 20px; }
  .nav-links { order: 3; width: 100%; justify-content: center; gap: .2rem; padding-top: .4rem; border-top: 1px solid var(--border); overflow-x: auto; flex-wrap: nowrap; }
  .nav-links a { font-size: .75rem; padding: 4px 7px; white-space: nowrap; }
  .nav-user { gap: .4rem; }
  .tg-link { display: none; }
  .balance-badge { font-size: .7rem; padding: 3px 8px; }
  .btn-sm { padding: 4px 8px; font-size: .72rem; }

  /* Hero */
  .hero { padding: 2rem .75rem 1.5rem; }
  .hero h1 { font-size: 1.4rem; }
  .hero p { font-size: .85rem; margin-bottom: 1.5rem; }
  .hero-buttons { flex-direction: column; gap: .75rem; }
  .hero-stats { flex-direction: row; gap: 1rem; justify-content: center; }
  .hero-stat .num { font-size: 1.3rem; }
  .hero-stat .label { font-size: .75rem; }

  /* Features */
  .features-grid { grid-template-columns: 1fr; gap: .75rem; }
  .features-grid > div { padding: 1.2rem; }

  /* Shell Grid */
  .shell-grid { gap: .5rem; }
  .shell-card-row { flex-wrap: wrap; padding: .75rem; gap: .5rem; }
  .shell-card-right { flex-direction: row; width: 100%; justify-content: space-between; align-items: center; padding-top: .5rem; border-top: 1px solid var(--border); }
  .shell-domain { font-size: .9rem; }
  .shell-tag { font-size: .65rem; }
  .shell-card { padding: 1rem; }
  .shell-domain { font-size: .95rem; }
  .shell-price { font-size: 1.1rem; }

  /* Filters */
  .filter-bar { padding: .75rem; }
  .filter-bar form { flex-direction: column; gap: .5rem; }
  .filter-bar form > div { width: 100%; }
  .filter-bar .form-control { width: 100% !important; min-width: 0 !important; }
  .filter-bar select { width: 100% !important; }
  .filter-bar .btn { width: 100%; justify-content: center; }

  /* Auth */
  .auth-page { padding: 1rem; align-items: flex-start; padding-top: 2rem; }
  .auth-card { padding: 1.5rem; max-width: 100%; }

  /* Payment / Wallet */
  .payment-grid { grid-template-columns: 1fr; }
  .deposit-form-row { flex-direction: column; }
  .deposit-form-row .form-group { width: 100%; }
  .deposit-form-row .btn { width: 100%; justify-content: center; }
  .wallet-grid { grid-template-columns: 1fr; }
  .crypto-card { padding: 1rem; }

  /* Shell Detail */
  .detail-grid { grid-template-columns: 1fr; }
  .stats-grid-3 { grid-template-columns: repeat(3, 1fr); gap: .5rem; }
  .stats-grid-3 > div { padding: .75rem !important; }
  .stats-grid-3 > div > div:first-child { font-size: 1.1rem !important; }
  .metrics-grid-2 { grid-template-columns: 1fr; }

  /* Tables */
  .table-wrap { margin: 0 -.75rem; padding: 0 .75rem; }
  th, td { padding: 6px 5px; font-size: .72rem; }

  /* Admin */
  .admin-section { padding: .75rem; }
  .admin-form { grid-template-columns: 1fr; }
  .admin-form .form-group { grid-column: span 1 !important; }

  /* Filters mobile */
  .filter-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .filter-row-2 { flex-direction: column; gap: .5rem; }
  .filter-row-2 > div { width: 100%; }
  .minmax-pair .form-control { width: 50% !important; }

  /* Amount buttons */
  .amount-buttons { gap: .5rem; flex-wrap: wrap; }
  .amount-buttons > div { padding: .75rem .5rem; min-width: 0; }

  /* Payment right */
  .payment-right > div { padding: 1rem !important; }

  /* QR */
  .qr-placeholder { width: 200px; height: 200px; }
  #qrCode img { width: 200px !important; height: 200px !important; }

  /* AS Badge compact */
  .as-badge { width: 36px; height: 36px; font-size: .8rem; }
}

/* Small phones */
@media (max-width: 380px) {
  .filter-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.2rem; }
  .auth-card { padding: 1rem; }
  .stats-grid-3 { grid-template-columns: 1fr; }
}

/* ─── Animations ─── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.shell-card { animation: fadeIn .3s ease both; }
.shell-card:nth-child(2) { animation-delay: .05s; }
.shell-card:nth-child(3) { animation-delay: .1s; }
.shell-card:nth-child(4) { animation-delay: .15s; }
.shell-card:nth-child(5) { animation-delay: .2s; }
.shell-card:nth-child(6) { animation-delay: .25s; }
