/* crypto.css — Slop Crypto page styles */

:root {
  --slop-green: #b8ff7a;
  --slop-pink: #ff5fa2;
  --slop-lavender: #b8a4e0;
  --slop-gold: #ffd700;
  --slop-orange: #ff8c42;
  --slop-red: #ff4444;
  --slop-blue: #4db8ff;
  --slop-bg: #16152a;
  --slop-card: #1e1d3a;
  --slop-border: #2a284a;
  --slop-text: #e8e6f0;
  --slop-muted: #8a88a0;
}

/* Wallet Styles */
.wallet-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.wallet-address {
  font-family: 'JetBrains Mono', monospace;
  background: var(--slop-card);
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--slop-border);
  font-size: 16px;
  color: var(--slop-green);
  flex: 1;
  min-width: 200px;
  user-select: all;
}

.wallet-balances {
  animation: fadeIn 0.3s ease;
}

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

.balance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.balance-card {
  background: var(--slop-card);
  border: 1px solid var(--slop-border);
  border-radius: 10px;
  padding: 16px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.balance-card:hover {
  transform: translateY(-2px);
  border-color: var(--slop-lavender);
  box-shadow: 0 8px 24px rgba(184, 164, 224, 0.15);
}

.balance-symbol {
  font-size: 24px;
  display: block;
  margin-bottom: 8px;
}

.balance-name {
  font-size: 12px;
  color: var(--slop-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.balance-amount {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: bold;
  color: var(--slop-green);
  margin-bottom: 4px;
}

.balance-value {
  font-size: 13px;
  color: var(--slop-muted);
}

.wallet-total {
  text-align: right;
  font-size: 14px;
  color: var(--slop-gold);
  font-weight: bold;
}

.wallet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

/* Token Grid */
.token-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.token-card {
  background: var(--slop-card);
  border: 2px solid var(--slop-border);
  border-radius: 14px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.token-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--token-color, var(--slop-green));
}

.token-card:hover {
  transform: translateY(-4px);
  border-color: var(--token-color, var(--slop-lavender));
  box-shadow: 0 12px 32px rgba(184, 164, 224, 0.2);
}

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

.token-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: var(--token-bg, linear-gradient(135deg, var(--slop-card), var(--slop-border)));
}

.token-info {
  flex: 1;
}

.token-symbol {
  font-size: 20px;
  font-weight: bold;
  color: var(--slop-text);
}

.token-name {
  font-size: 13px;
  color: var(--slop-muted);
}

.token-price {
  text-align: right;
}

.token-price-main {
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px;
  font-weight: bold;
  color: var(--slop-green);
}

.token-price-change {
  font-size: 13px;
  display: block;
  margin-top: 4px;
}

.token-price-change.positive { color: var(--slop-green); }
.token-price-change.negative { color: var(--slop-red); }

.token-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--slop-border);
}

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

.token-stat-label {
  font-size: 11px;
  color: var(--slop-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 4px;
}

.token-stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--slop-text);
}

.token-supply {
  font-size: 12px;
  color: var(--slop-muted);
  margin-top: 12px;
  text-align: center;
}

.token-tag {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--slop-border);
  color: var(--slop-muted);
  margin-top: 8px;
}

/* DEX Styles */
.dex-interface {
  background: var(--slop-card);
  border: 1px solid var(--slop-border);
  border-radius: 12px;
  padding: 20px;
}

.dex-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: end;
}

.dex-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dex-field label {
  font-size: 12px;
  color: var(--slop-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dex-field select,
.dex-field input {
  background: var(--slop-bg);
  border: 1px solid var(--slop-border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--slop-text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
}

.dex-field select:focus,
.dex-field input:focus {
  outline: none;
  border-color: var(--slop-lavender);
  box-shadow: 0 0 0 3px rgba(184, 164, 224, 0.2);
}

.dex-field input[readonly] {
  background: var(--slop-border);
  color: var(--slop-green);
}

.dex-balance {
  font-size: 12px;
  color: var(--slop-muted);
}

#dex-reverse {
  background: var(--slop-border);
  border: 1px solid var(--slop-border);
  border-radius: 8px;
  width: 44px;
  height: 44px;
  font-size: 18px;
  color: var(--slop-text);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

#dex-reverse:hover {
  background: var(--slop-lavender);
  color: var(--slop-bg);
  transform: rotate(180deg);
}

.dex-details {
  margin: 16px 0;
  padding: 12px;
  background: var(--slop-bg);
  border-radius: 8px;
  font-size: 13px;
  color: var(--slop-muted);
}

.dex-details p {
  margin: 4px 0;
}

.dex-route {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px !important;
  color: var(--slop-blue) !important;
}

.dex-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.dex-status {
  margin-top: 12px;
  text-align: center;
  color: var(--slop-muted);
}

/* NFT Styles */
.nft-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--slop-border);
  padding-bottom: 8px;
}

.nft-tabs button {
  background: none;
  border: 1px solid transparent;
  border-bottom: none;
  padding: 10px 16px;
  border-radius: 8px 8px 0 0;
  color: var(--slop-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.nft-tabs button:hover {
  color: var(--slop-text);
  background: var(--slop-bg);
}

.nft-tabs button[aria-selected="true"] {
  color: var(--slop-green);
  border-color: var(--slop-green);
  background: rgba(184, 255, 122, 0.1);
}

.nft-panels {
  position: relative;
}

.nft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.nft-card {
  background: var(--slop-card);
  border: 1px solid var(--slop-border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
  cursor: pointer;
}

.nft-card:hover {
  transform: translateY(-4px);
  border-color: var(--slop-lavender);
}

.nft-image {
  aspect-ratio: 1;
  background: var(--nft-bg, var(--slop-bg));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
  overflow: hidden;
}

.nft-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.03) 50%, transparent 60%);
  animation: nftShine 3s infinite;
}

@keyframes nftShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.nft-info {
  padding: 12px;
}

.nft-name {
  font-size: 14px;
  font-weight: bold;
  color: var(--slop-text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nft-collection {
  font-size: 11px;
  color: var(--slop-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.nft-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--slop-gold);
}

.nft-owned {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  background: rgba(184, 255, 122, 0.15);
  border: 1px solid var(--slop-green);
  border-radius: 6px;
  font-size: 11px;
  color: var(--slop-green);
}

/* Staking Styles */
.staking-pools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.staking-card {
  background: var(--slop-card);
  border: 1px solid var(--slop-border);
  border-radius: 12px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.staking-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--slop-green), var(--slop-gold), var(--slop-pink));
}

.staking-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.staking-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--slop-bg);
}

.staking-info {
  flex: 1;
}

.staking-token {
  font-weight: bold;
  color: var(--slop-text);
}

.staking-pair {
  font-size: 12px;
  color: var(--slop-muted);
}

.staking-apy {
  text-align: right;
}

.staking-apy-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: bold;
  color: var(--slop-gold);
  line-height: 1;
}

.staking-apy-label {
  font-size: 11px;
  color: var(--slop-muted);
  text-transform: uppercase;
}

.staking-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  background: var(--slop-bg);
  border-radius: 8px;
}

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

.staking-stat-label {
  font-size: 11px;
  color: var(--slop-muted);
  display: block;
}

.staking-stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  color: var(--slop-text);
}

.staking-actions {
  display: flex;
  gap: 8px;
}

.staking-actions button {
  flex: 1;
}

.staking-actions .small {
  padding: 10px 12px;
  font-size: 12px;
}

/* DAO Styles */
.dao-proposals {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.dao-proposal {
  background: var(--slop-card);
  border: 1px solid var(--slop-border);
  border-radius: 10px;
  padding: 16px;
}

.dao-proposal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.dao-proposal-title {
  font-weight: bold;
  color: var(--slop-text);
  font-size: 15px;
}

.dao-proposal-status {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  white-space: nowrap;
}

.dao-proposal-status.active {
  background: rgba(184, 255, 122, 0.2);
  color: var(--slop-green);
  border: 1px solid var(--slop-green);
}

.dao-proposal-status.passed {
  background: rgba(77, 184, 255, 0.2);
  color: var(--slop-blue);
  border: 1px solid var(--slop-blue);
}

.dao-proposal-status.failed {
  background: rgba(255, 68, 68, 0.2);
  color: var(--slop-red);
  border: 1px solid var(--slop-red);
}

.dao-proposal-meta {
  font-size: 12px;
  color: var(--slop-muted);
  margin-bottom: 12px;
}

.dao-proposal-votes {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

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

.dao-vote-bar {
  width: 80px;
  height: 6px;
  background: var(--slop-bg);
  border-radius: 3px;
  overflow: hidden;
}

.dao-vote-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.dao-vote-fill.for { background: var(--slop-green); }
.dao-vote-fill.against { background: var(--slop-red); }

.dao-vote-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--slop-text);
  min-width: 40px;
}

.dao-proposal-actions {
  display: flex;
  gap: 8px;
}

.dao-create {
  padding-top: 16px;
  border-top: 1px solid var(--slop-border);
}

.dao-create h3 {
  margin-bottom: 12px;
  color: var(--slop-text);
}

.dao-create input,
.dao-create textarea {
  width: 100%;
  background: var(--slop-bg);
  border: 1px solid var(--slop-border);
  border-radius: 8px;
  padding: 12px;
  color: var(--slop-text);
  font-family: inherit;
  margin-bottom: 12px;
}

.dao-create input:focus,
.dao-create textarea:focus {
  outline: none;
  border-color: var(--slop-lavender);
  box-shadow: 0 0 0 3px rgba(184, 164, 224, 0.2);
}

/* Rug Pull Styles */
.rug-interface {
  background: var(--slop-card);
  border: 1px solid var(--slop-border);
  border-radius: 12px;
  padding: 20px;
}

.rug-project {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.rug-project label {
  font-size: 12px;
  color: var(--slop-muted);
  display: block;
  margin-bottom: 6px;
}

.rug-project input {
  width: 100%;
  background: var(--slop-bg);
  border: 1px solid var(--slop-border);
  border-radius: 8px;
  padding: 12px;
  color: var(--slop-text);
  font-family: 'JetBrains Mono', monospace;
}

.rug-project input:focus {
  outline: none;
  border-color: var(--slop-lavender);
}

.rug-result {
  background: var(--slop-bg);
  border: 1px solid var(--slop-border);
  border-radius: 10px;
  padding: 20px;
  margin-top: 16px;
  animation: fadeIn 0.3s ease;
}

.rug-result h3 {
  color: var(--slop-red);
  margin-bottom: 12px;
}

.rug-result p {
  margin: 8px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}

.rug-result .rug-profit {
  color: var(--slop-green);
  font-weight: bold;
}

.rug-result .rug-loss {
  color: var(--slop-red);
}

/* Chart Styles */
.chart-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.chart-controls label {
  font-size: 12px;
  color: var(--slop-muted);
  display: block;
  margin-bottom: 4px;
}

.chart-controls select {
  background: var(--slop-bg);
  border: 1px solid var(--slop-border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--slop-text);
  font-family: inherit;
}

.chart-controls select:focus {
  outline: none;
  border-color: var(--slop-lavender);
}

.chart-container {
  position: relative;
  background: var(--slop-bg);
  border: 1px solid var(--slop-border);
  border-radius: 12px;
  height: 300px;
  margin-bottom: 12px;
}

#chart-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(22, 21, 42, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 12px;
  z-index: 10;
}

.chart-overlay .loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--slop-border);
  border-top-color: var(--slop-green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.chart-info {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
}

#chart-price {
  font-size: 24px;
  font-weight: bold;
  color: var(--slop-green);
}

#chart-change.positive { color: var(--slop-green); }
#chart-change.negative { color: var(--slop-red); }

#chart-high, #chart-low, #chart-volume {
  color: var(--slop-muted);
  font-size: 13px;
}

/* Crypto News Styles */
.cnews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.cnews-card {
  background: var(--slop-card);
  border: 1px solid var(--slop-border);
  border-radius: 12px;
  padding: 16px;
  transition: transform 0.2s, border-color 0.2s;
  cursor: pointer;
}

.cnews-card:hover {
  transform: translateY(-2px);
  border-color: var(--slop-lavender);
}

.cnews-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.cnews-card-category {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--slop-border);
  color: var(--slop-muted);
  text-transform: uppercase;
  white-space: nowrap;
}

.cnews-card-time {
  font-size: 11px;
  color: var(--slop-muted);
  white-space: nowrap;
}

.cnews-card-title {
  font-size: 15px;
  font-weight: bold;
  color: var(--slop-text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.cnews-card-summary {
  font-size: 13px;
  color: var(--slop-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.cnews-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--slop-border);
  font-size: 11px;
  color: var(--slop-muted);
}

.cnews-card-author {
  font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
  .dex-row {
    grid-template-columns: 1fr;
  }

  #dex-reverse {
    order: -1;
    margin-bottom: 8px;
    transform: rotate(90deg);
  }

  .token-stats,
  .staking-stats {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .balance-grid {
    grid-template-columns: 1fr;
  }

  .chart-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .chart-controls select {
    width: 100%;
  }

  .nft-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .nft-tabs button {
    flex-shrink: 0;
  }

  .chart-info {
    gap: 12px;
    font-size: 12px;
  }

  #chart-price {
    font-size: 18px;
  }
}

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

  .token-header {
    gap: 8px;
  }

  .token-price {
    text-align: left;
    width: 100%;
  }

  .staking-pools {
    grid-template-columns: 1fr;
  }

  .cnews-grid {
    grid-template-columns: 1fr;
  }

  .wallet-header {
    flex-direction: column;
    align-items: stretch;
  }

  .wallet-address {
    text-align: center;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .nft-image::after,
  .loading-spinner,
  .staking-apy-value,
  .token-card,
  .balance-card,
  .staking-card,
  .nft-card,
  .cnews-card {
    animation: none !important;
    transition: none !important;
  }
}