* {
  box-sizing: border-box;
}

:root {
  --bg: #0b0d13;
  --panel: rgba(15, 20, 31, 0.72);
  --panel-strong: rgba(18, 24, 38, 0.92);
  --card: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.1);
  --text: #f4f6fb;
  --muted: #a0a8bb;
  --accent: #ff6b3d;
  --accent-soft: rgba(255, 107, 61, 0.18);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Inter", system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 107, 61, 0.12), transparent 30%),
    linear-gradient(180deg, #0a0d14 0%, #0b0f18 100%);
  color: var(--text);
}

body {
  position: relative;
  overflow-x: hidden;
}

.page-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 40px auto;
  position: relative;
  z-index: 1;
}

.hero-card,
.app-card {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--panel);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 32px;
  margin-bottom: 22px;
}

.hero-topline {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  max-width: 860px;
}

.hero-copy {
  margin: 18px 0 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 820px;
}

.hero-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.mode-chip {
  appearance: none;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.mode-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.18);
}

.mode-chip.is-active {
  background: linear-gradient(180deg, rgba(255, 107, 61, 0.26), rgba(255, 107, 61, 0.12));
  border-color: rgba(255, 107, 61, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.formula-note {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.app-card {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 24px;
  padding: 24px;
}

.input-side,
.result-side {
  min-width: 0;
}

.input-label {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 16px;
  font-weight: 600;
}

textarea {
  width: 100%;
  min-height: 520px;
  resize: vertical;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--panel-strong);
  color: var(--text);
  padding: 22px 22px 24px;
  font: inherit;
  font-size: 17px;
  line-height: 1.7;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

textarea::placeholder {
  color: #7d879c;
}

textarea:focus {
  border-color: rgba(255, 107, 61, 0.38);
  box-shadow: 0 0 0 4px rgba(255, 107, 61, 0.08);
}

.action-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.primary-btn,
.ghost-btn {
  appearance: none;
  border: none;
  border-radius: 18px;
  padding: 14px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
}

.primary-btn {
  background: linear-gradient(180deg, #ff7b51, #ef5b2f);
  color: white;
  box-shadow: 0 16px 34px rgba(255, 107, 61, 0.28);
}

.ghost-btn {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mini-info {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.time-panel,
.details-card,
.stat-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
}

.time-panel {
  padding: 24px;
}

.time-label {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 8px;
}

.time-value {
  font-size: clamp(38px, 5vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-weight: 800;
}

.time-split {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.time-box {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
}

.time-box span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.time-box strong {
  font-size: 26px;
  letter-spacing: -0.03em;
}

.stats-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.stat-card {
  padding: 18px 18px 20px;
}

.stat-title {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.stat-value {
  display: block;
  margin-top: 10px;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.05em;
}

.details-card {
  margin-top: 18px;
  padding: 22px;
}

.details-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.details-head h2 {
  margin: 0;
  font-size: 18px;
}

#detailsBadge {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #ffd7cb;
  font-size: 12px;
  font-weight: 700;
}

#detailsList {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.45;
  pointer-events: none;
}

.orb-1 {
  width: 300px;
  height: 300px;
  top: -60px;
  right: 8%;
  background: rgba(255, 107, 61, 0.28);
}

.orb-2 {
  width: 260px;
  height: 260px;
  left: -60px;
  bottom: 10%;
  background: rgba(96, 64, 255, 0.18);
}

.grid-overlay {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 90%);
  pointer-events: none;
}

@media (max-width: 980px) {
  .app-card {
    grid-template-columns: 1fr;
  }

  textarea {
    min-height: 360px;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 16px, 1220px);
    margin: 16px auto 28px;
  }

  .hero-card,
  .app-card {
    border-radius: 22px;
  }

  .hero-card {
    padding: 22px;
  }

  .app-card {
    padding: 14px;
    gap: 16px;
  }

  .time-split,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .action-row {
    flex-direction: column;
  }
}
.author-card {
  margin-top: 18px;
  padding: 22px 24px;
  border-radius: 24px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
}

.author-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.author-text strong {
  display: block;
  font-size: 18px;
}

.author-text span {
  font-size: 14px;
  color: var(--muted);
}

.author-btn {
  text-decoration: none;
  padding: 14px 18px;
  border-radius: 16px;
  font-weight: 700;
  background: linear-gradient(180deg, #ff7b51, #ef5b2f);
  color: white;
  transition: 0.2s;
}

.author-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(255,107,61,0.3);
}

.author-note {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}
