:root {
  --bg: #02040a;
  --bg-card: rgba(10, 14, 23, 0.6);
  --bg-elev: rgba(17, 24, 38, 0.7);
  --border: rgba(77, 208, 225, 0.2);
  --border-glow: rgba(77, 208, 225, 0.5);
  --text: #e0f2fe;
  --text-dim: #7dd3fc;
  --accent: #00e5ff;
  --critical: #ff2a5f;
  --warning: #ffaa00;
  --safe: #00e676;
}

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

html,
body {
  background: transparent;
  color: var(--text);
  font-family: 'Chakra Petch', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

.hidden {
  display: none !important;
}

/* Abstract Security Core Background */
.core-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: var(--bg);
}

.core-background canvas {
  display: block;
}

/* Glass Panel Utility */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(0, 229, 255, 0.05);
}

/* Topbar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 40px;
  border-bottom: 1px solid var(--border);
  background: rgba(2, 4, 10, 0.8);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 10;
}

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

.logo-dot {
  width: 14px;
  height: 14px;
  border-radius: 0;
  /* Hexagon/Square feel */
  background: var(--accent);
  box-shadow: 0 0 15px var(--accent);
  transform: rotate(45deg);
}

.logo-text {
  font-weight: 700;
  letter-spacing: 0.2em;
  font-size: 22px;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

.logo-tag {
  color: var(--text-dim);
  font-size: 13px;
  letter-spacing: 0.1em;
  margin-left: 12px;
  border-left: 1px solid var(--border);
  padding-left: 12px;
}

.btn-ghost {
  background: rgba(0, 229, 255, 0.05);
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 10px 20px;
  border-radius: 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  font-family: inherit;
  transition: all 0.2s;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.1) inset;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.btn-ghost:hover {
  background: rgba(0, 229, 255, 0.15);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.3) inset, 0 0 15px rgba(0, 229, 255, 0.4);
}

/* Stage */
.stage {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 400px);
  position: relative;
  z-index: 10;
}

.hero {
  padding: 48px;
  border-radius: 4px;
  max-width: 680px;
  background: rgba(4, 12, 20, 0.45);
  /* Transparent glass */
  border: 1px solid rgba(77, 208, 225, 0.15);
  border-left: 4px solid var(--accent);
  box-shadow: -2px 0 25px rgba(0, 229, 255, 0.15), 0 8px 32px 0 rgba(0, 0, 0, 0.6);
  position: relative;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hero::before {
  display: none;
}

.hero h1 {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: 0.05em;
  text-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
  text-transform: uppercase;
  line-height: 1.2;
}

.lede {
  color: #8ab4c6;
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 40px;
  letter-spacing: 0.02em;
}

/* Scenario buttons & Inputs */
.wallet-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.wallet-input:focus {
  border-color: var(--accent);
  box-shadow: inset 0 0 10px rgba(0, 229, 255, 0.1), 0 0 10px rgba(0, 229, 255, 0.2);
}

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

.scenario {
  background: #06111a;
  border: 1px solid #142a38;
  color: var(--text);
  padding: 24px 20px;
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}

.scenario::before {
  display: none;
}

.scenario:hover {
  background: #091a28;
  border-color: rgba(0, 229, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.05);
}

.scenario.safe:hover {
  border-color: rgba(0, 230, 118, 0.4);
  box-shadow: 0 4px 15px rgba(0, 230, 118, 0.05);
}

.scenario-icon {
  font-size: 24px;
  opacity: 0.8;
}

.scenario-content {
  flex: 1;
}

.scenario-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 6px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.scenario-desc {
  color: var(--text-dim);
  font-size: 13px;
}

/* Status */
.status {
  margin-top: 24px;
  padding: 16px 20px;
  background: rgba(17, 24, 38, 0.8);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.status.success {
  border-left-color: var(--safe);
  border-color: rgba(0, 230, 118, 0.3);
  color: var(--safe);
  box-shadow: 0 0 15px rgba(0, 230, 118, 0.1) inset;
}

.status.error {
  border-left-color: var(--critical);
  border-color: rgba(255, 42, 95, 0.3);
  color: var(--critical);
  box-shadow: 0 0 15px rgba(255, 42, 95, 0.1) inset;
}

/* Intervention overlay */
.intervention {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  perspective: 1000px;
}

.intervention-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(2, 4, 10, 0.8) 0%, rgba(2, 4, 10, 0.95) 100%);
  backdrop-filter: blur(12px);
  animation: fade-in 0.3s ease-out;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.intervention-card {
  width: min(700px, calc(100% - 40px));
  border: 1px solid rgba(255, 42, 95, 0.5);
  border-radius: 4px;
  position: relative;
  box-shadow: 0 0 50px rgba(255, 42, 95, 0.2), inset 0 0 20px rgba(255, 42, 95, 0.1);
  animation: card-enter 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  transform-style: preserve-3d;
}

.intervention-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--critical);
  box-shadow: 0 0 15px var(--critical);
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(30px) rotateX(10deg);
  }

  to {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}

.intervention-header {
  padding: 24px 32px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 42, 95, 0.2);
  background: linear-gradient(90deg, rgba(255, 42, 95, 0.1) 0%, transparent 100%);
}

.pulse {
  width: 14px;
  height: 14px;
  border-radius: 0;
  background: var(--critical);
  transform: rotate(45deg);
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 10px var(--critical);
    opacity: 1;
  }

  50% {
    box-shadow: 0 0 25px var(--critical);
    opacity: 0.6;
  }
}

.intervention-title {
  font-size: 20px;
  font-weight: 700;
  flex: 1;
  letter-spacing: 0.1em;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 42, 95, 0.5);
}

.intervention-score {
  color: var(--text-dim);
  font-size: 14px;
  letter-spacing: 0.1em;
}

.intervention-score span {
  color: var(--critical);
  font-weight: 700;
  font-size: 20px;
  text-shadow: 0 0 10px rgba(255, 42, 95, 0.4);
}

.intervention-body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.findings-label,
.voice-label,
.cooldown-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.findings-label::before,
.voice-label::before,
.cooldown-label::before {
  content: '>';
  color: var(--accent);
}

.summary {
  background: rgba(0, 0, 0, 0.4);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 15px;
  margin-bottom: 16px;
  line-height: 1.5;
  border-left: 2px solid var(--accent);
}

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

.findings li {
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.findings li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
}

.findings li.critical {
  border-color: rgba(255, 42, 95, 0.2);
  background: linear-gradient(90deg, rgba(255, 42, 95, 0.05) 0%, transparent 100%);
}

.findings li.critical::before {
  background: var(--critical);
  box-shadow: 0 0 10px var(--critical);
}

.findings li.warning {
  border-color: rgba(255, 170, 0, 0.2);
  background: linear-gradient(90deg, rgba(255, 170, 0, 0.05) 0%, transparent 100%);
}

.findings li.warning::before {
  background: var(--warning);
  box-shadow: 0 0 10px var(--warning);
}

.findings li.info {
  border-color: rgba(0, 229, 255, 0.2);
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.05) 0%, transparent 100%);
}

.findings li.info::before {
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.voice-block audio {
  width: 100%;
  height: 40px;
  border-radius: 0;
  outline: 1px solid rgba(0, 229, 255, 0.2);
  filter: invert(0.9) sepia(1) saturate(5) hue-rotate(180deg) brightness(0.8);
}

.intervention-footer {
  padding: 24px 32px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.cooldown {
  margin-bottom: 24px;
}

.cooldown-time {
  font-size: 42px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
  text-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
  line-height: 1;
}

.cooldown-bar {
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  position: relative;
}

.cooldown-bar-fill {
  height: 100%;
  background: var(--accent);
  width: 100%;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px var(--accent);
}

.actions {
  display: flex;
  gap: 16px;
}

.btn-cancel,
.btn-confirm {
  flex: 1;
  padding: 16px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-transform: uppercase;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.btn-cancel {
  background: rgba(0, 230, 118, 0.1);
  color: var(--safe);
  border: 1px solid var(--safe);
  box-shadow: inset 0 0 15px rgba(0, 230, 118, 0.2);
}

.btn-cancel:hover {
  background: rgba(0, 230, 118, 0.2);
  box-shadow: inset 0 0 20px rgba(0, 230, 118, 0.4), 0 0 15px rgba(0, 230, 118, 0.2);
}

.btn-confirm {
  background: rgba(255, 42, 95, 0.05);
  color: var(--critical);
  border: 1px solid var(--critical);
}

.btn-confirm:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.4);
  background: transparent;
  box-shadow: none;
}

.btn-confirm:not(:disabled):hover {
  background: rgba(255, 42, 95, 0.15);
  box-shadow: inset 0 0 20px rgba(255, 42, 95, 0.3), 0 0 15px rgba(255, 42, 95, 0.2);
}

@media (max-width: 900px) {
  .core-image {
    opacity: 0.3;
    right: -20vw;
  }

  .stage {
    padding: 40px 20px;
  }

  .scenarios {
    grid-template-columns: 1fr;
  }
}
/* Voice Selector */
.voice-selector-container {
  margin-bottom: 32px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(77, 208, 225, 0.1);
  border-radius: 4px;
}

.selector-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  margin-bottom: 16px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.selector-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(77, 208, 225, 0.2), transparent);
}

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

.voice-option {
  background: rgba(10, 14, 23, 0.4);
  border: 1px solid rgba(77, 208, 225, 0.1);
  border-radius: 4px;
  padding: 16px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  overflow: hidden;
  font-family: inherit;
}

.voice-option:hover {
  background: rgba(10, 14, 23, 0.6);
  border-color: rgba(0, 229, 255, 0.3);
  transform: translateY(-2px);
}

.voice-option.active {
  background: rgba(0, 229, 255, 0.05);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.1);
}

.voice-avatar-wrapper {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  padding: 2px;
  background: rgba(77, 208, 225, 0.1);
  transition: all 0.3s ease;
}

.voice-option.active .voice-avatar-wrapper {
  background: var(--accent);
  box-shadow: 0 0 15px var(--accent);
}

.voice-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #000;
  filter: grayscale(0.5);
  transition: all 0.3s ease;
}

.voice-option:hover .voice-avatar,
.voice-option.active .voice-avatar {
  filter: grayscale(0);
}

.avatar-glow {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0;
  transition: all 0.3s ease;
  transform: scale(1.1);
}

.voice-option.active .avatar-glow {
  opacity: 0.5;
  transform: scale(1);
  animation: avatar-pulse 2s infinite;
}

@keyframes avatar-pulse {
  0% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.2; }
  100% { transform: scale(1); opacity: 0.5; }
}

.voice-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.voice-option.active .voice-name {
  color: var(--accent);
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

@media (max-width: 600px) {
  .voice-options {
    grid-template-columns: 1fr;
  }
  
  .voice-option {
    flex-direction: row;
    padding: 12px 20px;
  }
  
  .voice-avatar-wrapper {
    width: 40px;
    height: 40px;
  }
}
