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

:root {
  --bg: #0a0d10;
  --surface: #0f1318;
  --surface2: #171c23;
  --border: #252c35;
  --text: #e6edf3;
  --text-dim: #7d8590;
  --accent: #39d353;
  --accent-glow: #4ae366;
  --accent-dim: rgba(57, 211, 83, 0.12);
  --green: #39d353;
  --red: #f85149;
  --orange: #d29922;
  --blue: #58a6ff;
}

body {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-glow); }

/* ===== HEADER ===== */
.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(15, 19, 24, 0.85);
}

.logo-link {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}

.logo-mark {
  width: 36px; height: 36px;
  flex-shrink: 0;
}

.logo-text {
  font-size: 22px; font-weight: 700; letter-spacing: -0.5px;
  color: var(--text);
}

.logo-text span {
  color: var(--accent);
}

.connect-btn {
  background: var(--accent); color: #0a0d10;
  border: none; padding: 10px 22px; border-radius: 8px;
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.connect-btn:hover {
  background: var(--accent-glow);
  box-shadow: 0 0 20px rgba(57, 211, 83, 0.3);
  transform: translateY(-1px);
}
.connect-btn.connected {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}
.connect-btn.connected:hover {
  background: var(--accent-dim);
}

.wallet-info {
  display: flex; align-items: center; gap: 12px;
}

.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); display: inline-block;
  box-shadow: 0 0 8px var(--accent);
}

/* ===== HERO ===== */
.hero {
  text-align: center;
  padding: 72px 24px 48px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 600px 300px at 50% 0%, rgba(57, 211, 83, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-logo {
  width: 80px; height: 80px;
  margin: 0 auto 24px;
  filter: drop-shadow(0 0 24px rgba(57, 211, 83, 0.3));
}

.hero h1 {
  font-size: 52px; font-weight: 700; margin-bottom: 16px;
  letter-spacing: -1.5px;
  color: var(--text);
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero p {
  font-size: 17px; color: var(--text-dim); max-width: 540px; margin: 0 auto;
  line-height: 1.7; font-weight: 400;
}

.stats-bar {
  display: flex; justify-content: center; gap: 48px;
  margin-top: 40px;
}

.stat { text-align: center; }

.stat-value {
  font-size: 32px; font-weight: 700; color: var(--accent);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 20px rgba(57, 211, 83, 0.25);
}

.stat-label {
  font-size: 11px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 1.5px;
  margin-top: 4px; font-weight: 500;
}

/* ===== MAIN ===== */
.main { max-width: 960px; margin: 0 auto; padding: 32px 24px 64px; }

/* ===== SECTIONS ===== */
.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.section-title {
  font-size: 15px; font-weight: 600; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-dim);
}

.section-title::before {
  content: '';
  width: 3px; height: 16px; border-radius: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

/* ===== FLAVOR PICKER ===== */
.flavor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.flavor-card {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.flavor-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.flavor-card.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 16px rgba(57, 211, 83, 0.1);
}

.flavor-card.selected::after {
  content: '';
  position: absolute; top: 10px; right: 10px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.flavor-card h3 {
  font-size: 15px; font-weight: 600; margin-bottom: 4px;
  color: var(--text);
}

.flavor-card p {
  font-size: 12px; color: var(--text-dim); line-height: 1.5;
}

.flavor-icon { font-size: 24px; margin-bottom: 10px; display: block; }

/* ===== PROGRESS BAR ===== */
.progress-section { display: none; }
.progress-section.visible { display: block; }

.progress-bar-outer {
  background: var(--surface2);
  border-radius: 6px; height: 28px;
  overflow: hidden; margin: 12px 0;
  border: 1px solid var(--border);
}

.progress-bar-inner {
  background: linear-gradient(90deg, var(--accent), var(--accent-glow));
  height: 100%; border-radius: 5px;
  transition: width 0.5s ease; width: 0%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; min-width: 40px;
  color: #0a0d10;
  box-shadow: 0 0 12px rgba(57, 211, 83, 0.3);
}

.progress-info {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--text-dim); font-weight: 500;
}

/* ===== SEND BUTTON ===== */
.send-section { text-align: center; margin-top: 20px; }

.send-btn {
  background: var(--accent);
  color: #0a0d10;
  border: none;
  padding: 14px 36px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.3px;
}

.send-btn:hover {
  background: var(--accent-glow);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(57, 211, 83, 0.3);
}

.send-btn:disabled {
  opacity: 0.4; cursor: not-allowed;
  transform: none; box-shadow: none;
}

/* ===== RENTAL CARDS ===== */
.rental-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}

.rental-card.active {
  border-color: var(--accent);
  box-shadow: inset 0 1px 0 var(--accent-dim);
}

.rental-card.provisioning {
  border-color: var(--orange);
  box-shadow: inset 0 1px 0 rgba(210, 153, 34, 0.1);
}

.rental-card.failed {
  border-color: var(--red);
}

.rental-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}

.rental-name {
  font-size: 15px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.rental-status {
  padding: 3px 10px; border-radius: 20px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
}

.rental-status.active {
  background: var(--accent-dim);
  color: var(--accent);
}

.rental-status.provisioning {
  background: rgba(210, 153, 34, 0.12);
  color: var(--orange);
}

.rental-status.expired {
  background: rgba(125, 133, 144, 0.12);
  color: var(--text-dim);
}

.rental-status.failed {
  background: rgba(248, 81, 73, 0.12);
  color: var(--red);
}

.rental-details {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  font-size: 12px;
}

.rental-detail {
  display: flex; justify-content: space-between;
  padding: 4px 0;
}

.rental-detail-label { color: var(--text-dim); font-weight: 400; }
.rental-detail-value { font-weight: 500; font-variant-numeric: tabular-nums; }

.rental-countdown {
  margin-top: 14px; text-align: center;
  font-size: 28px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  text-shadow: 0 0 24px rgba(57, 211, 83, 0.2);
  letter-spacing: 2px;
}

.rental-actions {
  display: flex; gap: 8px; margin-top: 14px;
}

.rental-link {
  background: var(--accent); color: #0a0d10;
  border: none; padding: 8px 16px; border-radius: 6px;
  font-family: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer; text-decoration: none;
  display: inline-block; text-align: center; flex: 1;
  transition: all 0.2s;
}

.rental-link:hover {
  background: var(--accent-glow); color: #0a0d10;
  text-decoration: none;
}

/* ===== ACTIVITY FEED ===== */
.feed { max-height: 300px; overflow-y: auto; }

.feed::-webkit-scrollbar { width: 4px; }
.feed::-webkit-scrollbar-track { background: transparent; }
.feed::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.feed-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(37, 44, 53, 0.5);
  font-size: 12px;
  animation: fadeIn 0.3s ease;
}
.feed-item:last-child { border-bottom: none; }

.feed-dot {
  width: 6px; height: 6px; border-radius: 50%;
  flex-shrink: 0;
}
.feed-dot.deposit { background: var(--blue); }
.feed-dot.active { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.feed-dot.expired { background: var(--text-dim); }
.feed-dot.failed { background: var(--red); }
.feed-dot.provisioning { background: var(--orange); }

.feed-text { flex: 1; color: var(--text-dim); }
.feed-text strong { color: var(--text); font-weight: 500; }
.feed-time { color: var(--text-dim); font-size: 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ===== TOAST ===== */
.toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 100;
  display: flex; flex-direction: column; gap: 8px;
}

.toast {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  min-width: 260px;
  font-size: 13px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: slideIn 0.3s ease;
  font-weight: 500;
}
.toast.success { border-color: var(--accent); color: var(--accent); }
.toast.error { border-color: var(--red); color: var(--red); }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center; padding: 40px 20px; color: var(--text-dim);
  font-size: 13px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .header { padding: 12px 16px; }
  .logo-text { font-size: 18px; }
  .hero { padding: 48px 16px 32px; }
  .hero-logo { width: 56px; height: 56px; }
  .hero h1 { font-size: 32px; letter-spacing: -1px; }
  .hero p { font-size: 15px; }
  .stats-bar { gap: 28px; }
  .stat-value { font-size: 24px; }
  .main { padding: 20px 16px; }
  .rental-details { grid-template-columns: 1fr; }
  .flavor-grid { grid-template-columns: 1fr 1fr; }
}

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

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}
