:root {
  --bg: #070707;
  --bg-elevated: #17171f;
  --accent: #ff8a3d;
  --accent-soft: #3b2514;
  --accent-strong: #ffb662;
  --accent-secondary: #39c779;
  --text-main: #f7f7f2;
  --text-soft: #b7b5aa;
  --border-soft: #2c2a24;
  --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.7);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --transition-fast: 160ms ease-out;
  --transition-med: 220ms ease-out;
  --app-max-width: 100%;
}

*, 
*::before, 
*::after {
  box-sizing: border-box;
}

html, 
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background: radial-gradient(circle at top left, #151515 0, #050505 50%, #000000 100%);
}

body {
  display: flex;
  justify-content: center;
  align-items: stretch;
}

/* App layout (one screen, no page scroll) */

.app {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 12px 12px 14px;
}

/* Top bar */

.top-bar {
  background: radial-gradient(circle at top left, #27272f 0, #15151c 55%, #111117 100%);
  backdrop-filter: blur(18px);
  border-radius: calc(var(--radius-lg) + 4px);
  padding: 10px 12px 8px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.top-bar::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at top right, rgba(255, 138, 61, 0.35), transparent 60%);
  opacity: 0.9;
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 14px;
  background: conic-gradient(from 160deg, #ffb662, var(--accent-secondary), var(--accent));
  color: #100f0d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.brand-tagline {
  font-size: 11px;
  color: var(--text-soft);
}

/* Tabs */

.tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 4px;
  background: #1a1814;
  border-radius: 16px;
}

.tab {
  border: none;
  outline: none;
  padding: 6px 4px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-soft);
  background: transparent;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), transform 80ms ease-out, box-shadow var(--transition-fast);
  white-space: nowrap;
}

.tab:active {
  transform: scale(0.96);
}

.tab.active {
  background: #2a261f;
  color: var(--accent-strong);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7);
}

/* Main area */

.view-container {
  margin-top: 10px;
  margin-bottom: 10px;
  flex: 1;
  position: relative;
  border-radius: calc(var(--radius-lg) + 2px);
  background: radial-gradient(circle at top, #18171d 0, #100f14 45%, #080808 100%);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

/* Views behave like lightweight tabs (no page scroll) */

.view {
  position: absolute;
  inset: 0;
  padding: 10px 12px 12px;
  display: none;
  flex-direction: column;
}

.view.active {
  display: flex;
}

/* Section header */

.section-header {
  padding-bottom: 4px;
}

.section-header h1 {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.25;
}

.section-header p {
  margin: 0;
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.4;
}

/* Fun animated tip */

.fun-tip {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 138, 61, 0.14);
  border: 1px solid rgba(255, 182, 98, 0.5);
  font-size: 11px;
  color: #ffe5c5;
  position: relative;
  overflow: hidden;
}

.fun-tip::before {
  content: "⚡";
  font-size: 12px;
  animation: tip-bounce 1.4s infinite ease-out;
}

@keyframes tip-bounce {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-2px); }
}

/* Scrollable content panel inside each tab */

.scroll-panel {
  margin-top: 8px;
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
}

/* Compact, clean scrollbar (mobile-safe) */

.scroll-panel::-webkit-scrollbar {
  width: 4px;
}

.scroll-panel::-webkit-scrollbar-track {
  background: transparent;
}

.scroll-panel::-webkit-scrollbar-thumb {
  background: #393837;
  border-radius: 999px;
}

/* Cards */

.cards-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card {
  background: linear-gradient(150deg, #191922, #14141b);
  border-radius: var(--radius-md);
  padding: 10px;
  border: 1px solid rgba(255, 182, 98, 0.18);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-med), box-shadow var(--transition-med), border-color var(--transition-med), background var(--transition-med);
}

.card::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 182, 98, 0.45), transparent 60%);
  opacity: 0.7;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9);
  border-color: rgba(255, 181, 112, 0.85);
  background: linear-gradient(150deg, #201f2a, #171721);
}

.card h2 {
  margin: 0 0 4px;
  font-size: 15px;
}

.card-highlight {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--accent-strong);
}

.card-list {
  margin: 0;
  padding-left: 16px;
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.35;
}

.card-list li + li {
  margin-top: 3px;
}

.card-footer {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--text-soft);
}

/* Text panels */

.text-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.text-block {
  background: #17161f;
  border-radius: var(--radius-md);
  padding: 9px 9px 10px;
  border: 1px solid #2b2a33;
}

.text-block h2 {
  margin: 0 0 4px;
  font-size: 14px;
}

.text-block p {
  margin: 0 0 5px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-soft);
}

.text-block p:last-child {
  margin-bottom: 0;
}

.bullet-list {
  margin: 0;
  padding-left: 16px;
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.4;
}

.bullet-list li + li {
  margin-top: 4px;
}

/* Bottom bar */

.bottom-bar {
  background: radial-gradient(circle at top left, #15120f 0, #090806 40%, #000000 100%);
  color: #f5f5f0;
  border-radius: calc(var(--radius-lg) + 6px);
  padding: 8px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.95);
}

.footer-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-title {
  font-size: 12px;
  font-weight: 600;
}

.footer-text {
  font-size: 11px;
  color: #b6b3a7;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #7e7b72;
}

.footer-meta .dot {
  opacity: 0.8;
}

/* Small screens tweaks */

@media (max-width: 360px) {
  .brand-tagline {
    display: none;
  }
  .tabs {
    font-size: 10px;
  }
  .app {
    padding: 8px 8px 10px;
  }
}