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

:root {
  --bg-primary: #07090e;
  --bg-secondary: #0d121d;
  --bg-card: #121826;
  --bg-card-hover: #172033;
  --bg-input: #0a0e17;
  --border-color: #1e293b;
  --border-focus: #10b981;
  
  --accent-green: #00f076;
  --accent-green-dark: #059669;
  --accent-green-glow: rgba(0, 240, 118, 0.2);
  --accent-red: #ff3b69;
  --accent-red-glow: rgba(255, 59, 105, 0.2);
  --accent-blue: #3b82f6;
  --accent-yellow: #f59e0b;
  --accent-purple: #8b5cf6;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-main);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

/* Links & Buttons */
a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

button, input, select, textarea {
  font-family: inherit;
  outline: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-green);
  color: #052e16;
  box-shadow: 0 4px 15px var(--accent-green-glow);
}
.btn-primary:hover {
  background: #10b981;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 240, 118, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--text-muted);
}

.btn-danger {
  background: var(--accent-red);
  color: #fff;
  box-shadow: 0 4px 15px var(--accent-red-glow);
}
.btn-danger:hover {
  background: #e11d48;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 14px 30px;
  font-size: 1.05rem;
}

/* Header & Nav */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 9, 14, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
padding: 14px 16px;
}

.header-container {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.header-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--accent-green) 0%, #047857 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 0 12px var(--accent-green-glow);
}

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

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 6px 0;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-green);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-green);
}

.search-box {
  position: relative;
  min-width: 260px;
}
.search-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 16px 10px 38px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  transition: var(--transition);
}
.search-input:focus {
  border-color: var(--accent-green);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--accent-green-glow);
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  max-height: 320px;
  overflow-y: auto;
  display: none;
}
.search-dropdown.active {
  display: block;
}
.search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.search-item:hover {
  background: var(--bg-card-hover);
}

.user-nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

@media (max-width: 1200px) {
  .header-container {
    gap: 16px;
  }
  .header-center {
    gap: 18px;
  }
  .search-box {
    min-width: 210px;
  }
}

/* Hero Section */
.hero {
  position: relative;
  padding: 60px 16px 40px;
  overflow: hidden;
  max-width: 1440px;
  margin: 0 auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
}

.hero-title {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -1.5px;
  margin-bottom: 18px;
}
.hero-title .highlight {
  color: var(--accent-green);
  text-shadow: 0 0 25px var(--accent-green-glow);
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.25rem;
  margin-bottom: 30px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-visual {
  display: flex;
  justify-content: center;
  position: relative;
}
.hero-mascot-img {
  max-width: 100%;
  height: auto;
  max-height: 380px;
  object-fit: contain;
  filter: drop-shadow(0 15px 35px rgba(0, 240, 118, 0.25));
  animation: float 4s ease-in-out infinite alternate;
}

@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-12px) rotate(1.5deg); }
}

/* Coins Grid & Cards */
.section {
  max-width: 1440px;
  margin: 0 auto;
  padding: 30px 16px;
  width: 100%;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.coins-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

@media (max-width: 1200px) {
  .coins-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 992px) {
  .coins-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 640px) {
  .coins-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .coins-grid {
    grid-template-columns: 1fr;
  }
}

.coin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transition: var(--transition);
  cursor: pointer;
}
.coin-card:hover {
  background: var(--bg-card-hover);
  border-color: #334155;
  transform: translateY(-4px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

.coin-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.coin-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.coin-meta {
  flex: 1;
  min-width: 0;
}
.coin-name {
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.coin-ticker {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.coin-card-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.coin-price {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
}

.badge-change {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.badge-change.up {
  color: var(--accent-green);
  background: rgba(0, 240, 118, 0.12);
}
.badge-change.down {
  color: var(--accent-red);
  background: rgba(255, 59, 105, 0.12);
}

.coin-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.78rem;
}
.stat-col {
  display: flex;
  flex-direction: column;
}
.stat-label {
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-value {
  font-weight: 600;
  font-family: var(--font-mono);
  margin-top: 2px;
}

/* Coin Detail Page */
.coin-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
}
.coin-page-title {
  display: flex;
  align-items: center;
  gap: 16px;
}
.coin-page-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.coin-stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 22px;
  margin-bottom: 24px;
}

.coin-detail-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}
.coin-detail-layout > div {
  min-width: 0;
}

/* Trading & Order Widget */
.widget-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}

.widget-tabs {
  display: flex;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 18px;
}
.widget-tab {
  flex: 1;
  text-align: center;
  padding: 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  transition: var(--transition);
}
.widget-tab.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.input-group {
  margin-bottom: 16px;
}
.input-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.input-field-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  gap: 10px;
}
.input-field-wrap:focus-within {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 2px var(--accent-green-glow);
}
.input-field-wrap input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
}
.input-field-wrap select {
  flex: 1;
  min-width: 0;
  max-width: 100%;
}

/* Recent Trades Table */
.trades-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.trades-table th {
  text-align: left;
  padding: 10px 14px;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border-color);
}
.trades-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.trades-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.trade-buy {
  color: var(--accent-green);
  font-weight: 600;
}
.trade-sell {
  color: var(--accent-red);
  font-weight: 600;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-success {
  background: rgba(0, 240, 118, 0.15);
  color: var(--accent-green);
}
.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-yellow);
}
.badge-danger {
  background: rgba(255, 59, 105, 0.15);
  color: var(--accent-red);
}
.badge-info {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
}

/* Admin Dashboard Layout */
.admin-wrapper {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}
.admin-sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.admin-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-menu-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
}
.admin-menu-item a:hover, .admin-menu-item.active a {
  background: var(--bg-card);
  color: var(--accent-green);
}
.admin-main {
  padding: 30px;
  overflow-y: auto;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kpi-title {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}
.kpi-value {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: var(--font-mono);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 520px;
  padding: 28px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  transform: translateY(20px);
  transition: var(--transition);
}
.modal-overlay.active .modal-card {
  transform: translateY(0);
}
.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}
.modal-close:hover {
  color: var(--text-primary);
}

/* Alerts */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.alert-success {
  background: rgba(0, 240, 118, 0.12);
  border: 1px solid var(--accent-green);
  color: var(--accent-green);
}
.alert-error {
  background: rgba(255, 59, 105, 0.12);
  border: 1px solid var(--accent-red);
  color: var(--accent-red);
}

/* Footer */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
  padding: 30px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== Footer ===== */
.footer-links-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 26px;
}
.footer-links-row a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.15s ease;
}
.footer-links-row a:hover {
  color: var(--text-primary);
}
.footer-social {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  transition: all 0.2s ease;
}
.footer-social:hover {
  color: var(--accent-green);
  border-color: rgba(0, 240, 118, 0.4);
  box-shadow: 0 0 12px var(--accent-green-glow);
  transform: translateY(-2px);
}

/* ===== Coin leaderboard (home) ===== */
.coin-leaderboard {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.coin-leaderboard-row {
  display: grid;
  grid-template-columns: 34px 38px minmax(0, 1fr) auto auto 110px 18px;
  align-items: center;
  gap: 14px;
  padding: 13px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease, border-color 0.15s ease;
  position: relative;
}
.coin-leaderboard-row:last-child {
  border-bottom: none;
}
.coin-leaderboard-row:hover {
  background: var(--bg-card-hover);
}
.coin-leaderboard-row:hover .coin-leaderboard-arrow {
  color: var(--accent-green);
  transform: translateX(3px);
}
.coin-rank {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}
.coin-leaderboard-row:nth-child(-n + 3) .coin-rank {
  color: var(--accent-green);
  text-shadow: 0 0 10px var(--accent-green-glow);
}
.coin-leaderboard-img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.coin-leaderboard-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.coin-leaderboard-title {
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.coin-leaderboard-ticker {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}
.coin-leaderboard-price {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
}
.coin-leaderboard-mcap {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: right;
}
.coin-leaderboard-arrow {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
  transition: color 0.15s ease, transform 0.15s ease;
}

@media (max-width: 640px) {
  .coin-leaderboard-row {
    grid-template-columns: 26px 34px minmax(0, 1fr) auto auto 14px;
    gap: 10px;
    padding: 11px 14px;
  }
  .coin-leaderboard-mcap {
    display: none;
  }
}

/* ===== Wallet page ===== */
.wallet-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 24px;
}
.wallet-grid > div {
  min-width: 0;
}

/* ===== How it works ===== */
.how-it-works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.how-it-works-grid > div {
  min-width: 0;
}
@media (max-width: 560px) {
  .how-it-works-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== User dashboard ===== */
.dashboard-two-col {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
  align-items: start;
}
.dashboard-two-col > * {
  min-width: 0;
}
@media (max-width: 992px) {
  .dashboard-two-col {
    grid-template-columns: 1fr;
  }
  .wallet-grid {
    grid-template-columns: 1fr;
  }
}
.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.18s ease;
  position: relative;
  overflow: hidden;
}
.quick-action i {
  font-size: 1.4rem;
  color: var(--accent-green);
  transition: transform 0.18s ease;
}
.quick-action:hover {
  color: var(--text-primary);
  border-color: rgba(0, 240, 118, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}
.dashboard-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1200px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 768px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

.quick-action:hover i {
  transform: scale(1.15);
}

/* ===== Responsive = */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-actions {
    justify-content: center;
  }
  .coin-detail-layout {
    grid-template-columns: 1fr;
  }
  .admin-wrapper {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .nav-links {
    display: none;
  }
  .header-center {
    display: none;
  }
  .header-container {
    display: flex;
    /* flex-wrap: wrap; */
    justify-content: space-between;
    gap: 12px;
  }
}

/* ===== Live buy notification toasts (frontpage) ===== */
.toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: min(380px, calc(100vw - 48px));
}
.buy-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--accent-green);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  animation: toastIn 0.35s ease;
}
.buy-toast-leaving {
  animation: toastOut 0.4s ease forwards;
}
.buy-toast-icon {
  font-size: 1.6rem;
  line-height: 1;
}
.buy-toast-body {
  flex: 1;
  min-width: 0;
}
.buy-toast-title {
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.buy-trader {
  color: var(--accent-blue);
}
.buy-toast-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 3px;
}
.buy-toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 4px;
}
.buy-toast-close:hover {
  color: var(--text-primary);
}

/* ===== Live price flash on the frontpage ===== */
.flash-up {
  animation: flashUp 1.2s ease;
}
.flash-down {
  animation: flashDown 1.2s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(30px); }
}
@keyframes flashUp {
  0%   { color: var(--accent-green); text-shadow: 0 0 12px var(--accent-green-glow); }
  100% { color: inherit; text-shadow: none; }
}
@keyframes flashDown {
  0%   { color: var(--accent-red); text-shadow: 0 0 12px var(--accent-red-glow); }
  100% { color: inherit; text-shadow: none; }
}
@media (max-width: 640px) {
  .toast-stack {
    bottom: 16px;
    right: 16px;
    left: 16px;
  }
}

/* ===== Alpine.js ===== */
[x-cloak] {
  display: none !important;
}

/* ===== Branding ===== */
.brand-img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== Mobile bottom navigation ===== */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(10, 15, 26, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
  padding: 10px 4px 8px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s ease;
}
.bottom-nav-item i {
  font-size: 1.15rem;
  transition: transform 0.2s ease, color 0.2s ease;
}
.bottom-nav-item.active {
  color: var(--accent-green);
}
.bottom-nav-item.active i {
  transform: translateY(-1px);
  text-shadow: 0 0 12px var(--accent-green-glow);
}
.bottom-nav-item:hover {
  color: var(--text-primary);
}
@media (max-width: 767px) {
  .bottom-nav {
    display: flex;
  }
}

/* ===== Mobile drawer ===== */
.drawer-panel {
  background: linear-gradient(165deg, #101828 0%, #0a0f1a 100%);
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.6);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}
.drawer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: background 0.15s ease;
}
.drawer-link:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* ===== Scroll reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.revealed {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===== Futuristic accents ===== */
.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
  vertical-align: middle;
}
.glow-card {
  position: relative;
  overflow: hidden;
}
.glow-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(0, 240, 118, 0.4), rgba(59, 130, 246, 0.15), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}


/* ===== Coin page: order flow & live stats ===== */
.pressure-track {
  height: 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 59, 105, 0.18);
  overflow: hidden;
  border: 1px solid var(--border-color);
}
.pressure-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #00f076, #10b981);
  box-shadow: 0 0 14px var(--accent-green-glow);
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.flow-stat {
  flex: 1;
  text-align: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 6px;
}
.flow-row-new {
  animation: flowIn 0.5s ease;
  background: rgba(0, 240, 118, 0.04);
}
.price-flash-up {
  animation: priceFlashUp 1.2s ease;
}
.price-flash-down {
  animation: priceFlashDown 1.2s ease;
}
@keyframes flowIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes priceFlashUp {
  0% {
    color: var(--accent-green);
    text-shadow: 0 0 20px var(--accent-green-glow);
  }
  100% {
    color: var(--text-primary);
    text-shadow: none;
  }
}
@keyframes priceFlashDown {
  0% {
    color: var(--accent-red);
    text-shadow: 0 0 20px var(--accent-red-glow);
  }
  100% {
    color: var(--text-primary);
    text-shadow: none;
  }
}

@media (max-width: 640px) {
  .coin-page-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .coin-page-header > div:last-child {
    text-align: left;
    width: 100%;
  }
  .coin-page-title {
    flex-wrap: wrap;
  }
  .coin-page-avatar {
    width: 52px;
    height: 52px;
  }
  #priceChartCanvas {
    height: 260px !important;
  }
  .coin-stats-bar {
    grid-template-columns: repeat(2, 1fr);
    padding: 14px 16px;
    gap: 12px;
  }
  .coin-stats-bar > div {
    padding: 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
  }
.flow-stat span.stat-label {
    font-size: 0.68rem;
  }
}

/* Ultra-small screens: compact header so nothing overflows */
@media (max-width: 380px) {
  .header {
    padding: 10px 14px;
  }
  .header-container {
    gap: 8px;
  }
  .brand {
    font-size: 0.9rem;
    gap: 6px;
  }
  .brand-icon {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
  }
  .user-nav-actions {
    gap: 8px;
  }
  .user-nav-actions .btn-sm {
    padding: 5px 8px;
    font-size: 0.75rem;
  }
}
