/* =========================================================
   ChemCalc Pro
   Main Stylesheet
   css/style.css
========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  --bg: #07111f;
  --bg-secondary: #0b1728;
  --surface: #0f1d30;
  --surface-2: #13243a;
  --surface-3: #182b44;

  --border: rgba(148, 163, 184, 0.14);
  --border-light: rgba(148, 163, 184, 0.22);

  --text: #e7eef8;
  --text-secondary: #9eacc0;
  --text-muted: #6f8097;

  --primary: #38bdf8;
  --primary-dark: #0284c7;
  --primary-soft: rgba(56, 189, 248, 0.12);

  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;

  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 12px 35px rgba(0, 0, 0, 0.24);
  --shadow-lg: 0 25px 70px rgba(0, 0, 0, 0.35);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --sidebar-width: 270px;
  --topbar-height: 76px;

  --transition-fast: 0.18s ease;
  --transition: 0.28s ease;
}

.icon {
  width: 24px;
  height: 24px;
}

button img,
button svg {
  width: 20px;
  height: 20px;
}
/* =========================================================
   LIGHT THEME
========================================================= */

body.light-theme {
  --bg: #f3f7fb;
  --bg-secondary: #eaf1f8;
  --surface: #ffffff;
  --surface-2: #f7fafc;
  --surface-3: #edf4fa;

  --border: rgba(15, 23, 42, 0.09);
  --border-light: rgba(15, 23, 42, 0.15);

  --text: #102033;
  --text-secondary: #506176;
  --text-muted: #75859a;

  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-soft: rgba(2, 132, 199, 0.09);

  --shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 12px 35px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 25px 70px rgba(15, 23, 42, 0.12);
}

/* Default = Dark */
:root {
  --bg: #07111f;
  --surface: #0d1b2a;
  --text: #f1f5f9;
}

/* =========================================================
   RESET
========================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 10% 10%,
      rgba(56, 189, 248, 0.06),
      transparent 30%
    ),
    var(--bg);

  color: var(--text);

  font-family:
    "Inter",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  line-height: 1.6;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* =========================================================
   APP
========================================================= */

#app {
  min-height: 100vh;
}

/* =========================================================
   TOPBAR
========================================================= */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;

  height: var(--topbar-height);

  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 24px;

  background: rgba(7, 17, 31, 0.88);
  border-bottom: 1px solid var(--border);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body.light-theme .topbar {
  background: rgba(255, 255, 255, 0.88);
}

/* =========================================================
   BRAND
========================================================= */

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 270px;
}

.brand-logo {
  width: 44px;
  height: 44px;

  display: grid;
  place-items: center;

  border-radius: 12px;

  color: var(--primary);
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.18),
    rgba(56, 189, 248, 0.04)
  );

  border: 1px solid rgba(56, 189, 248, 0.2);

  font-size: 25px;

  box-shadow: 0 0 25px rgba(56, 189, 248, 0.08);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.brand-text h1 {
  font-size: 17px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-text span {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* =========================================================
   HEADER ACTIONS
========================================================= */

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-box {
  width: 310px;
  height: 42px;

  display: flex;
  align-items: center;
  gap: 10px;

  padding: 0 13px;

  border: 1px solid var(--border);
  border-radius: 10px;

  background: var(--surface);

  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

.search-box:focus-within {
  border-color: rgba(56, 189, 248, 0.5);

  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.08);
}

.search-box > span {
  color: var(--text-muted);
  font-size: 15px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;

  background: transparent;
  color: var(--text);

  font-size: 13px;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.icon-button {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  border: 1px solid var(--border);
  border-radius: 10px;

  background: var(--surface);
  color: var(--text-secondary);

  transition:
    transform var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    background var(--transition-fast);
}

.icon-button:hover {
  color: var(--primary);
  border-color: rgba(56, 189, 248, 0.3);
  background: var(--primary-soft);
  transform: translateY(-1px);
}

.mobile-only {
  display: none;
}

/* =========================================================
   APPLICATION
========================================================= */

.application {
  display: flex;
  min-height: 100vh;
}

/* =========================================================
   SIDEBAR
========================================================= */

.sidebar {
  position: fixed;

  top: var(--topbar-height);
  left: 0;
  bottom: 0;

  width: var(--sidebar-width);

  display: flex;
  flex-direction: column;

  background: linear-gradient(180deg, var(--bg-secondary), var(--bg));

  border-right: 1px solid var(--border);

  z-index: 900;

  overflow-y: auto;
  overflow-x: hidden;

  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 5px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 20px;
}

/* =========================================================
   SIDEBAR HEADER
========================================================= */

.sidebar-header {
  padding: 25px 20px 15px;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-header > span {
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.sidebar-header small {
  color: var(--text-muted);
  font-size: 10px;
}

/* =========================================================
   NAVIGATION
========================================================= */

.navigation {
  display: flex;
  flex-direction: column;
  gap: 5px;

  padding: 0 12px;
}

.nav-item {
  position: relative;

  width: 100%;
  min-height: 46px;

  display: flex;
  align-items: center;
  gap: 13px;

  padding: 0 13px;

  border-radius: 10px;

  background: transparent;
  color: var(--text-secondary);

  text-align: left;

  font-size: 12px;
  font-weight: 500;

  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.nav-item > span:first-child {
  width: 22px;

  display: grid;
  place-items: center;

  color: var(--text-muted);
  font-size: 16px;

  transition: color var(--transition-fast);
}

.nav-item:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.06);
  transform: translateX(2px);
}

.nav-item:hover > span:first-child {
  color: var(--primary);
}

.nav-item.active {
  color: var(--primary);
  background: var(--primary-soft);
}

.nav-item.active > span:first-child {
  color: var(--primary);
}

.nav-item.active::before {
  content: "";

  position: absolute;

  left: 0;
  top: 9px;
  bottom: 9px;

  width: 3px;

  border-radius: 0 5px 5px 0;

  background: var(--primary);

  box-shadow: 0 0 12px rgba(56, 189, 248, 0.55);
}

/* =========================================================
   SIDEBAR FOOTER
========================================================= */

.sidebar-footer {
  margin-top: auto;
  padding: 18px 18px 22px;

  border-top: 1px solid var(--border);
}

.system-status {
  display: flex;
  align-items: center;
  gap: 8px;

  color: var(--text-secondary);

  font-size: 11px;
  font-weight: 500;
}

.status-dot {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: var(--success);

  box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
}

.sidebar-footer small {
  display: block;

  margin-top: 5px;
  margin-left: 15px;

  color: var(--text-muted);
  font-size: 9px;

  font-family: "JetBrains Mono", monospace;
}

/* =========================================================
   MAIN CONTENT
========================================================= */

.main-content {
  width: calc(100% - var(--sidebar-width));

  min-height: 100vh;

  margin-left: var(--sidebar-width);
  padding: calc(var(--topbar-height) + 30px) 34px 50px;
}

/* =========================================================
   PAGE SECTION
========================================================= */

.page-section {
  display: none;

  width: 100%;
  max-width: 1500px;

  margin: 0 auto;
}

.page-section.active-section {
  display: block;
}

/* =========================================================
   HERO
========================================================= */

.hero {
  position: relative;
  min-height: 410px;
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  align-items: center;

  padding: 52px;

  overflow: hidden;

  border: 1px solid var(--border);
  border-radius: var(--radius-xl);

  background:
    radial-gradient(
      circle at 80% 30%,
      rgba(56, 189, 248, 0.11),
      transparent 32%
    ),
    linear-gradient(135deg, var(--surface), var(--surface-2));

  box-shadow: var(--shadow-md);
}

.hero::before {
  content: "";

  position: absolute;

  width: 280px;
  height: 280px;

  right: -100px;
  bottom: -150px;

  border-radius: 50%;

  border: 1px solid rgba(56, 189, 248, 0.1);
}

.hero::after {
  content: "";

  position: absolute;

  width: 450px;
  height: 450px;

  right: 8%;
  top: -300px;

  border-radius: 50%;

  border: 1px solid rgba(56, 189, 248, 0.06);
}

.hero-content {
  position: relative;
  z-index: 2;

  max-width: 730px;
}

.hero-label {
  display: inline-flex;
  align-items: center;

  padding: 6px 10px;

  border-radius: 6px;

  color: var(--primary);
  background: var(--primary-soft);

  border: 1px solid rgba(56, 189, 248, 0.12);

  font-size: 9px;
  font-weight: 700;

  letter-spacing: 0.14em;
}

.hero h2 {
  margin-top: 18px;

  color: var(--text);

  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.08;

  font-weight: 700;

  letter-spacing: -0.04em;
}

.hero h2 strong {
  color: var(--primary);
  font-weight: 800;
}

.hero p {
  max-width: 690px;

  margin-top: 20px;

  color: var(--text-secondary);

  font-size: 14px;
  line-height: 1.9;
}

.hero-buttons {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 28px;
}

/* =========================================================
   BUTTONS
========================================================= */

.primary-button,
.secondary-button {
  min-height: 44px;
  padding: 0 19px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.primary-button {
  color: #03131f;

  background: linear-gradient(135deg, #67d4ff, var(--primary));

  box-shadow: 0 7px 22px rgba(56, 189, 248, 0.18);
}

.primary-button:hover {
  transform: translateY(-2px);

  box-shadow: 0 12px 28px rgba(56, 189, 248, 0.25);
}

.secondary-button {
  color: var(--text-secondary);

  background: var(--surface-3);

  border: 1px solid var(--border);
}

.secondary-button:hover {
  color: var(--text);

  background: var(--surface);

  border-color: var(--border-light);

  transform: translateY(-2px);
}

/* =========================================================
   HERO VISUAL
========================================================= */

.hero-visual {
  position: relative;

  height: 100%;

  display: grid;
  place-items: center;
}

.molecule {
  position: relative;

  width: 245px;
  height: 245px;

  display: grid;
  place-items: center;
}

.molecule-center {
  position: relative;
  z-index: 5;

  width: 92px;
  height: 92px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  color: var(--primary);

  background: radial-gradient(
    circle,
    rgba(56, 189, 248, 0.2),
    rgba(56, 189, 248, 0.04)
  );

  border: 1px solid rgba(56, 189, 248, 0.35);

  font-size: 34px;

  box-shadow: 0 0 45px rgba(56, 189, 248, 0.12);
}

.atom {
  position: absolute;

  width: 32px;
  height: 32px;

  border-radius: 50%;

  background: radial-gradient(
    circle at 35% 30%,
    #dff7ff,
    var(--primary) 42%,
    var(--primary-dark)
  );

  box-shadow: 0 0 25px rgba(56, 189, 248, 0.25);

  z-index: 4;
}

.atom-1 {
  top: 10px;
  left: 55px;
}

.atom-2 {
  right: 18px;
  bottom: 55px;
}

.atom-3 {
  left: 18px;
  bottom: 55px;
}

.bond {
  position: absolute;

  height: 3px;

  transform-origin: center;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(56, 189, 248, 0.7),
    transparent
  );

  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.bond-1 {
  width: 125px;

  top: 78px;
  left: 68px;

  transform: rotate(58deg);
}

.bond-2 {
  width: 125px;

  bottom: 78px;
  left: 68px;

  transform: rotate(-58deg);
}

/* =========================================================
   STATISTICS
========================================================= */

.statistics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;

  margin-top: 18px;
}

.stat-card {
  min-height: 90px;

  display: flex;
  align-items: center;
  gap: 13px;

  padding: 16px;

  border: 1px solid var(--border);
  border-radius: var(--radius-md);

  background: var(--surface);

  box-shadow: var(--shadow-sm);

  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);

  border-color: rgba(56, 189, 248, 0.2);

  background: var(--surface-2);
}

.stat-icon {
  width: 44px;
  height: 44px;

  flex: 0 0 44px;

  display: grid;
  place-items: center;

  border-radius: 11px;

  color: var(--primary);
  background: var(--primary-soft);

  font-size: 18px;
  font-weight: 700;
}

.stat-card > div:last-child {
  display: flex;
  flex-direction: column;
}

.stat-card strong {
  color: var(--text);

  font-family: "JetBrains Mono", monospace;

  font-size: 18px;
  line-height: 1.2;
}

.stat-card span {
  margin-top: 3px;

  color: var(--text-muted);

  font-size: 10px;
}

/* =========================================================
   SECTION TITLE
========================================================= */

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-top: 34px;
  margin-bottom: 16px;
}

.section-title > div {
  display: flex;
  flex-direction: column;
}

.section-title span {
  color: var(--text);

  font-size: 16px;
  font-weight: 700;
}

.section-title small {
  margin-top: 2px;

  color: var(--text-muted);

  font-size: 10px;
}

/* =========================================================
   PAGE HEADER
========================================================= */

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  min-height: 95px;

  margin-bottom: 22px;

  padding: 20px 23px;

  border: 1px solid var(--border);
  border-radius: var(--radius-lg);

  background: linear-gradient(135deg, var(--surface), var(--surface-2));

  box-shadow: var(--shadow-sm);
}

.page-header > div {
  display: flex;
  align-items: center;
  gap: 15px;
}

.page-icon {
  width: 52px;
  height: 52px;

  display: grid;
  place-items: center;

  border-radius: 13px;

  color: var(--primary);
  background: var(--primary-soft);

  border: 1px solid rgba(56, 189, 248, 0.13);

  font-size: 22px;
}

.page-header h2 {
  color: var(--text);

  font-size: 20px;
  line-height: 1.2;
}

.page-header p {
  margin-top: 3px;

  color: var(--text-muted);

  font-size: 11px;
}

/* =========================================================
   CALCULATOR GRID
========================================================= */

.calculator-grid {
  display: grid;

  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));

  gap: 15px;
}

/* =========================================================
   CALCULATOR CARD
========================================================= */

.calculator-card {
  position: relative;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  margin: 2px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

.calculator-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  transition: opacity var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.22);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid rgba(56, 189, 248, 0.12);
  font-size: 19px;
}

.card h3 {
  margin-top: 15.3px;
  color: var(--text);
  font-size: 11px;
  line-height: 1.45;
}

.card p {
  padding: 2px;
  margin-bottom: 7px;
  color: var(--text-muted);
  font-size: 9px;
  line-height: 1.75;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-top: auto;
  padding-bottom: 1.2px;
}

.category {
  color: var(--text-muted);
  font-size: 9px;
  font-family: "JetBrains Mono", monospace;
}

.calculator-open {
  min-height: 42px;
  padding: 0 11px;
  border-radius: 7px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 14px;
  font-weight: 600;

  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.calculator-open:hover {
  color: #03131f;
  background: var(--primary);
  transform: translateY(-1px);
}

/* =========================================================
   CALCULATOR PANEL
========================================================= */

.calculator-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  width: 100%;
}

.calculator-input-panel,
.calculator-result-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.calculator-input-panel {
  padding: 17px;
}

.calculator-result-panel {
  position: relative;
  padding: 22px;
  background: linear-gradient(145deg, var(--surface), var(--surface-2));
}

/* =========================================================
   CALCULATOR HEADER
========================================================= */

.calculator-title {
  display: flex;
  align-items: center;
  gap: 12px;

  padding-bottom: 17px;
  margin-bottom: 18px;

  border-bottom: 1px solid var(--border);
}

.calculator-title-icon {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  border-radius: 10px;

  color: var(--primary);
  background: var(--primary-soft);
}

.calculator-title h3 {
  color: var(--text);

  font-size: 17px;
}

.calculator-title p {
  margin-top: 2px;

  color: var(--text-muted);

  font-size: 9px;
}

/* =========================================================
   FORM
========================================================= */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 13px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  color: var(--text-secondary);

  font-size: 10px;
  font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;

  min-height: 41px;

  padding: 0 11px;

  border: 1px solid var(--border);
  border-radius: 8px;

  outline: 0;

  color: var(--text);
  background: var(--bg-secondary);

  font-size: 12px;

  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.form-group textarea {
  min-height: 100px;
  padding: 10px 11px;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(56, 189, 248, 0.5);

  background: var(--surface);

  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.07);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.input-with-unit {
  display: grid;
  grid-template-columns: 1fr auto;
}

.input-with-unit input {
  border-radius: 8px 0 0 8px;
}

.input-with-unit select,
.input-unit {
  min-width: 72px;
  border: 1px solid var(--border);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  color: var(--text-muted);
  background: var(--surface-3);
  font-size: 18px;
}

/* =========================================================
   FORM ACTIONS
========================================================= */

.form-actions {
  display: flex;
  align-items: center;
  gap: 9px;

  margin-top: 18px;
}

.calculate-button {
  min-height: 42px;

  padding: 0 20px;

  border-radius: 8px;

  color: #03131f;

  background: linear-gradient(135deg, #67d4ff, var(--primary));

  font-size: 11px;
  font-weight: 700;

  box-shadow: 0 7px 20px rgba(56, 189, 248, 0.14);

  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.calculate-button:hover {
  transform: translateY(-2px);

  box-shadow: 0 12px 25px rgba(56, 189, 248, 0.2);
}

.reset-button {
  min-height: 42px;

  padding: 0 16px;

  border-radius: 8px;

  color: var(--text-secondary);
  background: var(--surface-3);

  border: 1px solid var(--border);

  font-size: 11px;
  font-weight: 600;
}

.reset-button:hover {
  color: var(--text);
  border-color: var(--border-light);
}

/* =========================================================
   RESULT
========================================================= */

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding-bottom: 17px;
  margin-bottom: 18px;

  border-bottom: 1px solid var(--border);
}

.result-header h4 {
  color: var(--text);

  font-size: 13px;
}

.result-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 4px 8px;

  border-radius: 6px;

  color: var(--success);

  background: rgba(34, 197, 94, 0.08);

  font-size: 9px;
  font-weight: 600;
}

.result-status::before {
  content: "";

  width: 5px;
  height: 5px;

  border-radius: 50%;

  background: currentColor;
}

.result-empty {
  min-height: 240px;

  display: grid;
  place-items: center;

  text-align: center;

  color: var(--text-muted);
}

.result-empty-icon {
  width: 60px;
  height: 60px;

  margin: 0 auto 12px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  color: var(--text-muted);

  background: var(--surface-3);

  font-size: 22px;
}

.result-empty p {
  font-size: 10px;
}

.result-value {
  margin-top: 25px;

  padding: 25px;

  border-radius: 13px;

  text-align: center;

  background: radial-gradient(
    circle at center,
    rgba(56, 189, 248, 0.11),
    transparent 70%
  );

  border: 1px solid rgba(56, 189, 248, 0.1);
}

.result-value strong {
  display: block;

  color: var(--primary);

  font-family: "JetBrains Mono", monospace;

  font-size: clamp(25px, 4vw, 38px);

  line-height: 1.2;
}

.result-value span {
  display: block;

  margin-top: 7px;

  color: var(--text-muted);

  font-size: 10px;
}

.result-table {
  width: 100%;

  border-collapse: collapse;

  margin-top: 15px;
}

.result-table th,
.result-table td {
  padding: 10px;

  border-bottom: 1px solid var(--border);

  text-align: left;

  font-size: 10px;
}

.result-table th {
  color: var(--text-muted);
  font-weight: 600;
}

.result-table td {
  color: var(--text-secondary);

  font-family: "JetBrains Mono", monospace;
}

.result-table td.result-highlight {
  color: var(--primary);
  font-weight: 600;
}

/* =========================================================
   FORMULA BOX
========================================================= */

.formula-box {
  margin-top: 18px;
  padding: 13px 15px;

  border-left: 3px solid var(--primary);
  border-radius: 7px;

  background: var(--primary-soft);

  overflow-x: auto;
}

.formula-box .formula-label {
  display: block;

  margin-bottom: 5px;

  color: var(--text-muted);

  font-size: 8px;
  font-weight: 700;

  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.formula-box code {
  color: var(--primary);

  font-family: "JetBrains Mono", monospace;

  font-size: 11px;
}

/* =========================================================
   UNIT BADGE
========================================================= */

.unit-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 5px;
  color: var(--text-muted);
  background: var(--surface-3);
  font-family: "JetBrains Mono", monospace;
  font-size: 8px;
}

/* =========================================================
   MODAL
========================================================= */

.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 25px;
  background: rgba(2, 8, 18, 0.76);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal.active {
  display: flex;
}

.modal-content {
  position: relative;
  width: min(1080px, 100%);
  max-height: calc(100vh - 50px);
  overflow-y: auto;
  padding: 25px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--surface), var(--bg-secondary));
  box-shadow: var(--shadow-lg);
  scrollbar-width: thin;
}

.modal-close {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--text-muted);
  background: var(--surface-3);
  font-size: 21px;
  transition:
    color var(--transition-fast),
    background var(--transition-fast),
    transform var(--transition-fast);
}

.modal-close:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
  transform: rotate(90deg);
}

/* =========================================================
   TOAST
========================================================= */

.toast {
  position: fixed;

  right: 25px;
  bottom: 25px;

  z-index: 3000;

  min-width: 230px;
  max-width: 380px;

  padding: 13px 16px;

  border: 1px solid var(--border-light);
  border-radius: 10px;

  color: var(--text);

  background: linear-gradient(135deg, var(--surface-2), var(--surface));

  box-shadow: var(--shadow-md);

  font-size: 11px;

  opacity: 0;
  visibility: hidden;

  transform: translateY(15px);

  transition:
    opacity var(--transition),
    visibility var(--transition),
    transform var(--transition);
}

.toast.show {
  opacity: 1;
  visibility: visible;

  transform: translateY(0);
}

.toast.success {
  border-left: 3px solid var(--success);
}

.toast.error {
  border-left: 3px solid var(--danger);
}

.toast.warning {
  border-left: 3px solid var(--warning);
}

/* =========================================================
   SEARCH RESULTS
========================================================= */

.search-results {
  position: absolute;

  top: calc(100% + 8px);
  left: 0;
  right: 0;

  max-height: 350px;

  overflow-y: auto;

  padding: 7px;

  border: 1px solid var(--border-light);
  border-radius: 11px;

  background: var(--surface);

  box-shadow: var(--shadow-md);

  z-index: 1200;
}

.search-result-item {
  width: 100%;

  display: flex;
  align-items: center;
  gap: 10px;

  padding: 10px;

  border-radius: 8px;

  color: var(--text-secondary);

  background: transparent;

  text-align: left;

  transition:
    color var(--transition-fast),
    background var(--transition-fast);
}

.search-result-item:hover {
  color: var(--text);
  background: var(--primary-soft);
}

.search-result-icon {
  width: 30px;
  height: 30px;

  display: grid;
  place-items: center;

  border-radius: 7px;

  color: var(--primary);
  background: var(--primary-soft);

  font-size: 13px;
}

.search-result-title {
  display: block;

  color: inherit;

  font-size: 11px;
  font-weight: 600;
}

.search-result-category {
  display: block;

  margin-top: 1px;

  color: var(--text-muted);

  font-size: 8px;
}

/* =========================================================
   ERROR STATE
========================================================= */

.error-message {
  padding: 13px 15px;

  border: 1px solid rgba(239, 68, 68, 0.15);
  border-left: 3px solid var(--danger);

  border-radius: 8px;

  color: #fca5a5;

  background: rgba(239, 68, 68, 0.07);

  font-size: 10px;
}

/* =========================================================
   INFO BOX
========================================================= */

.info-box {
  display: flex;
  gap: 10px;

  margin-top: 14px;
  padding: 12px 14px;

  border: 1px solid rgba(56, 189, 248, 0.12);
  border-radius: 8px;

  background: rgba(56, 189, 248, 0.05);
}

.info-box-icon {
  color: var(--primary);
  font-size: 14px;
}

.info-box-text {
  color: var(--text-secondary);

  font-size: 9px;
  line-height: 1.7;
}

/* =========================================================
   CHECKBOX / RADIO
========================================================= */

.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice {
  position: relative;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice label {
  display: block;

  padding: 8px 12px;

  border: 1px solid var(--border);
  border-radius: 7px;

  color: var(--text-muted);

  background: var(--surface-2);

  cursor: pointer;

  font-size: 9px;

  transition:
    color var(--transition-fast),
    border-color var(--transition-fast),
    background var(--transition-fast);
}

.choice input:checked + label {
  color: var(--primary);

  border-color: rgba(56, 189, 248, 0.3);

  background: var(--primary-soft);
}

/* =========================================================
   SCROLLBAR
========================================================= */

* {
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}

*::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 20px;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

/* =========================================================
   UTILITY CLASSES
========================================================= */

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

.text-primary {
  color: var(--primary) !important;
}

.text-success {
  color: var(--success) !important;
}

.text-warning {
  color: var(--warning) !important;
}

.text-danger {
  color: var(--danger) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.mono {
  font-family: "JetBrains Mono", monospace;
}

.text-center {
  text-align: center;
}

.w-full {
  width: 100%;
}

/* =========================================================
   RESPONSIVE BASE
========================================================= */

@media (max-width: 1200px) {
  :root {
    --sidebar-width: 235px;
  }

  .main-content {
    padding-left: 25px;
    padding-right: 25px;
  }

  .hero {
    padding: 40px;
  }

  .statistics {
    grid-template-columns: repeat(2, 1fr);
  }

  .calculator-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .search-box {
    width: 230px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    display: none;
  }
}

@media (max-width: 700px) {
  .topbar {
    padding: 0 14px;
  }

  .brand {
    min-width: auto;
  }

  .brand-text span {
    display: none;
  }

  .brand-text h1 {
    font-size: 15px;
  }

  .search-box {
    display: none;
  }

  .mobile-only {
    display: grid;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform var(--transition);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .main-content {
    width: 100%;
    margin-left: 0;

    padding: calc(var(--topbar-height) + 18px) 14px 35px;
  }

  .hero {
    min-height: auto;

    padding: 28px 22px;

    border-radius: 18px;
  }

  .hero h2 {
    font-size: 31px;
  }

  .hero p {
    font-size: 12px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .statistics {
    grid-template-columns: 1fr;
  }

  .calculator-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    padding: 17px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-group.full-width {
    grid-column: auto;
  }

  .modal {
    padding: 10px;
  }

  .modal-content {
    max-height: calc(100vh - 20px);
    padding: 18px;
    border-radius: 14px;
  }
}

/* =========================================================
   css/responsive.css
   Responsive Layout System
========================================================= */

@media (max-width: 1400px) {
  .main-content {
    padding-left: 28px;
    padding-right: 28px;
  }

  .hero {
    min-height: 390px;
    padding: 45px;
  }

  .hero h2 {
    font-size: 46px;
  }

  .calculator-grid {
    grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  }
}

@media (max-width: 1180px) {
  :root {
    --sidebar-width: 235px;
  }

  .brand {
    min-width: 235px;
  }

  .search-box {
    width: 260px;
  }

  .hero {
    grid-template-columns: 1.2fr 0.8fr;
    padding: 38px;
  }

  .hero h2 {
    font-size: 40px;
  }

  .molecule {
    transform: scale(0.82);
  }

  .statistics {
    grid-template-columns: repeat(2, 1fr);
  }

  .calculator-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .topbar {
    padding: 0 18px;
  }

  .search-box {
    width: 220px;
  }

  .main-content {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 350px;
  }

  .hero-visual {
    display: none;
  }

  .hero-content {
    max-width: 100%;
  }

  .calculator-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  :root {
    --sidebar-width: 260px;
  }

  .topbar {
    height: 68px;
  }

  .sidebar {
    top: 68px;
    box-shadow: var(--shadow-lg);

    transform: translateX(-105%);

    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .main-content {
    width: 100%;
    margin-left: 0;

    padding: calc(68px + 20px) 16px 35px;
  }

  .mobile-only {
    display: grid;
  }

  .search-box {
    display: none;
  }

  .brand {
    min-width: 0;
  }

  .brand-logo {
    width: 40px;
    height: 40px;
  }

  .brand-text h1 {
    font-size: 15px;
  }

  .hero {
    padding: 32px 25px;
  }

  .hero h2 {
    font-size: 34px;
  }

  .hero p {
    font-size: 12px;
  }

  .calculator-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    min-height: 82px;
  }
}

@media (max-width: 560px) {
  .topbar {
    padding: 0 12px;
  }

  .brand {
    gap: 9px;
  }

  .brand-logo {
    width: 37px;
    height: 37px;

    border-radius: 9px;

    font-size: 20px;
  }

  .brand-text h1 {
    font-size: 14px;
  }

  .main-content {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero {
    padding: 25px 19px;

    border-radius: 15px;
  }

  .hero-label {
    font-size: 8px;
  }

  .hero h2 {
    margin-top: 14px;

    font-size: 28px;
  }

  .hero p {
    margin-top: 15px;

    font-size: 11px;
    line-height: 1.8;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .statistics {
    gap: 9px;
  }

  .stat-card {
    min-height: 78px;
    padding: 12px;
  }

  .stat-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;

    font-size: 15px;
  }

  .stat-card strong {
    font-size: 15px;
  }

  .stat-card span {
    font-size: 9px;
  }

  .section-title {
    margin-top: 26px;
  }

  .page-header {
    padding: 14px;

    border-radius: 13px;
  }

  .page-icon {
    width: 42px;
    height: 42px;

    font-size: 18px;
  }

  .page-header h2 {
    font-size: 16px;
  }

  .page-header p {
    font-size: 9px;
  }

  .calculator-card {
    min-height: 175px;
    padding: 17px;
  }

  .calculator-panel {
    gap: 12px;
  }

  .calculator-input-panel,
  .calculator-result-panel {
    padding: 16px;
    border-radius: 13px;
  }

  .form-grid {
    gap: 11px;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .calculate-button,
  .reset-button {
    width: 100%;
  }

  .result-value {
    padding: 19px 12px;
  }

  .result-value strong {
    font-size: 27px;
  }

  .modal-content {
    padding: 16px;
  }
}

@media (max-width: 380px) {
  .brand-text h1 {
    font-size: 13px;
  }

  .hero h2 {
    font-size: 25px;
  }

  .calculator-card {
    padding: 15px;
  }

  .page-header > div {
    gap: 10px;
  }
}

/* =========================================================
   Landscape Mobile
========================================================= */

@media (max-height: 550px) and (orientation: landscape) {
  .topbar {
    height: 60px;
  }

  .sidebar {
    top: 60px;
  }

  .main-content {
    padding-top: 75px;
  }

  .hero {
    min-height: 280px;
  }

  .modal-content {
    max-height: 90vh;
  }
}

/* =========================================================
   Print
========================================================= */

@media print {
  .topbar,
  .sidebar,
  .header-actions,
  .hero-buttons,
  .form-actions,
  .modal-close {
    display: none !important;
  }

  .main-content {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .page-section {
    display: block !important;
  }

  .calculator-card,
  .calculator-input-panel,
  .calculator-result-panel {
    break-inside: avoid;
    box-shadow: none;
  }
}

/* =========================================================
   css/animations.css
   ChemCalc Pro Animation System
========================================================= */

/* =========================================================
   GLOBAL
========================================================= */

:root {
  --animation-duration: 0.55s;
  --animation-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================================================
   PAGE ANIMATIONS
========================================================= */

.page-section.active-section {
  animation: pageEnter 0.45s var(--animation-ease) both;
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   HERO
========================================================= */

.hero {
  animation: heroEnter 0.7s var(--animation-ease) both;
}

@keyframes heroEnter {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero-label {
  animation: fadeSlideRight 0.5s 0.1s var(--animation-ease) both;
}

.hero h2 {
  animation: fadeSlideRight 0.6s 0.18s var(--animation-ease) both;
}

.hero p {
  animation: fadeSlideRight 0.6s 0.28s var(--animation-ease) both;
}

.hero-buttons {
  animation: fadeSlideRight 0.6s 0.38s var(--animation-ease) both;
}

@keyframes fadeSlideRight {
  from {
    opacity: 0;
    transform: translateX(-15px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* =========================================================
   MOLECULE
========================================================= */

.molecule {
  animation: moleculeFloat 6s ease-in-out infinite;
}

@keyframes moleculeFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-10px) rotate(2deg);
  }
}

.molecule-center {
  animation: moleculePulse 3s ease-in-out infinite;
}

@keyframes moleculePulse {
  0%,
  100% {
    box-shadow: 0 0 35px rgba(56, 189, 248, 0.08);
  }

  50% {
    box-shadow: 0 0 60px rgba(56, 189, 248, 0.2);
  }
}

.atom {
  animation: atomPulse 2.8s ease-in-out infinite;
}

.atom-1 {
  animation-delay: 0s;
}

.atom-2 {
  animation-delay: 0.5s;
}

.atom-3 {
  animation-delay: 1s;
}

@keyframes atomPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.9;
  }

  50% {
    transform: scale(1.15);
    opacity: 1;
  }
}

.bond {
  animation: bondGlow 3s ease-in-out infinite;
}

@keyframes bondGlow {
  0%,
  100% {
    opacity: 0.45;
  }

  50% {
    opacity: 1;
  }
}

/* =========================================================
   STATISTICS
========================================================= */

.stat-card {
  animation: cardReveal 0.55s var(--animation-ease) both;
}

.stat-card:nth-child(1) {
  animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
  animation-delay: 0.17s;
}

.stat-card:nth-child(3) {
  animation-delay: 0.24s;
}

.stat-card:nth-child(4) {
  animation-delay: 0.31s;
}

@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   CALCULATOR CARDS
========================================================= */

.calculator-card {
  animation: calculatorReveal 0.5s var(--animation-ease) both;
}

@keyframes calculatorReveal {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.calculator-card:nth-child(1) {
  animation-delay: 0.04s;
}

.calculator-card:nth-child(2) {
  animation-delay: 0.08s;
}

.calculator-card:nth-child(3) {
  animation-delay: 0.12s;
}

.calculator-card:nth-child(4) {
  animation-delay: 0.16s;
}

.calculator-card:nth-child(5) {
  animation-delay: 0.2s;
}

.calculator-card:nth-child(6) {
  animation-delay: 0.24s;
}

.calculator-card:nth-child(7) {
  animation-delay: 0.28s;
}

.calculator-card:nth-child(8) {
  animation-delay: 0.32s;
}

.calculator-card:nth-child(9) {
  animation-delay: 0.36s;
}

.calculator-card:nth-child(10) {
  animation-delay: 0.4s;
}

/* =========================================================
   NAVIGATION
========================================================= */

.nav-item {
  animation: navReveal 0.35s var(--animation-ease) both;
}

.nav-item:nth-child(1) {
  animation-delay: 0.02s;
}

.nav-item:nth-child(2) {
  animation-delay: 0.04s;
}

.nav-item:nth-child(3) {
  animation-delay: 0.06s;
}

.nav-item:nth-child(4) {
  animation-delay: 0.08s;
}

.nav-item:nth-child(5) {
  animation-delay: 0.1s;
}

.nav-item:nth-child(6) {
  animation-delay: 0.12s;
}

.nav-item:nth-child(7) {
  animation-delay: 0.14s;
}

.nav-item:nth-child(8) {
  animation-delay: 0.16s;
}

.nav-item:nth-child(9) {
  animation-delay: 0.18s;
}

.nav-item:nth-child(10) {
  animation-delay: 0.2s;
}

.nav-item:nth-child(11) {
  animation-delay: 0.22s;
}

@keyframes navReveal {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* =========================================================
   BUTTON EFFECTS
========================================================= */

.primary-button,
.calculate-button {
  position: relative;
  overflow: hidden;
}

.primary-button::after,
.calculate-button::after {
  content: "";

  position: absolute;

  top: 0;
  left: -120%;

  width: 70%;
  height: 100%;

  transform: skewX(-20deg);

  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.35),
    transparent
  );
}

.primary-button:hover::after,
.calculate-button:hover::after {
  animation: buttonShine 0.7s ease;
}

@keyframes buttonShine {
  from {
    left: -120%;
  }

  to {
    left: 150%;
  }
}

.text {
  font-size: 30px;
}

/* =========================================================
   CALCULATE LOADING
========================================================= */

.is-calculating {
  pointer-events: none;
  opacity: 0.7;
}

.is-calculating .button-text {
  opacity: 0;
}

.is-calculating::before {
  content: "";

  position: absolute;

  width: 15px;
  height: 15px;

  top: 50%;
  left: 50%;

  margin: -7.5px 0 0 -7.5px;

  border: 2px solid rgba(3, 19, 31, 0.25);

  border-top-color: #03131f;

  border-radius: 50%;

  animation: spin 0.65s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* =========================================================
   RESULT ANIMATION
========================================================= */

.result-value.result-updated {
  animation: resultPop 0.45s var(--animation-ease);
}

@keyframes resultPop {
  0% {
    opacity: 0;
    transform: scale(0.94);
  }

  65% {
    transform: scale(1.025);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* =========================================================
   TOAST
========================================================= */

.toast.show {
  animation: toastEnter 0.35s var(--animation-ease);
}

@keyframes toastEnter {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =========================================================
   MODAL
========================================================= */

.modal.active {
  animation: modalBackground 0.25s ease both;
}

.modal.active .modal-content {
  animation: modalContent 0.4s var(--animation-ease) both;
}

@keyframes modalBackground {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modalContent {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =========================================================
   STATUS DOT
========================================================= */

.status-dot {
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%,
  100% {
    opacity: 0.65;
    box-shadow: 0 0 5px rgba(34, 197, 94, 0.3);
  }

  50% {
    opacity: 1;
    box-shadow: 0 0 13px rgba(34, 197, 94, 0.7);
  }
}

/* =========================================================
   PAGE HEADER
========================================================= */

.page-header {
  animation: headerReveal 0.45s var(--animation-ease);
}

@keyframes headerReveal {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================
   FOOTER
========================================= */

.lab-footer {
  max-width: 1400px;
  margin: 0 auto;
  padding: 25px 6% 35px;
  display: flex;
  flex-direction: column;
  align-items: left-start;
  justify-content: center;
  gap: 8px;
  border-top: 1px solid var(--border);
  color: var(--text-light);
  font-size: 11px;
}

.lab-footer strong {
  display: block;
  color: var(--text);
  font-size: 18px;
  margin-bottom: 4px;
}

.site-footer {
  margin-top: 30px;
  padding: 28px 6%;
  background: #0b1728;
  border-top: 1px solid var(--border);
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.footer-site-link {
  color: var(--primary-dark);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: 0.2s ease;
}

.footer-site-link:hover {
  color: var(--secondary);
}

.footer-copyright {
  color: var(--text-light);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.brand-icon {
  width: 45px;
  height: 45px;
  font-size: 23px;
}

/* =========================================================
   UNIT SYSTEM SELECTOR
========================================================= */
.unit-selector-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}

.unit-selector-label {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.unit-system-selector {
  min-width: 92px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.unit-system-selector:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

@media (max-width: 900px) {
  .unit-selector-label {
    display: none;
  }

  .unit-selector-wrap {
    padding: 0 5px;
  }
}
