/* Trust Wallet Inspired Design - Global Styles */
:root {
  /* Trust Wallet Blue Colors */
  --trust-blue: #2563A5;
  --trust-blue-light: #3B7BC8;
  --trust-blue-dark: #1A4A7A;
  --trust-blue-gradient: linear-gradient(135deg, #2563A5 0%, #3B7BC8 100%);
  
  /* Background Colors */
  --bg-white: #FFFFFF;
  --bg-light: #F8F9FA;
  --bg-gray: #F5F5F5;
  
  /* Text Colors */
  --text-dark: #1A1A1A;
  --text-gray: #666666;
  --text-light-gray: #999999;
  --text-white: #FFFFFF;
  
  /* Accent Colors */
  --success: #1FDD8F;
  --warning: #FFB020;
  --danger: #FF5A5A;
  
  /* Gradients */
  --gradient-blue: linear-gradient(135deg, #2563A5 0%, #3B7BC8 100%);
  --gradient-yellow: linear-gradient(135deg, #FFE66D 0%, #FFD93D 100%);
  --gradient-green: linear-gradient(135deg, #A8E6CF 0%, #7FCDBB 100%);
  --gradient-pink: linear-gradient(135deg, #FFB3BA 0%, #FF8A95 100%);
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

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

html, body { 
  height: 100%; 
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-dark);
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* Navigation - Trust Wallet Style */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.top-nav .nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
  flex: 1;
  justify-content: center;
}

.top-nav .nav-links a {
  color: var(--text-dark);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 8px 0;
}

.top-nav .nav-links a:hover {
  color: var(--trust-blue);
}

.top-nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.3s;
}

.top-nav-logo:hover {
  opacity: 0.8;
}

.top-nav-logo img {
  height: 40px;
  width: 40px;
  object-fit: contain;
}

.top-nav-logo span {
  font-size: 24px;
  font-weight: 800;
  color: var(--trust-blue);
  letter-spacing: -0.5px;
}

body.has-top-nav {
  padding-top: 72px;
}

@media (max-width: 768px) {
  .top-nav {
    padding: 12px 20px;
  }
  
  .top-nav-logo img {
    height: 32px;
    width: 32px;
  }
  
  .top-nav-logo span {
    font-size: 20px;
  }
  
  body.has-top-nav {
    padding-top: 56px;
  }
}

/* Buttons - Trust Wallet Style */
.btn {
  cursor: pointer;
  border: 0;
  border-radius: var(--radius-md);
  padding: 12px 24px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: var(--trust-blue-gradient);
  color: var(--text-white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, var(--trust-blue-dark) 0%, var(--trust-blue) 100%);
}

.btn-secondary {
  background: var(--bg-white);
  color: var(--trust-blue);
  border: 2px solid var(--trust-blue);
}

.btn-secondary:hover {
  background: var(--bg-light);
}

.btn-block {
  width: 100%;
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--text-dark);
}

.btn-ghost:hover {
  background: var(--bg-light);
}

/* Forms - Trust Wallet Style */
.form {
  width: 100%;
  max-width: 420px;
  padding: 48px;
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 14px;
  color: var(--text-dark);
  margin-bottom: 8px;
  font-weight: 600;
}

.field input,
.field select {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 2px solid rgba(0, 0, 0, 0.1);
  background: var(--bg-white);
  color: var(--text-dark);
  outline: none;
  font-size: 15px;
  transition: all 0.3s ease;
}

.field input:focus,
.field select:focus {
  border-color: var(--trust-blue);
  box-shadow: 0 0 0 4px rgba(51, 117, 187, 0.1);
}

.field input::placeholder {
  color: var(--text-light-gray);
}

/* Cards - Trust Wallet Style */
.glass {
  background: var(--bg-white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card {
  padding: 32px;
  text-align: left;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-dark);
}

.card p {
  color: var(--text-gray);
  font-size: 15px;
  line-height: 1.7;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Sections */
.section {
  padding: 80px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.section h2 {
  font-size: 56px;
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--text-dark);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.section .lead {
  font-size: 20px;
  color: var(--text-gray);
  max-width: 700px;
  margin: 0 auto 60px;
  line-height: 1.6;
  font-weight: 400;
}

/* Gradient Sections */
.section-gradient-blue {
  background: var(--gradient-blue);
  color: var(--text-white);
}

.section-gradient-blue h2,
.section-gradient-blue .lead {
  color: var(--text-white);
}

.section-gradient-yellow {
  background: var(--gradient-yellow);
}

.section-gradient-green {
  background: var(--gradient-green);
}

.section-gradient-pink {
  background: var(--gradient-pink);
}

/* White Section */
.section-white {
  background: var(--bg-white);
}

/* Light Section */
.section-light {
  background: var(--bg-light);
}

/* Dashboard Styles */
.dash {
  padding: 40px;
  max-width: 1200px;
  margin: 40px auto;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.dash h1 {
  text-align: center;
  margin-bottom: 32px;
  color: var(--text-dark);
  font-size: 36px;
  font-weight: 800;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.muted {
  color: var(--text-gray);
  font-size: 14px;
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.table th,
.table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.table th {
  color: var(--text-gray);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: var(--bg-light);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
}

.chip.buy {
  background: rgba(31, 221, 143, 0.15);
  color: var(--success);
}

.chip.sell {
  background: rgba(255, 90, 90, 0.15);
  color: var(--danger);
}

/* Footer - Trust Wallet Style */
footer {
  background: #F5F5F5;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 80px 60px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 100px;
  width: 100%;
  margin-top: 60px;
}

.footer-logo {
  flex-shrink: 0;
  margin-top: 8px;
}

.footer-logo img {
  height: 80px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.footer-logo img:hover {
  transform: scale(1.05);
}

.footer-content {
  display: flex;
  gap: 120px;
  flex: 0 1 auto;
  justify-content: flex-start;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 180px;
}

.footer-column h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.footer-column a {
  color: var(--text-gray);
  text-decoration: none;
  font-size: 15px;
  line-height: 1.8;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-column a:hover {
  color: var(--trust-blue);
  transform: translateX(4px);
}

.footer-contact {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-gray);
  font-size: 15px;
  line-height: 1.8;
}

.footer-contact-icon {
  font-size: 20px;
  opacity: 0.9;
  flex-shrink: 0;
}

.footer-contact a {
  color: var(--text-gray);
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-contact a:hover {
  color: var(--trust-blue);
}

footer p {
  margin: 0;
}

@media (max-width: 768px) {
  footer {
    flex-direction: column;
    text-align: center;
    padding: 40px 20px;
    gap: 40px;
  }

  .footer-content {
    flex-direction: column;
    gap: 40px;
    width: 100%;
    justify-content: center;
  }

  .footer-logo img {
    height: 60px;
  }

  .footer-column {
    min-width: auto;
  }
}

/* Ticker */
.ticker {
  position: sticky;
  bottom: 0;
  width: 100%;
  background: var(--trust-blue-gradient);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 0;
  z-index: 100;
  overflow: hidden;
}

.ticker-track {
  display: inline-flex;
  animation: scroll-left 60s linear infinite;
  gap: 40px;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-white);
}

.ticker-token {
  color: var(--text-white);
  font-weight: 600;
}

.ticker-price {
  color: var(--text-white);
  font-weight: 600;
}

@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (max-width: 768px) {
  .ticker-item {
    padding: 0 12px;
    font-size: 11px;
  }
}

/* Utilities */
.spaced {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.small {
  font-size: 12px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color: var(--text-gray);
}

.faint {
  color: var(--text-light-gray);
}

.accent {
  color: var(--trust-blue);
}

/* Centered Fullscreen Layout */
.centered-fullscreen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg-light);
}

/* Address Row */
.address-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.addr {
  font-size: 14px;
  word-break: break-all;
  color: var(--text-dark);
}

.copy-btn {
  background: var(--bg-light);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--text-dark);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.3s ease;
}

.copy-btn:hover {
  background: var(--trust-blue);
  color: var(--text-white);
  border-color: var(--trust-blue);
}

/* KPI Widgets */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.kpi {
  padding: 24px;
  text-align: left;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: var(--shadow-sm);
}

.kpi .label {
  color: var(--text-gray);
  font-size: 12px;
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi .value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-dark);
}

.kpi .delta {
  font-size: 12px;
  margin-top: 8px;
  font-weight: 600;
}

.delta.up {
  color: var(--success);
}

.delta.down {
  color: var(--danger);
}

@media (max-width: 900px) {
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .kpis {
    grid-template-columns: 1fr;
  }
}

/* Select Options */
select option {
  background: var(--bg-white) !important;
  color: var(--text-dark) !important;
  padding: 12px 16px;
}

select option:hover,
select option:checked,
select option:focus {
  background: var(--bg-light) !important;
  color: var(--trust-blue) !important;
}

/* Subtle Separator */
.subtle-sep {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.08), transparent);
  margin: 24px 0;
}
