:root {
  --primary: #14f195;
  --secondary: #9945ff;
  --background: #0a0e17;
  --card-bg: #121927;
  --text: #ffffff;
}

body {
  margin: 0;
  padding: 20px;
  background-color: var(--background);
  color: var(--text);
  font-family: 'Roboto Mono', monospace;
}

.dex-container {
  max-width: 1200px;
  margin: 0 auto;
}

.header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

.header-controls {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.solana-logo {
  width: 60px;
  height: 60px;
  margin-bottom: 1rem;
  animation: pulse 2s infinite;
}

h1 {
  color: var(--primary);
  font-size: 2.5rem;
  margin: 0;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
}

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Balance Display */
.balance-display {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 300px;
  overflow-y: auto;
}

/* Token Balance */
.token-balance {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  animation: slideIn 0.3s ease-out;
  cursor: pointer;
  transition: transform 0.2s;
}

.token-balance:hover {
  transform: scale(1.02);
}

/* Token Logo */
.token-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.token-logo.sol { background: var(--primary); color: var(--background); }
.token-logo.usdt { background: var(--secondary); color: var(--text); }

/* Form Elements */
.form-group {
  margin-bottom: 1rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

input, select {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  padding: 0.5rem;
  border-radius: 4px;
  flex: 1;
}

button {
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  border: none;
  color: var(--text);
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s;
}

button#resetBtn {
  background: linear-gradient(45deg, #ff4757, #ff6b81);
}

button:hover {
  transform: translateY(-2px);
}

/* Transaction Log */
.transaction-log {
  max-height: 300px;
  overflow-y: auto;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  margin-top: 1rem;
}

.transaction-entry {
  padding: 0.5rem;
  margin: 0.25rem 0;
  background: var(--card-bg);
  border-radius: 4px;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.transaction-entry .timestamp {
  color: var(--primary);
  opacity: 0.7;
}

/* Quote Result */
.quote-result {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

/* ICO Card */
.ico-card {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  animation: slideIn 0.3s ease-out;
}

/* ICO Chart */
.ico-chart {
  height: 200px;
  margin-top: 1rem;
}

/* Token Chip */
.token-chip {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  margin: 0.25rem;
}

.token-chip::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shine 1.5s infinite;
}

.token-chip .logo {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-right: 0.5rem;
}

/* Curve Controls */
.curve-controls {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.curve-controls input[type="range"] {
  width: 100%;
}

/* ICO Progress */
.ico-progress {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin: 1rem 0;
}

.ico-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Chart Container for Bonding Curve Analytics */
.chart-container {
  max-width: 100%;
  overflow-x: auto;
}

/* Animations */
@keyframes pulse {
  0% { opacity: 0.8; }
  50% { opacity: 1; }
  100% { opacity: 0.8; }
}

@keyframes slideIn {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes shine {
  100% {
    left: 100%;
  }
}

#icoMarketplace .ico-list {
  max-height: 300px;
  overflow-y: auto;
}