:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --surface2: #1a1a26;
  --border: #2a2a3a;
  --accent: #6c63ff;
  --accent2: #ff6584;
  --accent3: #43e97b;
  --text: #e8e8f0;
  --muted: #6b6b8a;
  --gold: #f5c518;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 20%, rgba(108, 99, 255, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 30% at 80% 80%, rgba(255, 101, 132, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 60% 10%, rgba(67, 233, 123, 0.06) 0%, transparent 50%);
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.logo-link {
  text-decoration: none;
  color: var(--text);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-icon {
  display: none;
}

.mobile-only-tab {
  display: none !important;
}

.nav-user {
  font-size: 13px;
  color: var(--muted);
  padding: 8px 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--accent), #8b83ff);
  color: #fff;
  font-family: "Syne", sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(108, 99, 255, 0.25);
}

.nav-btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.nav-btn-outline:hover {
  border-color: var(--accent);
  box-shadow: none;
}

.nav-btn-danger {
  background: linear-gradient(135deg, var(--accent2), #ff8e9b) !important;
  color: #fff !important;
}

.nav-btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(255, 101, 132, 0.25) !important;
}

.nav-btn-outline-danger {
  background: transparent !important;
  border-color: rgba(255, 101, 132, 0.5) !important;
  color: var(--accent2) !important;
}

.nav-btn-outline-danger:hover {
  border-color: var(--accent2) !important;
  background: rgba(255, 101, 132, 0.1) !important;
  box-shadow: none !important;
}

.logout-form {
  display: inline-flex;
}

.messages {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.4;
  border: 1px solid var(--border);
}

.message-success {
  background: rgba(67, 233, 123, 0.12);
  border-color: rgba(67, 233, 123, 0.35);
  color: #b8ffd4;
}

.message-error {
  background: rgba(255, 101, 132, 0.12);
  border-color: rgba(255, 101, 132, 0.35);
  color: #ffc2cf;
}

.message-warning {
  background: rgba(245, 197, 24, 0.12);
  border-color: rgba(245, 197, 24, 0.35);
  color: #ffe69a;
}

.message-info {
  background: rgba(108, 99, 255, 0.12);
  border-color: rgba(108, 99, 255, 0.35);
  color: #d4d1ff;
}

.auth-wrapper {
  max-width: 520px;
  margin: 40px auto 28px;
}

.auth-wrapper-wide {
  max-width: 900px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  position: relative;
}

.auth-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

.auth-title {
  font-family: "Syne", sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 10px;
}

.auth-subtitle {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* reCAPTCHA v3: скрытое поле + бейдж Google (Terms of Service) */
.field-wrap-captcha {
  min-height: 0;
}

.references-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

.references-item {
  margin-bottom: 8px;
}

.references-item .ref-num {
  color: var(--muted);
  font-weight: 600;
  margin-right: 6px;
}

.references-item a {
  color: var(--accent);
  text-decoration: none;
}

.references-item a:hover {
  text-decoration: underline;
}

.field-errors {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-error {
  font-size: 12px;
  color: #ff9fb2;
}

.form-errors {
  background: rgba(255, 101, 132, 0.1);
  border: 1px solid rgba(255, 101, 132, 0.35);
  color: #ffc2cf;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
}

.auth-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.auth-links-spaced {
  margin-bottom: 14px;
}

.auth-link {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-family: "Syne", sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.auth-google:hover {
  border-color: var(--accent);
}

.profile-meta {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
}

.meta-label {
  color: var(--muted);
}

.meta-value {
  text-align: right;
  word-break: break-word;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.history-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}

.history-item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.history-title {
  font-family: "Syne", sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin: 0;
}

.history-tier {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--accent);
  background: rgba(108, 99, 255, 0.14);
  border: 1px solid rgba(108, 99, 255, 0.3);
  padding: 3px 9px;
  border-radius: 999px;
}

.history-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 10px;
}

.history-result {
  display: flex;
  align-items: center;
  gap: 12px;
}

.history-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  /* Слева «Скачать», справа «Подробнее» — фиксируем LTR, если родитель с dir=rtl */
  direction: ltr;
}

.history-actions > .dropdown {
  order: 1;
}

.history-actions > a.nav-btn {
  order: 2;
}

.report-download-actions {
  justify-content: flex-start;
  margin-bottom: 16px;
}

.history-score {
  font-family: "Syne", sans-serif;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  color: var(--gold);
}

.history-verdict {
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
}

.history-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.page-info {
  margin: 0;
}

.is-hidden {
  display: none;
}

.footer {
  margin-top: 38px;
  border-top: 1px solid var(--border);
  padding: 18px 24px 28px;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

header {
  padding: 48px 0 32px;
  text-align: center;
}

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

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.logo-text {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
}

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

h1 {
  font-family: "Syne", sans-serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 20px;
}

h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--muted);
  font-size: 16px;
  font-weight: 300;
  max-width: 640px;
  margin: 0 auto 28px;
  line-height: 1.75;
}

.stats-row {
  display: flex;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat-value {
  font-family: "Syne", sans-serif;
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
  margin: 40px 0 32px;
  position: relative;
}

.form-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent3));
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

.draft-restored-banner {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 18px;
  background: rgba(108, 99, 255, 0.12);
  border: 1px solid rgba(108, 99, 255, 0.35);
  color: #d4d1ff;
}

.form-title {
  font-family: "Syne", sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-divider {
  margin: 28px 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.section-divider-title {
  font-family: "Syne", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full {
  grid-column: 1 / -1;
}

label {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

input,
select,
textarea {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  font-size: 13px;
}

select option {
  background: var(--surface2);
}

textarea {
  resize: vertical;
  min-height: 88px;
  line-height: 1.5;
}

.tier-section {
  margin: 32px 0 0;
}

.tier-label {
  font-family: "Syne", sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
}

.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.tier {
  background: var(--surface2);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.tier:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.tier.selected {
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.08);
}

.tier.selected::after {
  content: "✓";
  position: absolute;
  top: 10px;
  right: 12px;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.tier-price {
  font-family: "Syne", sans-serif;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}

.tier-1 .tier-price {
  color: var(--accent3);
}

.tier-2 .tier-price {
  color: var(--accent);
}

.tier-3 .tier-price {
  color: var(--gold);
}

.tier-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.tier-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.tier-features li {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.tier-features li::before {
  content: "→";
  color: var(--accent);
  font-size: 10px;
}

.btn-analyze {
  width: 100%;
  margin-top: 24px;
  padding: 16px;
  background: linear-gradient(135deg, var(--accent), #8b83ff);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-family: "Syne", sans-serif;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-analyze:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(108, 99, 255, 0.4);
}

.btn-danger {
  width: 100%;
  margin-top: 24px;
  padding: 16px;
  background: linear-gradient(135deg, var(--accent2), #ff8e9b) !important;
  border: none;
  border-radius: 12px;
  color: #fff !important;
  font-family: "Syne", sans-serif;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(255, 101, 132, 0.4) !important;
}

.loading {
  display: none;
  text-align: center;
  padding: 60px 20px;
}

.loading.active {
  display: block;
}

.spinner-ring {
  width: 64px;
  height: 64px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  font-family: "Syne", sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.loading-sub {
  color: var(--muted);
  font-size: 14px;
}

.loading-steps {
  margin: 24px auto 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
}

.step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.4s;
}

.step.active {
  opacity: 1;
  transform: translateX(0);
  color: var(--text);
}

.step-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.results {
  display: none;
}

.results.active {
  display: block;
}

.score-hero {
  text-align: center;
  padding: 48px 24px 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.score-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(108, 99, 255, 0.1) 0%, transparent 60%);
}

.score-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 28px;
}

.mascot-wrap {
  position: relative;
  width: 320px;
  height: 320px;
  margin: 0 auto 32px;
  animation: float 6s ease-in-out infinite;
}

.mascot-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.4));
}

.mascot-svg {
  width: 320px;
  height: 320px;
}

.score-verdict {
  font-family: "Syne", sans-serif;
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
}

.score-pct-big {
  font-family: "Syne", sans-serif;
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
  margin-bottom: 4px;
}

.score-tagline {
  color: var(--muted);
  font-size: 15px;
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.5;
}

.score-tier-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.score-percent-sign {
  font-size: 32px;
  color: var(--muted);
}

.history-detail-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.history-meta-grid {
  margin-bottom: 22px;
}

.report-icon-blue {
  background: rgba(108, 99, 255, 0.15);
}

.report-icon-green {
  background: rgba(67, 233, 123, 0.15);
}

.report-icon-red {
  background: rgba(255, 101, 132, 0.15);
}

.report-icon-gold {
  background: rgba(245, 197, 24, 0.15);
}

.rec-bullet-blue {
  background: #6c63ff;
}

.rec-bullet-green {
  background: #43e97b;
}

.rec-bullet-gold {
  background: #f5c518;
}

.roadmap-stage {
  margin-bottom: 16px;
}

.roadmap-title {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--gold);
  margin-bottom: 6px;
}

.breakdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
}

.breakdown-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}

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

.breakdown-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.breakdown-score {
  font-family: "Syne", sans-serif;
  font-size: 20px;
  font-weight: 800;
}

.breakdown-bar {
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.breakdown-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}

.breakdown-comment {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.report-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
}

.report-section-title {
  font-family: "Syne", sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-section-title .icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.rec-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rec-item {
  display: flex;
  gap: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

.rec-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 8px;
  flex-shrink: 0;
}

.risk-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: var(--surface2);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.5;
}

.risk-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.risk-high {
  background: rgba(255, 101, 132, 0.15);
  color: var(--accent2);
}

.risk-med {
  background: rgba(245, 197, 24, 0.15);
  color: var(--gold);
}

.risk-low {
  background: rgba(67, 233, 123, 0.15);
  color: var(--accent3);
}

.upgrade-prompt {
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.1), rgba(255, 101, 132, 0.1));
  border: 1px solid rgba(108, 99, 255, 0.3);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  margin-bottom: 24px;
}

.upgrade-title {
  font-family: "Syne", sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.upgrade-text {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.upgrade-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--accent), #8b83ff);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: "Syne", sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin: 4px;
  text-decoration: none;
}

.upgrade-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(108, 99, 255, 0.3);
}

.upgrade-btn.gold {
  background: linear-gradient(135deg, var(--gold), #e8a800);
  color: #000;
}

.upgrade-btn.gold:hover {
  box-shadow: 0 8px 24px rgba(245, 197, 24, 0.3);
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--gold), #e8a800);
  border: none;
  border-radius: 12px;
  color: #000;
  font-family: "Syne", sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(245, 197, 24, 0.3);
}

.btn-reset {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  font-family: "Syne", sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-reset:hover {
  border-color: var(--accent);
  color: var(--text);
}

.actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-bottom: 48px;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@keyframes zombie-eye {
  0%,
  90%,
  100% {
    opacity: 1;
  }
  95% {
    opacity: 0;
  }
}

@keyframes rocket-fly {
  0%,
  100% {
    transform: translateY(0) rotate(-15deg);
  }
  50% {
    transform: translateY(-16px) rotate(-15deg);
  }
}

@keyframes flame {
  0%,
  100% {
    transform: scaleY(1);
    opacity: 1;
  }
  50% {
    transform: scaleY(1.3);
    opacity: 0.8;
  }
}

@keyframes unicorn-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

@keyframes sparkle {
  0%,
  100% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes leaf-wave {
  0%,
  100% {
    transform: rotate(-5deg);
  }
  50% {
    transform: rotate(10deg);
  }
}

@keyframes ground-pulse {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

@media (max-width: 600px) {
  .form-grid,
  .tiers,
  .breakdown-grid {
    grid-template-columns: 1fr;
  }

  .stats-row {
    gap: 20px;
  }

  .navbar-inner {
    padding: 12px 16px;
  }

  .container {
    padding: 0 16px;
  }

  .nav-user {
    max-width: 100%;
  }

  .meta-row {
    flex-direction: column;
    gap: 4px;
  }

  .meta-value {
    text-align: left;
  }

  .history-item-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .history-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .history-result {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-top: 12px;
  }

  .history-actions {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .history-actions .nav-btn {
    width: 100%;
    text-align: center;
  }

  .history-actions .dropdown {
    width: 100%;
  }

  .history-actions .dropdown-toggle {
    width: 100%;
    justify-content: center;
  }

  .history-pagination {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .history-pagination .nav-btn {
    width: 100%;
  }

  .history-detail-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
  }

  .auth-card {
    padding: 20px 16px;
  }

  .history-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
  }

  .score-hero {
    padding: 32px 16px 24px;
    border-radius: 16px;
  }

  .score-pct-big {
    font-size: 42px;
  }

  .mascot-wrap {
    width: 200px;
    height: 200px;
    margin: 0 auto 24px;
  }

  .mascot-svg {
    width: 200px;
    height: 200px;
  }

  .score-verdict {
    font-size: 20px;
  }

  .report-section {
    padding: 16px;
  }
}

/* Dropdown Styles */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--surface);
  min-width: 180px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1000;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-top: 8px;
  padding: 8px 0;
}

/* Invisible bridge to keep hover state active while moving mouse to dropdown */
.dropdown-menu::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
  background: transparent;
}

.dropdown-menu.dropdown-menu-end {
  left: auto;
  right: 0;
}

.dropdown-menu a {
  color: var(--text);
  padding: 10px 16px;
  text-decoration: none;
  display: block;
  font-size: 14px;
  transition: background 0.2s;
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background-color: rgba(108, 99, 255, 0.1);
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  display: block;
}

@media (max-width: 600px) {
  body {
    padding-bottom: 70px;
  }
  
  .navbar {
    position: static;
    background: transparent;
    backdrop-filter: none;
    border-bottom: none;
  }
  
  .navbar-inner {
    padding: 14px 16px;
    justify-content: center;
  }

  .logo-link {
    position: static;
    transform: none;
    z-index: auto;
    background: transparent;
    padding: 0;
    border: none;
    backdrop-filter: none;
  }

  .navbar-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--border);
    justify-content: space-around;
    padding: 8px 0;
    gap: 0;
    z-index: 100;
  }

  .mobile-only-tab {
    display: flex !important;
  }

  .nav-user {
    display: none !important;
  }

  .navbar-actions > a,
  .navbar-actions > form,
  .navbar-actions > form > button {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--muted) !important;
    padding: 5px !important;
    gap: 4px !important;
    width: auto !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }

  .navbar-actions .nav-icon {
    display: block !important;
    font-size: 20px;
  }
  
  .navbar-actions .nav-text {
    font-size: 10px;
    font-family: "Syne", sans-serif;
    font-weight: 600;
    letter-spacing: 0.2px;
  }

  .navbar-actions > a:hover,
  .navbar-actions > form > button:hover,
  .navbar-actions > a.active-tab {
    color: var(--accent) !important;
    transform: none !important;
  }
  
  .navbar-actions > form > button.nav-btn-danger:hover {
    color: var(--accent2) !important;
  }
}
