/* ═══════════════════════════════════════════════════════
   WHITEFLAME - Clean White Theme
   Burn Protocol
   ═══════════════════════════════════════════════════════ */

:root {
  --white: #FFFFFF;
  --off-white: #FAFAFA;
  --light-gray: #F0F0F0;
  --mid-gray: #E0E0E0;
  --text-primary: #1A1A1A;
  --text-secondary: #666666;
  --text-muted: #999999;
  --accent: #111111;
  --accent-soft: #333333;
  --success: #22C55E;
  --danger: #EF4444;
  --glow: rgba(255, 255, 255, 0.8);
}

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

html {
  font-size: 16px;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--accent);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Subtle noise texture */
.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px;
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════ */

.header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 40px;
  padding: 30px 40px;
  background: var(--white);
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.logo-section {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: var(--accent);
  border-radius: 12px;
  padding: 12px;
}

.logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 20px var(--glow));
}

.title-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.title {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 6px;
  color: var(--text-primary);
  line-height: 1;
}

.tagline {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 4px;
  color: var(--text-muted);
}

.status-section {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--light-gray);
  border-radius: 20px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: pulse 2s infinite;
}

.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
}

.status-dot.offline {
  background: var(--danger);
  animation: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.status-text {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-secondary);
}

.countdown-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.countdown-label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--text-muted);
}

.countdown-timer {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 2px;
}

/* ═══════════════════════════════════════════════════════
   STATS ROW
   ═══════════════════════════════════════════════════════ */

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--white);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-muted);
}

.stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════
   MAIN GRID
   ═══════════════════════════════════════════════════════ */

.main-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  margin-bottom: 24px;
}

/* Chart Section */
.chart-section {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--light-gray);
}

.section-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-secondary);
}

.token-info {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
}

#token-name {
  color: var(--text-secondary);
  font-weight: 500;
}

.token-price {
  font-family: 'JetBrains Mono', monospace;
  color: var(--success);
  font-weight: 500;
}

.chart-container {
  height: 500px;
  position: relative;
}

.chart-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.chart-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 2px;
}

.loader {
  width: 40px;
  height: 40px;
  border: 3px solid var(--light-gray);
  border-top-color: var(--text-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Info Column */
.info-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-card {
  background: var(--white);
  border-radius: 12px;
  padding: 20px 24px;
}

.info-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.ca-wrapper {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.ca-display {
  flex: 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  padding: 14px 16px;
  background: var(--off-white);
  border: 1px solid var(--mid-gray);
  border-radius: 8px;
  color: var(--text-primary);
  word-break: break-all;
  cursor: pointer;
  transition: border-color 0.2s;
}

.ca-display:hover {
  border-color: var(--text-secondary);
}

.copy-btn {
  padding: 14px 20px;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: var(--white);
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 2px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.copy-btn:hover {
  background: var(--accent-soft);
}

.copy-btn:active {
  transform: scale(0.98);
}

/* History Card */
.history-card {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.history-list {
  flex: 1;
  max-height: 350px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 16px;
  background: var(--off-white);
  border-radius: 8px;
  font-size: 0.75rem;
}

.history-item span {
  font-family: 'JetBrains Mono', monospace;
}

.history-item .time {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.history-item .tokens {
  color: var(--text-primary);
  font-weight: 500;
}

.history-item .usd {
  color: var(--success);
}

.history-item .sol {
  color: var(--text-secondary);
}

.history-empty {
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 2px;
}

/* ═══════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════ */

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 2px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-text {
  font-size: 0.65rem;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.4);
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */

@media (max-width: 1200px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
  
  .info-column {
    flex-direction: row;
  }
  
  .info-card {
    flex: 1;
  }
  
  .history-card {
    flex: 2;
  }
  
  .history-list {
    max-height: 200px;
  }
}

@media (max-width: 900px) {
  .header {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 20px;
  }
  
  .logo-section {
    margin: 0 auto;
  }
  
  .status-section {
    align-items: center;
  }
  
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .info-column {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 16px;
  }
  
  .header {
    padding: 24px;
  }
  
  .title {
    font-size: 1.6rem;
    letter-spacing: 4px;
  }
  
  .stats-row {
    grid-template-columns: 1fr;
  }
  
  .chart-container {
    height: 350px;
  }
  
  .footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* ═══════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════ */

.counting {
  animation: countPop 0.3s ease-out;
}

@keyframes countPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Scrollbar */
.history-list::-webkit-scrollbar {
  width: 6px;
}

.history-list::-webkit-scrollbar-track {
  background: var(--light-gray);
  border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
  background: var(--mid-gray);
  border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
