/* ============================================================
 *  MemeMint — styles.css
 * ============================================================ */

:root {
  --bg:           #0a0a0f;
  --bg-elev:      #131320;
  --bg-card:      #1a1a28;
  --border:       #252535;
  --border-hot:   #3a3a50;
  --text:         #e6e6f0;
  --text-dim:     #8a8aa0;
  --text-mute:    #5a5a70;
  --accent:       #ff1493;
  --accent-2:     #ffd700;
  --green:        #00d68f;
  --red:          #ff4d6d;
  --blue:         #00c9ff;
  --shadow:       0 8px 32px rgba(0,0,0,0.5);
  --shadow-hot:   0 4px 16px rgba(255, 20, 147, 0.4);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body {
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 20, 147, 0.10), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(255, 215, 0, 0.05), transparent 40%),
    var(--bg);
}

/* ============================================================
 *  Header
 * ============================================================ */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-icon {
  font-size: 28px;
  filter: drop-shadow(0 0 8px rgba(255, 20, 147, 0.5));
}
.logo-text {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
}
.logo-sub {
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: 4px;
}

.wallet-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wallet-status {
  font-size: 13px;
  color: var(--text-dim);
  padding: 6px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: monospace;
}

.wallet-status.connected {
  border-color: var(--green);
  color: var(--green);
}

/* Platform tags */
.platform-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.platform-tag.platform-youtube { background: #ff000022; color: #ff4040; }
.platform-tag.platform-tiktok  { background: #00f2ea22; color: #00d4d4; }
.platform-tag.platform-twitter { background: #1da1f222; color: #4d9fd9; }

.btn-connect {
  background: linear-gradient(135deg, var(--accent) 0%, #c2185b 100%);
  color: white;
  border: 0;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.btn-connect:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-hot);
}

.hidden { display: none !important; }

/* ============================================================
 *  Hero
 * ============================================================ */

.hero {
  max-width: 800px;
  margin: 60px auto;
  padding: 0 32px;
  text-align: center;
}
.hero h1 {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 20px;
}
.hero h1 strong {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0;
}
.hero strong { color: var(--text); }

/* ============================================================
 *  Step sections
 * ============================================================ */

.step {
  max-width: 1100px;
  margin: 0 auto 40px;
  padding: 32px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.step-header {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}

.step-num {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(255, 20, 147, 0.3);
}

.step-header h2 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.step-header p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
}

/* ============================================================
 *  Inputs / buttons
 * ============================================================ */

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 700px) {
  .input-row { grid-template-columns: 1fr; }
}

.input-card, .config-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.input-card label, .config-card label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  margin-top: 12px;
}
.input-card label:first-child, .config-card label:first-child {
  margin-top: 0;
}

.input-card input, .config-card input, .config-card select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 14px;
}
.input-card input:focus, .config-card input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 20, 147, 0.15);
}

.btn-primary, .btn-secondary, .btn-danger, .btn-ghost {
  border: 0;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #c2185b 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(255, 20, 147, 0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(255, 20, 147, 0.5); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); }

.btn-danger {
  background: linear-gradient(135deg, var(--red) 0%, #c9184a 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(255, 77, 109, 0.3);
}
.btn-danger:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  font-weight: 600;
}
.btn-ghost:hover { color: var(--accent); }

.btn-primary.big, .btn-secondary.big, .btn-danger.big {
  padding: 16px 24px;
  font-size: 16px;
}

/* ============================================================
 *  Channel preview
 * ============================================================ */

.channel-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.channel-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--accent);
}
.channel-info {
  flex: 1;
}
.channel-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.channel-meta {
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  gap: 12px;
}

/* ============================================================
 *  Videos grid
 * ============================================================ */

.videos-list {
  margin-top: 20px;
}
.videos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding: 0 4px;
}
.videos-count {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 600;
}
#videosGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.video-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.video-card.selected {
  border-color: var(--accent);
  background: rgba(255, 20, 147, 0.08);
  box-shadow: 0 0 0 1px var(--accent);
}
.video-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}
.video-meta {
  font-size: 12px;
  color: var(--text-mute);
  display: flex;
  gap: 8px;
}
.video-views {
  color: var(--accent-2);
  font-weight: 700;
}
.video-check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.video-card.selected .video-check {
  background: var(--accent);
  border-color: var(--accent);
}
.video-card.selected .video-check::after {
  content: '✓';
  color: white;
  font-size: 14px;
  font-weight: 800;
}

/* ============================================================
 *  Generate controls
 * ============================================================ */

.generate-controls {
  margin-top: 20px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 20px;
  align-items: end;
}
@media (max-width: 700px) {
  .generate-controls { grid-template-columns: 1fr; }
}
.control-row label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  display: block;
}
.control-row input[type="number"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}
.control-row input[type="checkbox"] {
  width: 20px; height: 20px;
  vertical-align: middle;
  margin-right: 8px;
}
.hint {
  font-size: 12px;
  color: var(--text-mute);
  display: block;
  margin-top: 4px;
}

/* ============================================================
 *  Tokens grid
 * ============================================================ */

.tokens-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.token-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.2s ease;
}
.token-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.token-logo {
  width: 100%;
  height: 180px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}
.token-logo svg {
  width: 100%;
  height: 100%;
}

.token-info {
  padding: 18px;
}

.token-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.token-rank {
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}
.token-ticker {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-2);
  letter-spacing: 0.02em;
}
.token-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.token-tagline {
  font-size: 13px;
  color: var(--accent);
  font-style: italic;
  margin-bottom: 12px;
  line-height: 1.4;
}

.token-desc {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 10px;
}

.token-lore {
  background: var(--bg);
  border-left: 2px solid var(--accent);
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 10px;
}

.token-source {
  font-size: 11px;
  color: var(--text-mute);
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.token-source b {
  color: var(--text-dim);
}

/* ============================================================
 *  Launch config
 * ============================================================ */

.launch-config {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.config-card h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================
 *  Launch actions
 * ============================================================ */

.launch-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.deploy-log {
  margin-top: 20px;
  background: #000;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  font-family: "SF Mono", Menlo, monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #00ff88;
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
}

/* ============================================================
 *  Modal
 * ============================================================ */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-content {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  max-width: 480px;
  width: calc(100% - 32px);
  position: relative;
  box-shadow: var(--shadow);
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: 0;
  color: var(--text-dim);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}
.modal-content h2 {
  margin: 0 0 8px;
  font-size: 22px;
}
.modal-sub {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 24px;
}

.wallet-options {
  display: grid;
  gap: 10px;
}
.wallet-option {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  text-align: left;
  color: var(--text);
}
.wallet-option:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.wallet-icon { font-size: 28px; }
.wallet-name { font-weight: 700; font-size: 15px; }
.wallet-desc { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

.modal-error {
  margin-top: 16px;
  padding: 12px;
  background: rgba(255, 77, 109, 0.1);
  border: 1px solid rgba(255, 77, 109, 0.3);
  color: var(--red);
  border-radius: 8px;
  font-size: 13px;
}

/* ============================================================
 *  Footer
 * ============================================================ */

footer {
  max-width: 1100px;
  margin: 60px auto 30px;
  padding: 24px 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-meta { color: var(--text-mute); font-size: 12px; }

/* ============================================================
 *  Trending bar
 * ============================================================ */
.trending-bar {
  margin-top: 18px;
  background: linear-gradient(135deg, rgba(255,20,147,0.08) 0%, rgba(255,215,0,0.05) 100%);
  border: 1px solid rgba(255,20,147,0.25);
  border-radius: 12px;
  padding: 14px 18px;
}
.trending-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.trending-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.trending-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
}
.trending-pill.hot {
  border-color: var(--accent);
  background: rgba(255,20,147,0.12);
}
.trending-pill .count { color: var(--accent-2); font-size: 11px; }

/* Meta tags on token cards */
.token-metas {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.meta-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 4px;
  background: rgba(255,215,0,0.12);
  color: var(--accent-2);
}
.meta-tag.primary {
  background: linear-gradient(135deg, rgba(255,20,147,0.2) 0%, rgba(255,215,0,0.12) 100%);
  color: #fff;
  border: 1px solid var(--accent);
}

.hype-score {
  font-size: 11px;
  color: var(--text-mute);
  margin-top: 6px;
}
.hype-score .bar {
  display: inline-block;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: middle;
}

/* Share classified banner */
#shareClassified {
  white-space: pre-wrap;
}
#shareClassified .chip {
  display: inline-block;
  padding: 2px 8px;
  background: var(--accent);
  color: white;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  margin-right: 6px;
}
.prediction-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}
.prediction-card h3 {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 700;
}
.prediction-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.summary-item .label {
  font-size: 11px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.summary-item .value {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}
.prediction-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.prediction-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-mute);
  padding: 8px 6px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.prediction-table td {
  padding: 10px 6px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
 *  Toast / notifications
 * ============================================================ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 14px;
  box-shadow: var(--shadow);
  z-index: 200;
  animation: slideIn 0.25s ease;
}
.toast.success { border-color: var(--green); color: var(--green); }
.toast.error   { border-color: var(--red);   color: var(--red); }
.toast.info    { border-color: var(--blue);  color: var(--blue); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
