:root {
  --bg-main: #0a0d14;
  --bg-card: rgba(18, 24, 38, 0.7);
  --bg-card-hover: rgba(26, 34, 52, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(153, 69, 255, 0.4);
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  --solana-purple: #9945FF;
  --solana-teal: #14F195;
  --meteora-orange: #ff5e00;
  --meteora-gold: #ffb800;
  --accent-red: #ef4444;
  --accent-blue: #3b82f6;

  --font-family: 'Inter', sans-serif;
  --font-title: 'Outfit', sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  
  --shadow-glow: 0 0 25px rgba(153, 69, 255, 0.25);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.35);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(153, 69, 255, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(20, 241, 149, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(255, 94, 0, 0.06) 0%, transparent 50%);
  background-attachment: fixed;
}

/* NAVBAR */
.navbar {
  background: rgba(10, 13, 20, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 24px;
}

.nav-container {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(153, 69, 255, 0.2), rgba(255, 94, 0, 0.2));
  border: 1px solid var(--border-highlight);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.brand-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-idn {
  background: linear-gradient(135deg, var(--meteora-orange), var(--meteora-gold));
  color: #000;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.nav-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 30px;
  border: 1px solid var(--border-color);
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-tab:hover {
  color: var(--text-main);
}

.nav-tab.active {
  background: linear-gradient(135deg, var(--solana-purple), #7928CA);
  color: #fff;
  box-shadow: 0 4px 15px rgba(153, 69, 255, 0.4);
}

.wallet-status-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-dot.success { background-color: var(--solana-teal); box-shadow: 0 0 8px var(--solana-teal); }
.status-dot.warning { background-color: var(--meteora-gold); box-shadow: 0 0 8px var(--meteora-gold); }
.status-dot.danger { background-color: var(--accent-red); box-shadow: 0 0 8px var(--accent-red); }

/* MAIN CONTAINER */
.main-container {
  max-width: 1320px;
  margin: 24px auto;
  padding: 0 24px;
  flex: 1;
  width: 100%;
}

/* HERO STATS */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.stat-card {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.stat-icon.purple { background: rgba(153, 69, 255, 0.15); color: var(--solana-purple); border: 1px solid rgba(153, 69, 255, 0.3); }
.stat-icon.orange { background: rgba(255, 94, 0, 0.15); color: var(--meteora-orange); border: 1px solid rgba(255, 94, 0, 0.3); }
.stat-icon.teal { background: rgba(20, 241, 149, 0.15); color: var(--solana-teal); border: 1px solid rgba(20, 241, 149, 0.3); }
.stat-icon.gold { background: rgba(255, 184, 0, 0.15); color: var(--meteora-gold); border: 1px solid rgba(255, 184, 0, 0.3); }

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-value {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
}

.address-code {
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--solana-teal);
}

.btn-copy {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  margin-left: auto;
  font-size: 16px;
  transition: color 0.2s;
}
.btn-copy:hover { color: #fff; }

/* SECTIONS */
.app-section {
  display: none;
  animation: fadeIn 0.3s ease;
}
.app-section.active {
  display: block;
}

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

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

.section-header h2 {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 800;
}

.section-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* CARDS & GLASS */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
}

.card {
  padding: 24px;
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.card-title h3 {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.highlight-border {
  border: 1px solid var(--border-highlight);
  box-shadow: var(--shadow-glow);
}

/* GRID LAYOUTS */
.grid-2col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
}

.grid-3col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

/* WALLET DETAILS BOX */
.wallet-details-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-label {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.detail-value {
  font-size: 0.9rem;
  font-weight: 600;
}

.address-full {
  font-family: monospace;
  font-size: 0.78rem;
  color: var(--solana-teal);
  word-break: break-all;
  max-width: 260px;
}

/* BADGES & BUTTONS */
.badge-status {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-status.success { background: rgba(20, 241, 149, 0.15); color: var(--solana-teal); border: 1px solid rgba(20, 241, 149, 0.3); }
.badge-status.warning { background: rgba(255, 184, 0, 0.15); color: var(--meteora-gold); border: 1px solid rgba(255, 184, 0, 0.3); }
.badge-status.danger { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-status.info { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); border: 1px solid rgba(59, 130, 246, 0.3); }

.btn {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--meteora-orange), #ff2e00);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 94, 0, 0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 94, 0, 0.6);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-chip:hover {
  background: var(--solana-purple);
  color: #fff;
}

/* DATA TABLES */
.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.data-table th {
  background: rgba(255, 255, 255, 0.03);
  padding: 14px 16px;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

/* FORM CONTROLS */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.input-field {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #fff;
  font-family: var(--font-family);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.25s;
}
.input-field:focus {
  border-color: var(--solana-purple);
}

.quick-preset-btns {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

/* CALCULATOR RESULTS */
.calc-results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.calc-res-item {
  background: rgba(0, 0, 0, 0.3);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.calc-res-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.calc-res-value {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 800;
}
.calc-res-sub {
  font-size: 0.75rem;
  color: var(--solana-teal);
}

.strategy-recommendation-box {
  background: rgba(255, 184, 0, 0.05);
  border: 1px solid rgba(255, 184, 0, 0.2);
  padding: 16px;
  border-radius: var(--radius-md);
}
.strategy-recommendation-box h4 {
  font-size: 0.95rem;
  margin-bottom: 6px;
}
.strategy-recommendation-box p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ALERT BOX */
.alert-box {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.85rem;
}
.alert-box.warning-bg {
  background: rgba(255, 184, 0, 0.1);
  border: 1px solid rgba(255, 184, 0, 0.25);
  color: var(--meteora-gold);
}

/* FOOTER */
.footer {
  background: rgba(10, 13, 20, 0.9);
  border-top: 1px solid var(--border-color);
  padding: 20px 24px;
  margin-top: auto;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.footer-container {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.footer a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 16px;
}
.footer a:hover { color: #fff; }

/* UTILITY CLASSES */
.text-gradient {
  background: linear-gradient(135deg, var(--solana-teal), var(--solana-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.text-green { color: var(--solana-teal); }
.text-purple { color: var(--solana-purple); }
.text-orange { color: var(--meteora-orange); }
.text-gold { color: var(--meteora-gold); }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.w-full { width: 100%; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-container { flex-direction: column; }
  .calc-results-grid { grid-template-columns: 1fr; }
  .grid-2col, .grid-3col { grid-template-columns: 1fr; }
}
