/* ============================================
   $HODL Terminal - Clean Dark Theme
   ============================================ */

:root {
  --bg-primary: #0d0d0f;
  --bg-secondary: #141418;
  --bg-highlight: #1c1c22;
  --text-primary: #e8e8ec;
  --text-secondary: #a0a0a8;
  --text-dim: #606068;
  --text-muted: #404048;
  --accent: #f0b90b;
  --accent-dim: #a68208;
  --warning: #ff9500;
  --error: #ff453a;
  --border: #2a2a32;
  --success: #30d158;
}

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

html, body {
  height: 100%;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'SF Mono', 'Fira Code', 'IBM Plex Mono', 'Consolas', monospace;
  font-size: 14px;
  line-height: 1.6;
  overflow: hidden;
}

/* Selection */
::selection {
  background: var(--accent);
  color: var(--bg-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

/* ============================================
   Terminal Container
   ============================================ */

#terminal {
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  max-width: 900px;
  margin: 0 auto;
}

/* ============================================
   Links Section
   ============================================ */

#links-bar {
  background: var(--bg-secondary);
  padding: 12px 24px;
  display: flex;
  justify-content: center;
  gap: 32px;
  border-bottom: 1px solid var(--border);
}

#links-bar a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

#links-bar a:hover {
  color: var(--accent);
}

#links-bar a::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
}

/* ============================================
   Character/Mascot
   ============================================ */

#character-container {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#character-img {
  height: 120px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 20px rgba(240, 185, 11, 0.15));
  transition: transform 0.3s ease, filter 0.3s ease;
}

#character-img:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 6px 30px rgba(240, 185, 11, 0.25));
}

/* ============================================
   Contract Address Header
   ============================================ */

#ca-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  text-align: center;
  position: relative;
}

.ca-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.ca-value {
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--bg-highlight);
  border-radius: 6px;
  transition: all 0.2s ease;
  word-break: break-all;
  border: 1px solid transparent;
}

.ca-value:hover {
  border-color: var(--accent-dim);
  background: var(--bg-primary);
}

#ca-text {
  font-weight: 500;
  font-family: 'SF Mono', monospace;
}

.ca-copy-hint {
  font-size: 10px;
  color: var(--text-muted);
}

.ca-copied-msg {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--success);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ca-copied-msg.show {
  opacity: 1;
}

/* ============================================
   Timer Bar
   ============================================ */

#timer-bar {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
  display: flex;
  gap: 8px;
  font-size: 12px;
}

#timer-label {
  color: var(--text-dim);
}

#timer-value {
  color: var(--text-secondary);
}

#timer-value.countdown {
  color: var(--accent);
  font-weight: 500;
}

#timer-value.generating {
  color: var(--warning);
  animation: pulse 1.5s ease-in-out infinite;
}

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

/* ============================================
   Terminal Output
   ============================================ */

#terminal-output {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

#entries-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.entry {
  padding: 16px 20px;
  background: var(--bg-secondary);
  border-radius: 8px;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-wrap: break-word;
  border-left: 3px solid var(--border);
  transition: border-color 0.3s ease;
}

.entry.typing {
  border-left-color: var(--accent);
}

.entry.developer-entry {
  border-left-color: var(--warning);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(240, 185, 11, 0.05) 100%);
}

.entry-content {
  color: var(--text-secondary);
  line-height: 1.7;
}

#boot-sequence {
  display: none;
}

/* ============================================
   Terminal Footer
   ============================================ */

#terminal-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.prompt {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

.cursor-blink {
  display: inline-block;
  width: 2px;
  height: 16px;
  background: var(--accent);
  animation: blink 1s ease-in-out infinite;
  border-radius: 1px;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ============================================
   Countdown Display (Pre-publish)
   ============================================ */

.countdown-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.countdown-label {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.countdown-value {
  font-size: 36px;
  color: var(--accent);
  letter-spacing: 3px;
  font-weight: 600;
}

.countdown-subtext {
  margin-top: 24px;
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================
   Empty State
   ============================================ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  color: var(--text-dim);
}

.empty-state-icon {
  font-size: 32px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 13px;
}

/* ============================================
   Utility
   ============================================ */

.hidden {
  display: none !important;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  html, body {
    font-size: 13px;
  }

  #links-bar {
    gap: 20px;
    padding: 10px 16px;
  }

  #character-container {
    padding: 16px;
  }

  #character-img {
    height: 90px;
  }

  #ca-header {
    padding: 14px 16px;
  }

  .ca-value {
    font-size: 11px;
    flex-direction: column;
    gap: 6px;
    padding: 10px 14px;
  }

  #terminal-output {
    padding: 16px;
  }

  .entry {
    padding: 14px 16px;
  }

  .countdown-value {
    font-size: 28px;
  }
}
