/* PuffCounter visual theme — look only. Do not change tracker logic. */

:root {
  --bg: #050508;
  --text: #ececf2;
  --text-soft: #c4c4d0;
  --text-muted: #8f8f9c;
  --glass: rgba(10, 10, 14, 0.58);
  --glass-strong: rgba(12, 12, 16, 0.78);
  --glass-border: rgba(255, 255, 255, 0.1);
  --pill: #f3f3f6;
  --pill-text: #111114;
  --warn: #f0c2c2;
  --warn-bg: rgba(180, 70, 80, 0.12);
  --link: #cfc6ff;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  text-align: center;
  font-family: Inter, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image: url("atmosphere.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 7.25rem 1.25rem 3.5rem;
  position: relative;
}

body.home {
  justify-content: center;
  padding-top: 6.5rem;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 45%, rgba(90, 70, 160, 0.18), transparent 62%),
    linear-gradient(180deg, rgba(5, 5, 8, 0.18), rgba(5, 5, 8, 0.55));
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
}

.site-nav,
#container,
#ageVerification {
  position: relative;
  z-index: 2;
}

body:has(#ageVerification:not([style*="display: none"])) .site-nav {
  opacity: 0;
  pointer-events: none;
}

.site-nav {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px 22px;
  padding: 7px 8px 7px 16px;
  background: rgba(8, 8, 12, 0.72);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.02em;
  padding-right: 6px;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(214, 196, 255, 0.95);
  box-shadow:
    0 0 0 3px rgba(120, 100, 210, 0.28),
    inset 0 0 0 3px rgba(110, 150, 255, 0.28);
}

.site-nav nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 400;
  padding: 8px 12px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav nav a:hover,
.site-nav nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

#container {
  width: 100%;
  max-width: 620px;
  padding: 40px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

body.home #container {
  max-width: 720px;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 24px 16px 8px;
}

h1 {
  margin: 0 0 0.6em;
  font-size: clamp(2rem, 5.4vw, 3.35rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.15;
  color: var(--text);
}

body.tracker h1 {
  font-size: clamp(1.7rem, 4vw, 2.35rem);
}

h2, h3 {
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--text);
}

p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-soft);
}

a {
  color: var(--link);
}

button {
  appearance: none;
  padding: 12px 22px;
  margin: 8px 6px;
  background: var(--pill);
  color: var(--pill-text);
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

button:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.38);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

select,
input {
  padding: 10px 14px;
  margin: 6px 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  max-width: 100%;
}

select:focus,
input:focus {
  outline: 2px solid rgba(180, 160, 255, 0.45);
  outline-offset: 1px;
}

option {
  background: #14141c;
  color: #f0f0f4;
}

#newUserBox {
  display: none;
  margin: 10px 0;
}

#puffCount,
#cigCount {
  font-size: clamp(3.4rem, 10vw, 5.4rem);
  font-weight: 300;
  letter-spacing: -0.06em;
  line-height: 1;
  margin: 22px 0;
  color: #f6f6fa;
}

.warning-text,
.health-impact,
.cost-tracker,
.help-resources,
.quit-resources,
.usage-type-selector,
.strain-selector {
  margin: 14px 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.5;
}

.warning-text,
.health-impact,
.cost-tracker {
  color: var(--warn);
  background: var(--warn-bg);
  border-color: rgba(240, 160, 160, 0.16);
}

.cost-details {
  font-size: 13px;
  margin-top: 10px;
  text-align: left;
  color: var(--text-muted);
}

.strain-selector label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text-soft);
}

#strainSearch {
  width: 100%;
  margin: 0 0 8px;
}

#strainSelect {
  width: 100%;
  min-height: 132px;
  background: rgba(0, 0, 0, 0.28);
  font-size: 13px;
}

#selectedStrainInfo {
  font-size: 13px;
  margin-top: 8px;
  color: var(--text-muted);
}

#ageVerification {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  background: rgba(5, 5, 8, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 16px;
  overflow: auto;
}

.age-box {
  width: min(520px, 100%);
  padding: 32px 22px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  text-align: center;
  color: var(--text);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.age-box h2 {
  margin: 0 0 16px;
  font-size: clamp(1.35rem, 4.6vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  color: var(--text);
  white-space: normal;
  overflow-wrap: anywhere;
}

.age-box p {
  margin: 0 0 16px;
  color: var(--text-soft);
}

.smoke {
  position: fixed;
  width: 15px;
  height: 15px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  pointer-events: none;
  animation: smoke 2s forwards;
  z-index: 50;
}

@keyframes smoke {
  0% { opacity: 0.8; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-100px) scale(2); }
}

@media (max-width: 640px) {
  body {
    padding: 6.2rem 0.9rem 2.4rem;
  }

  #container {
    padding: 28px 18px;
    border-radius: 22px;
  }

  .site-nav {
    width: calc(100% - 20px);
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px 6px 12px;
  }

  .site-nav nav a {
    padding: 8px 8px;
    font-size: 12.5px;
  }

  button {
    margin: 6px 4px;
  }

  #strainSelect {
    font-size: 12px;
  }
}
