/* ═══════════════════════════════════════════════════════════════
   MAIN STYLES — Akshit's Question
   Core layout, glassmorphism, poll UI, modals
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-normal);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background-color: var(--bg-light);
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
}

img, svg { display: block; max-width: 100%; }
button { cursor: pointer; font: inherit; border: none; background: none; }
a { color: inherit; text-decoration: none; }

/* ── Ambient Background ── */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient-bg::before {
  content: '';
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217,119,87,0.10) 0%, transparent 70%);
  top: -15%;
  right: -10%;
  animation: ambientFloat1 18s ease-in-out infinite;
}

.ambient-bg::after {
  content: '';
  position: absolute;
  width: 550px;
  height: 550px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196,155,90,0.08) 0%, transparent 70%);
  bottom: -10%;
  left: -8%;
  animation: ambientFloat2 22s ease-in-out infinite;
}

.ambient-orb {
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(231,227,216,0.25) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: ambientFloat3 15s ease-in-out infinite;
}

/* ── Canvas (particles) ── */
#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ── App Container ── */
.app-container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: var(--space-lg);
}

/* ── Header / Branding ── */
.app-header {
  text-align: center;
  margin-bottom: var(--space-xl);
  animation: fadeSlideUp 0.8s var(--ease-out-expo) both;
}

.app-logo {
  width: 52px;
  height: 52px;
  margin: 0 auto var(--space-sm);
  filter: drop-shadow(0 2px 8px rgba(217,119,87,0.18));
}

.app-title {
  font-family: var(--font-display);
  font-size: var(--fs-title);
  font-weight: var(--fw-bold);
  color: var(--bg-dark);
  letter-spacing: -0.02em;
  line-height: var(--lh-tight);
}

.app-title span {
  color: var(--accent-terracotta);
}

.app-subtitle {
  font-size: var(--fs-small);
  color: var(--text-tertiary);
  margin-top: var(--space-2xs);
  font-weight: var(--fw-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Main Poll Card (Glassmorphism) ── */
.poll-card {
  width: 100%;
  max-width: 560px;
  background: var(--glass-bg-heavy);
  backdrop-filter: blur(var(--glass-blur-heavy));
  -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
  border: 1px solid var(--glass-border);
  border-top: 1px solid var(--glass-border-lit);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-xl);
  box-shadow: var(--glass-shadow-lg);
  position: relative;
  overflow: hidden;
  animation: fadeScaleUp 1s var(--ease-out-expo) 0.15s both;
}

.poll-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-terracotta), var(--accent-gold), var(--accent-terracotta));
  background-size: 200% 100%;
  animation: shimmerGradient 4s ease infinite;
}

/* ── Question Section ── */
.question-section {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.question-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--fs-micro);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-terracotta);
  background: rgba(217,119,87,0.08);
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-lg);
}

.question-badge svg {
  width: 14px;
  height: 14px;
}

.question-text {
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  font-weight: var(--fw-bold);
  font-style: italic;
  color: var(--bg-dark);
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.question-text::before {
  content: '\201C';
  color: var(--accent-terracotta);
  opacity: 0.3;
  font-size: 1.4em;
}

.question-text::after {
  content: '\201D';
  color: var(--accent-terracotta);
  opacity: 0.3;
  font-size: 1.4em;
}

/* ── Vote Buttons ── */
.vote-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.vote-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-lg) var(--space-xl);
  border-radius: var(--radius-lg);
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.01em;
  transition: all var(--duration-normal) var(--ease-out-quart);
  overflow: hidden;
  isolation: isolate;
}

.vote-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-smooth);
  z-index: -1;
}

.vote-btn:active {
  transform: scale(0.97);
}

/* Yes Button */
.vote-btn--yes {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  box-shadow: 0 4px 16px rgba(25,25,25,0.15);
}

.vote-btn--yes::before {
  background: linear-gradient(135deg, var(--accent-emerald), #43A047);
}

.vote-btn--yes:hover {
  box-shadow: 0 6px 24px rgba(46,125,50,0.25);
  transform: translateY(-2px);
}

.vote-btn--yes:hover::before {
  opacity: 1;
}

.vote-btn--yes .btn-icon {
  width: 22px;
  height: 22px;
  transition: transform var(--duration-normal) var(--ease-spring);
}

.vote-btn--yes:hover .btn-icon {
  transform: scale(1.15) rotate(-5deg);
}

/* No Button */
.vote-btn--no {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--surface-accent);
  box-shadow: 0 2px 8px rgba(25,25,25,0.04);
}

.vote-btn--no::before {
  background: linear-gradient(135deg, var(--accent-crimson), #C62828);
}

.vote-btn--no:hover {
  border-color: var(--accent-crimson);
  color: var(--accent-crimson);
  box-shadow: 0 4px 16px rgba(183,28,28,0.12);
  transform: translateY(-2px);
}

.vote-btn--no:hover::before {
  opacity: 0.06;
}

.vote-btn--no .btn-icon {
  width: 20px;
  height: 20px;
  transition: transform var(--duration-normal) var(--ease-spring);
}

.vote-btn--no:hover .btn-icon {
  transform: scale(1.1) rotate(5deg);
}

/* ── Voted State ── */
.vote-btn--disabled {
  pointer-events: none;
  opacity: 0.5;
  transform: scale(0.97);
}

.vote-btn--selected {
  pointer-events: none;
}

.vote-btn--selected.vote-btn--yes {
  background: var(--accent-emerald);
  box-shadow: 0 4px 20px rgba(46,125,50,0.25);
}

.vote-btn--selected.vote-btn--no {
  background: var(--accent-crimson);
  color: var(--text-on-dark);
  border-color: var(--accent-crimson);
  box-shadow: 0 4px 20px rgba(183,28,28,0.2);
}

.voted-check {
  display: none;
  width: 18px;
  height: 18px;
}

.vote-btn--selected .voted-check {
  display: inline-block;
}

.vote-btn--selected .btn-icon {
  display: none;
}

/* ── Results Panel ── */
.results-panel {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--glass-border);
  display: block;
  animation: fadeIn 0.8s var(--ease-out-expo) both;
}

.results-panel.is-visible {
  display: block;
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  animation: livePulse 2s infinite ease-in-out;
}

@keyframes livePulse {
  0% {
    transform: scale(0.95);
    opacity: 0.7;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1.1);
    opacity: 1;
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    opacity: 0.7;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.results-title {
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}

.total-votes {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-size: var(--fs-small);
  font-weight: var(--fw-bold);
  color: var(--bg-dark);
  background: var(--surface-accent);
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-pill);
}

.total-votes svg {
  width: 14px;
  height: 14px;
  color: var(--accent-terracotta);
}

/* ── Progress Bars ── */
.result-row {
  margin-bottom: var(--space-md);
}

.result-row:last-child {
  margin-bottom: 0;
}

.result-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xs);
}

.result-label-text {
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
}

.result-percentage {
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--bg-dark);
  font-variant-numeric: tabular-nums;
}

.progress-track {
  width: 100%;
  height: 10px;
  background: rgba(25,25,25,0.05);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  width: 0%;
  transition: width 1.2s var(--ease-out-expo);
}

.progress-fill--yes {
  background: linear-gradient(90deg, var(--accent-emerald), #66BB6A);
}

.progress-fill--no {
  background: linear-gradient(90deg, var(--accent-crimson), #E53935);
}

/* ── Vote Count Breakdown ── */
.result-vote-count {
  font-size: var(--fs-micro);
  color: var(--text-tertiary);
  margin-top: var(--space-2xs);
  text-align: right;
}

/* ── Modal Overlay ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-normal) var(--ease-smooth),
              visibility var(--duration-normal);
}

.modal-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 25, 25, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 85dvh;
  overflow-y: auto;
  background: var(--glass-bg-heavy);
  backdrop-filter: blur(var(--glass-blur-heavy));
  -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
  border: 1px solid var(--glass-border);
  border-top: 1px solid var(--glass-border-lit);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  box-shadow: var(--glass-shadow-lg);
  text-align: center;
  transform: scale(0.9) translateY(20px);
  transition: transform var(--duration-slow) var(--ease-spring);
}

.modal-overlay.is-active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-illustration {
  width: 120px;
  height: 120px;
  margin: 0 auto var(--space-lg);
}

.modal-emoji {
  font-size: 4rem;
  margin-bottom: var(--space-lg);
  line-height: 1;
}

.modal-title {
  font-family: var(--font-display);
  font-size: var(--fs-title);
  font-weight: var(--fw-bold);
  color: var(--bg-dark);
  margin-bottom: var(--space-sm);
  line-height: var(--lh-tight);
}

.modal-message {
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-xl);
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  transition: all var(--duration-fast) var(--ease-smooth);
}

.modal-btn--primary {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.modal-btn--primary:hover {
  background: var(--bg-dark-soft);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(25,25,25,0.2);
}

.modal-btn--secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}

.modal-btn--secondary:hover {
  border-color: var(--surface-accent);
  background: rgba(231,227,216,0.3);
}

/* ── Yes Modal Colors ── */
.modal-overlay--yes .modal-content {
  border-top: 3px solid var(--accent-emerald);
}

.modal-overlay--yes .modal-title {
  color: var(--accent-emerald);
}

/* ── No Modal Colors ── */
.modal-overlay--no .modal-content {
  border-top: 3px solid var(--accent-crimson);
}

.modal-overlay--no .modal-title {
  color: var(--accent-crimson);
}

/* ── Footer ── */
.app-footer {
  margin-top: var(--space-2xl);
  text-align: center;
  animation: fadeSlideUp 0.8s var(--ease-out-expo) 0.4s both;
}

.footer-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.footer-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--text-tertiary);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: all var(--duration-fast) var(--ease-smooth);
}

.footer-btn:hover {
  color: var(--text-primary);
  border-color: var(--glass-border);
  background: var(--glass-bg);
}

.footer-btn svg {
  width: 16px;
  height: 16px;
}

/* ── Sound Toggle ── */
.sound-toggle {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  z-index: 50;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg-heavy);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  box-shadow: var(--glass-shadow);
  transition: all var(--duration-fast) var(--ease-smooth);
}

.sound-toggle:hover {
  transform: scale(1.1);
  box-shadow: var(--glass-shadow-lg);
}

.sound-toggle svg {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}

.sound-toggle.is-muted svg {
  opacity: 0.4;
}

/* ── Toast Notification ── */
.toast {
  position: fixed;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 200;
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-pill);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  box-shadow: 0 8px 24px rgba(25,25,25,0.3);
  transition: transform var(--duration-normal) var(--ease-spring);
  pointer-events: none;
}

.toast.is-visible {
  transform: translateX(-50%) translateY(0);
}

/* ── Customizer Drawer ── */
.customizer-trigger {
  position: fixed;
  bottom: var(--space-lg);
  left: var(--space-lg);
  z-index: 50;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg-heavy);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  box-shadow: var(--glass-shadow);
  transition: all var(--duration-fast) var(--ease-smooth);
}

.customizer-trigger:hover {
  transform: scale(1.1) rotate(30deg);
  box-shadow: var(--glass-shadow-lg);
}

.customizer-trigger svg {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}

.customizer-drawer {
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 90;
  width: 100%;
  max-width: 380px;
  max-height: 70dvh;
  overflow-y: auto;
  background: var(--glass-bg-heavy);
  backdrop-filter: blur(var(--glass-blur-heavy));
  -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: var(--space-xl);
  box-shadow: var(--glass-shadow-lg);
  transform: translateY(110%);
  transition: transform var(--duration-slow) var(--ease-out-expo);
}

.customizer-drawer.is-open {
  transform: translateY(0);
}

.customizer-drawer h3 {
  font-family: var(--font-display);
  font-size: var(--fs-title);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-lg);
  color: var(--bg-dark);
}

.customizer-field {
  margin-bottom: var(--space-md);
}

.customizer-field label {
  display: block;
  font-size: var(--fs-micro);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: var(--space-2xs);
}

.customizer-field input,
.customizer-field textarea {
  width: 100%;
  padding: var(--space-sm);
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: var(--fs-small);
  color: var(--text-primary);
  transition: border-color var(--duration-fast) var(--ease-smooth);
  resize: vertical;
}

.customizer-field input:focus,
.customizer-field textarea:focus {
  outline: none;
  border-color: var(--accent-terracotta);
}

.customizer-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.customizer-btn {
  flex: 1;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  text-align: center;
  transition: all var(--duration-fast) var(--ease-smooth);
}

.customizer-btn--save {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.customizer-btn--save:hover {
  background: var(--bg-dark-soft);
}

.customizer-btn--reset {
  background: transparent;
  color: var(--accent-crimson);
  border: 1px solid rgba(183,28,28,0.2);
}

.customizer-btn--reset:hover {
  background: rgba(183,28,28,0.06);
}

.customizer-btn--close {
  background: transparent;
  color: var(--text-tertiary);
  border: 1px solid var(--glass-border);
}

.customizer-btn--close:hover {
  background: rgba(231,227,216,0.3);
}

/* ═══════════════════════════════════════════════════════════════
   SECRET KEY MODAL — Custom Security Panel
   ═══════════════════════════════════════════════════════════════ */
.key-overlay {
  position: fixed;
  inset: 0;
  z-index: 105;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-normal) var(--ease-smooth),
              visibility var(--duration-normal);
}

.key-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.key-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 25, 25, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.key-modal {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--glass-bg-heavy);
  backdrop-filter: blur(var(--glass-blur-heavy));
  -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
  border: 1px solid var(--glass-border);
  border-top: 1px solid var(--glass-border-lit);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-xl);
  box-shadow: var(--glass-shadow-lg);
  text-align: center;
  transform: scale(0.92) translateY(18px);
  transition: transform var(--duration-slow) var(--ease-spring);
}

.key-overlay.is-active .key-modal {
  transform: scale(1) translateY(0);
}

.key-icon-badge {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-md);
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(217,119,87,0.15), rgba(196,155,90,0.2));
  border: 1px solid rgba(217,119,87,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-terracotta);
  box-shadow: 0 4px 16px rgba(217,119,87,0.15);
}

.key-lock-icon {
  width: 26px;
  height: 26px;
}

.key-title {
  font-family: var(--font-display);
  font-size: var(--fs-title);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
  letter-spacing: -0.01em;
}

.key-desc {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  line-height: var(--lh-normal);
}

.key-input-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: var(--space-xs);
}

.key-input {
  width: 100%;
  padding: var(--space-sm) 2.75rem var(--space-sm) var(--space-md);
  background: rgba(255, 255, 255, 0.65);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  color: var(--text-primary);
  letter-spacing: 0.05em;
  transition: all var(--duration-fast) var(--ease-smooth);
  outline: none;
  box-shadow: inset 0 2px 4px rgba(25, 25, 25, 0.03);
}

.key-input:focus {
  border-color: var(--accent-terracotta);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.18), inset 0 2px 4px rgba(25, 25, 25, 0.03);
}

.key-input.has-error {
  border-color: var(--accent-crimson);
  background: rgba(183, 28, 28, 0.04);
  box-shadow: 0 0 0 3px rgba(183, 28, 28, 0.15);
}

.key-toggle-visibility {
  position: absolute;
  right: var(--space-xs);
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: var(--space-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color var(--duration-fast);
}

.key-toggle-visibility:hover {
  color: var(--text-primary);
}

.key-toggle-visibility svg {
  width: 18px;
  height: 18px;
}

.key-error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
  color: var(--accent-crimson);
  min-height: 20px;
  margin-top: var(--space-2xs);
  margin-bottom: var(--space-md);
  opacity: 0;
  transform: translateY(-4px);
  transition: all var(--duration-fast) var(--ease-smooth);
}

.key-error.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.key-actions {
  display: flex;
  gap: var(--space-sm);
}

.key-btn {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.02em;
  transition: all var(--duration-fast) var(--ease-smooth);
  cursor: pointer;
}

.key-btn--cancel {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}

.key-btn--cancel:hover {
  background: rgba(231, 227, 216, 0.4);
  color: var(--text-primary);
}

.key-btn--submit {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  border: 1px solid var(--bg-dark);
  box-shadow: 0 4px 12px rgba(25, 25, 25, 0.15);
}

.key-btn--submit:hover {
  background: var(--bg-dark-soft);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(25, 25, 25, 0.2);
}

.key-btn--submit:active {
  transform: translateY(0);
}

