/* =============================================
   DICOIN — Shared Styles
   ============================================= */

:root {
  --bg-primary: #060b18;
  --bg-secondary: #0d1526;
  --bg-card: #111827;
  --bg-card-hover: #1a2540;
  --border: #1e2d4a;
  --border-light: #2a3f66;

  --indigo: #4f46e5;
  --indigo-light: #6366f1;
  --indigo-dark: #3730a3;
  --cyan: #06b6d4;
  --cyan-light: #22d3ee;
  --emerald: #10b981;
  --emerald-light: #34d399;
  --amber: #f59e0b;
  --red: #ef4444;
  --red-light: #f87171;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #475569;

  --gradient-main: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  --gradient-card: linear-gradient(135deg, #111827 0%, #0d1a30 100%);
  --glow-indigo: 0 0 40px rgba(79, 70, 229, 0.3);
  --glow-cyan: 0 0 40px rgba(6, 182, 212, 0.3);

  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- Typography ---- */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { color: var(--text-secondary); }
a { color: inherit; text-decoration: none; }

.gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Layout ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--gradient-main);
  color: #fff;
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(79, 70, 229, 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--indigo);
}

.btn-ghost {
  background: rgba(79, 70, 229, 0.1);
  color: var(--indigo-light);
  border: 1px solid rgba(79, 70, 229, 0.3);
}
.btn-ghost:hover:not(:disabled) {
  background: rgba(79, 70, 229, 0.2);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}
.btn-success:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
}
.btn-danger:hover:not(:disabled) {
  transform: translateY(-2px);
}

.btn-lg { padding: 16px 32px; font-size: 1.05rem; border-radius: 14px; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-full { width: 100%; justify-content: center; }

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
}
.card:hover { border-color: var(--border-light); }
.card-glow:hover { box-shadow: var(--glow-indigo); }

/* ---- Form Elements ---- */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.form-input::placeholder { color: var(--text-muted); }

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}
.badge-indigo { background: rgba(79,70,229,0.15); color: var(--indigo-light); border: 1px solid rgba(79,70,229,0.3); }
.badge-cyan { background: rgba(6,182,212,0.15); color: var(--cyan-light); border: 1px solid rgba(6,182,212,0.3); }
.badge-emerald { background: rgba(16,185,129,0.15); color: var(--emerald-light); border: 1px solid rgba(16,185,129,0.3); }
.badge-amber { background: rgba(245,158,11,0.15); color: var(--amber); border: 1px solid rgba(245,158,11,0.3); }

/* ---- Nav ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(6, 11, 24, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo-img {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.nav-logo {
  height: 38px;
  width: auto;
  mix-blend-mode: screen;
  display: block;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}
.nav-links a {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}
.nav-actions { display: flex; gap: 10px; align-items: center; }
.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.nav-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  cursor: pointer;
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 480px;
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition);
}
.modal-close:hover { color: var(--text-primary); }

/* ---- Toast ---- */
.toast-container {
  position: fixed;
  top: 88px; right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  min-width: 300px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: slideIn 0.3s ease;
}
.toast.success { border-left: 3px solid var(--emerald); }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--indigo); }
.toast-icon { font-size: 1.1rem; }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeOut {
  to { opacity: 0; transform: translateX(20px); }
}

/* ---- Coin Icons ---- */
.coin-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
  flex-shrink: 0;
}
.coin-usdt { background: linear-gradient(135deg, #26a17b, #1a7a5c); color: #fff; }
.coin-usdc { background: linear-gradient(135deg, #2775ca, #1a5ba8); color: #fff; }
.coin-dic { background: var(--gradient-main); color: #fff; }

/* ---- Number Ticker ---- */
.ticker { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ---- Divider ---- */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* ---- Tabs ---- */
.tabs {
  display: flex;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--border);
}
.tab-btn {
  flex: 1;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.tab-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ---- Progress ---- */
.progress-bar {
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--gradient-main);
  border-radius: 999px;
  transition: width 0.5s ease;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }

/* ---- Utilities ---- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-emerald { color: var(--emerald-light); }
.text-red { color: var(--red-light); }
.text-cyan { color: var(--cyan-light); }
.text-indigo { color: var(--indigo-light); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.relative { position: relative; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .modal { padding: 28px 20px; }
}
