:root {
  --blue: #1468b3;
  --blue-soft: rgba(20, 104, 179, 0.12);
  --blue-glow: rgba(20, 104, 179, 0.45);
  --white: #ffffff;
  --ink: #10141c;
  --ink-dim: rgba(16, 20, 28, 0.6);
  --line: #e3e7ee;
  --panel: #f4f7fb;
  --danger: #d64545;
  --success: #2fa86b;
  --radius: 14px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  font-family: Lato, sans-serif !important;
}

body {
  background: var(--white);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
}

/* ---------- Ambient cyber network background ---------- */

#net-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.scan-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(20, 104, 179, 0.06) 0px,
    rgba(20, 104, 179, 0.06) 1px,
    transparent 1px,
    transparent 3px
  );
  transition: opacity 200ms ease;
}

.scan-overlay.active {
  opacity: 1;
  animation: scanSweep 1.1s ease-in-out;
}

@keyframes scanSweep {
  0% { background-position-y: 0; opacity: 0.9; }
  100% { background-position-y: 400px; opacity: 0; }
}

#app {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.screen {
  display: none;
  width: 100%;
  max-width: 720px;
  animation: fadeUp 500ms ease;
}

.screen.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Modals (alert / verdict popups) ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(16, 20, 28, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-backdrop[hidden] { display: none; }

.modal-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: var(--white);
  border-radius: 20px;
  padding: 36px;
  border: 1px solid rgba(20, 104, 179, 0.35);
  box-shadow: 0 0 0 1px rgba(20, 104, 179, 0.15), 0 30px 70px rgba(20, 104, 179, 0.35), 0 0 40px rgba(20, 104, 179, 0.25);
  animation: modalPopIn 380ms cubic-bezier(.2, .9, .25, 1.15);
}

@keyframes modalPopIn {
  0% { opacity: 0; transform: scale(0.9); box-shadow: 0 0 0 0 rgba(20, 104, 179, 0); }
  60% { box-shadow: 0 0 0 1px rgba(20, 104, 179, 0.2), 0 30px 70px rgba(20, 104, 179, 0.4), 0 0 60px rgba(20, 104, 179, 0.5); }
  100% { opacity: 1; transform: scale(1); }
}

.modal-card .btn-primary,
.modal-card #modal-verdict-continue { width: 100%; margin-top: 6px; }

/* ---------- Landing / Results (shared look) ---------- */

.landing-content {
  text-align: center;
  color: var(--ink);
}

.landing-badge {
  display: inline-block;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--blue);
  background: var(--blue-soft);
  border: 1px solid rgba(20, 104, 179, 0.25);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.landing-content h1 {
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.15;
  margin: 0 0 12px;
  font-weight: 900;
  color: var(--ink);
}

.subtitle {
  opacity: 0.65;
  font-size: 16px;
  margin: 0 0 32px;
}

.return-score {
  margin-top: 18px;
  font-size: 14px;
  opacity: 0.65;
}

/* ---------- Buttons ---------- */

.btn {
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  border: none;
  border-radius: 999px;
  padding: 14px 34px;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

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

.btn-primary {
  background: var(--blue);
  color: var(--white);
}

.btn-primary:hover { box-shadow: 0 6px 22px rgba(20, 104, 179, 0.35); }

.btn-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-glow {
  box-shadow: 0 0 0 0 rgba(20,104,179,0.6);
  animation: pulse 2.2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(20,104,179,0.45); }
  70% { box-shadow: 0 0 0 18px rgba(20,104,179,0); }
  100% { box-shadow: 0 0 0 0 rgba(20,104,179,0); }
}

.btn-floating {
  position: fixed;
  bottom: 28px;
  right: 28px;
}

/* ---------- Card (Screen 1) ---------- */

.card {
  position: relative;
  background: var(--white);
  color: var(--ink);
  border-radius: 20px;
  padding: 36px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px rgba(20, 104, 179, 0.12);
}

.creating-overlay[hidden] {
  display: none;
}

.creating-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--white);
  border-radius: 20px;
  animation: fadeUp 250ms ease;
}

.creating-spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid rgba(20, 104, 179, 0.2);
  border-top-color: var(--blue);
  animation: hackingSpin 700ms linear infinite;
}

.creating-text {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  opacity: 0.75;
}

.step-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.step-tag.inline {
  margin: 0 0 0 auto;
  padding: 4px 10px;
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
  color: var(--white);
}

.card h2 { margin: 0 0 6px; font-size: 26px; color: var(--ink); }
.hint { opacity: 0.6; margin: 0 0 22px; font-size: 14.5px; }

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.pw-field {
  position: relative;
  margin-bottom: 16px;
}

.pw-field input {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  padding: 14px 46px 14px 16px;
  border-radius: 10px;
  border: 2px solid var(--line);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.pw-field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-soft);
}

.pw-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.6;
}

.strength-meter { margin-bottom: 18px; }

.strength-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--panel);
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--danger);
  transition: width 300ms ease, background-color 300ms ease;
}

.strength-label {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  opacity: 0.7;
}

.crack-time-box {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--panel);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 22px;
}

.crack-time-icon { font-size: 22px; }
.crack-time-value { font-weight: 900; font-size: 17px; color: var(--ink); }
.crack-time-caption { font-size: 12.5px; opacity: 0.6; }

.micro-note {
  font-size: 12px;
  opacity: 0.5;
  text-align: center;
  margin: 14px 0 0;
}

#btn-create-account { width: 100%; }

.strength-caption {
  font-size: 13.5px;
  opacity: 0.65;
  margin: -10px 0 22px;
}

/* ---------- Account Created / Something Happened ---------- */

.checkmark-badge,
.alert-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 16px;
}

.checkmark-badge {
  background: rgba(47, 168, 107, 0.14);
  color: var(--success);
}

.alert-badge {
  background: rgba(214, 69, 69, 0.14);
  color: var(--danger);
}

.alert-badge.glitch {
  animation: glitchShake 320ms ease 2;
}

.glitch-text {
  position: relative;
}

@keyframes glitchShake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-2px, 1px); }
  40% { transform: translate(2px, -1px); }
  60% { transform: translate(-1px, 1px); }
  80% { transform: translate(1px, -1px); }
}

#screen-created .btn-primary {
  width: 100%;
  margin-top: 6px;
}

/* ---------- Breach Radar ---------- */

.reuse-buttons {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.btn-reuse, .btn-unique {
  flex: 1;
  padding: 16px 14px;
  font-size: 14.5px;
  border-radius: 14px;
  line-height: 1.3;
}

.btn-reuse { background: var(--danger); color: var(--white); }
.btn-unique { background: var(--success); color: var(--white); }

@media (max-width: 480px) {
  .reuse-buttons { flex-direction: column; }
}

.breach-stage {
  background: var(--white);
  color: var(--ink);
  border-radius: 20px;
  padding: 28px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px rgba(20, 104, 179, 0.12);
  max-width: 760px;
}

.breach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.breach-network-card {
  background: var(--blue);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.breach-hub {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
}

.breach-hub svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.breach-hub svg line {
  stroke: rgba(255,255,255,0.28);
  stroke-width: 2;
  transition: stroke 400ms ease;
}

.breach-hub svg line.compromised { stroke: var(--danger); }
.breach-hub svg line.safe { stroke: #bfe6d2; }

.breach-node {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 56px;
  text-align: center;
  color: var(--white);
}

.breach-node .node-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 2px solid rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin: 0 auto 4px;
  transition: border-color 300ms ease, background 300ms ease, box-shadow 300ms ease;
}

.breach-node.compromised .node-circle {
  border-color: var(--danger);
  background: rgba(214,69,69,0.35);
  box-shadow: 0 0 14px rgba(214,69,69,0.6);
}

.breach-node.safe .node-circle {
  border-color: #bfe6d2;
  background: rgba(47,168,107,0.25);
}

.breach-node .node-label {
  font-size: 10px;
  opacity: 0.9;
}

.breach-hub-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--white);
  color: var(--blue);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 10.5px;
  font-weight: 900;
  text-align: center;
  width: 76px;
  box-shadow: 0 0 20px rgba(255,255,255,0.5);
  z-index: 2;
}

.breach-timeline-card {
  background: var(--panel);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-height: 260px;
}

.breach-timeline-card h3 {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.6;
}

.breach-timeline {
  flex: 1;
  overflow-y: auto;
  max-height: 260px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.timeline-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12.5px;
  background: var(--white);
  border: 1px solid var(--line);
  animation: fadeUp 300ms ease;
}

.timeline-entry.compromised {
  border-color: rgba(214,69,69,0.4);
}

.timeline-entry .t-time {
  font-weight: 900;
  font-size: 11px;
  min-width: 42px;
}

.timeline-entry.compromised .t-time { color: var(--danger); }
.timeline-entry.safe .t-time { color: var(--success); }

.breach-note {
  background: #fff6e5;
  color: #8a6100;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 18px;
}

.verdict-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 16px;
}

#verdict-modal-card.risk .verdict-icon { background: rgba(214, 69, 69, 0.14); color: var(--danger); }
#verdict-modal-card.good .verdict-icon { background: rgba(47, 168, 107, 0.14); color: var(--success); }

.verdict-title {
  font-weight: 900;
  font-size: 18px;
  margin-bottom: 8px;
}

#verdict-modal-card.risk .verdict-title { color: var(--danger); }
#verdict-modal-card.good .verdict-title { color: var(--success); }

.verdict-body {
  font-size: 14px;
  opacity: 0.75;
  line-height: 1.55;
  margin-bottom: 10px;
}

.verdict-tip {
  font-size: 13px;
  font-weight: 700;
  opacity: 0.9;
}

.breach-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.breach-stats .stat-tile {
  background: var(--panel);
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
}

.breach-stats .label {
  font-size: 10.5px;
  opacity: 0.6;
  margin-bottom: 4px;
}

.breach-stats .value {
  font-size: 16px;
  font-weight: 900;
}

#btn-to-inbox { width: 100%; }

@media (max-width: 640px) {
  .breach-grid { grid-template-columns: 1fr; }
  .breach-stats { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  #app { padding: 14px; }
  .breach-stage { padding: 18px; }
  .breach-network-card { padding: 8px; }
  .breach-hub { max-width: 220px; }
  .breach-node { width: 40px; }
  .breach-node .node-circle { width: 28px; height: 28px; font-size: 13px; margin-bottom: 2px; }
  .breach-node .node-label { font-size: 7.5px; line-height: 1.1; }
  .breach-hub-center { width: 58px; font-size: 8px; padding: 6px 8px; }
}

/* ---------- Hacking simulation overlay ---------- */

.hacking-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(20, 104, 179, 0.97);
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: hackingFadeIn 250ms ease;
}

.hacking-overlay[hidden] { display: none; }
.hacking-overlay:not([hidden]) { display: flex; }

.hacking-inner {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hacking-header {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.hacking-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
  animation: hackingDotPulse 900ms ease-in-out infinite;
}

.hacking-main {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
}

.hacking-terminal {
  background: rgba(6, 20, 38, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 14px 16px;
  height: 320px;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
  font-size: 12.5px;
  line-height: 1.6;
  color: #cfe6ff;
}

.hacking-terminal .term-line {
  white-space: pre-wrap;
  animation: fadeUp 200ms ease;
}

.hacking-terminal .term-line.warn { color: #ffb3b3; }
.hacking-terminal .term-line.ok { color: #cfe6ff; }
.hacking-terminal .term-line.dim { color: rgba(207, 230, 255, 0.55); }

.hacking-apps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  align-content: start;
}

.hacking-app-tile {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color 250ms ease, background 250ms ease, box-shadow 250ms ease;
}

.hacking-app-tile .app-icon {
  font-size: 18px;
  width: 30px;
  text-align: center;
}

.hacking-app-tile .app-name {
  flex: 1;
  font-size: 11.5px;
  color: var(--white);
}

.hacking-app-tile .app-status {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.app-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: rgba(255, 255, 255, 0.9);
  animation: hackingSpin 700ms linear infinite;
}

.hacking-app-tile.checking {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.25);
}

.hacking-app-tile.compromised {
  border-color: var(--danger);
  background: rgba(214, 69, 69, 0.22);
  box-shadow: 0 0 14px rgba(214, 69, 69, 0.35);
  animation: hackingShake 320ms ease;
}

.hacking-app-tile.compromised .app-status { color: #ffdcdc; }

.hacking-app-tile.safe {
  border-color: #bfe6d2;
  background: rgba(47, 168, 107, 0.2);
}

.hacking-app-tile.safe .app-status { color: #d9f5e6; }

.hacking-disclaimer {
  background: #fff6e5;
  color: #8a6100;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 10px;
  text-align: center;
}

@keyframes hackingFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

@keyframes hackingShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

@media (max-width: 640px) {
  .hacking-main { grid-template-columns: 1fr; }
  .hacking-terminal { height: 220px; }
  .hacking-apps { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Teams-like shell (Inbox / Compose) ---------- */

.teams-shell {
  background: var(--white);
  color: var(--ink);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px rgba(20, 104, 179, 0.12);
  width: 100%;
  max-width: 760px;
}

.teams-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--blue);
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
}

.teams-dot {
  width: 10px; height: 10px;
  background: var(--white);
  border-radius: 50%;
}

.teams-body {
  display: grid;
  grid-template-columns: 110px 220px 1fr;
  min-height: 380px;
}

.teams-sidebar {
  background: var(--panel);
  padding: 14px 8px;
  font-size: 13px;
}

.sidebar-item {
  padding: 9px 10px;
  border-radius: 8px;
  margin-bottom: 4px;
  opacity: 0.65;
}

.sidebar-item.active {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 700;
  opacity: 1;
}

.teams-list {
  border-right: 1px solid var(--line);
  overflow-y: auto;
  max-height: 380px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--panel);
}

.email-item {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 2px 6px rgba(20, 104, 179, 0.06);
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background 150ms ease;
}

.email-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(20, 104, 179, 0.16);
  border-color: rgba(20, 104, 179, 0.3);
}

.email-item.selected { background: var(--blue-soft); border-color: var(--blue); }
.email-item.judged { opacity: 0.55; }
.email-item.locked { opacity: 0.45; cursor: not-allowed; }
.email-item.locked:hover { transform: none; box-shadow: 0 2px 6px rgba(20, 104, 179, 0.06); border-color: var(--line); }

.email-sender { font-weight: 700; font-size: 13.5px; }
.email-subject { font-size: 12.5px; margin-top: 2px; }
.email-preview { font-size: 11.5px; opacity: 0.55; margin-top: 2px; }

.teams-reading {
  padding: 20px;
  overflow-y: auto;
  max-height: 380px;
}

.reading-placeholder { opacity: 0.5; font-size: 14px; }

.reading-header { margin-bottom: 14px; }
.reading-header .from { font-weight: 900; font-size: 15px; }
.reading-header .meta { font-size: 12px; opacity: 0.55; margin-top: 2px; }
.reading-subject { font-weight: 700; font-size: 16px; margin: 10px 0 12px; }
.reading-body { font-size: 14px; line-height: 1.6; white-space: pre-line; }

.verdict-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.verdict-buttons .btn {
  flex: 1;
  padding: 11px 0;
  font-size: 14.5px;
  font-weight: 900;
}

.btn-phish { background: var(--danger); color: var(--white); }
.btn-fresh { background: var(--success); color: var(--white); }

@media (max-width: 480px) {
  .verdict-buttons { flex-direction: column; }
}

.feedback-banner {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}

.btn-next-email {
  width: 100%;
  margin-top: 14px;
}

.all-done-note {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  opacity: 0.85;
}

.feedback-banner.correct { background: #e6f7ee; color: #1f7a4d; }
.feedback-banner.wrong { background: #fdeaea; color: #b23434; }

/* ---------- Compose ---------- */

.compose-body { padding: 20px; }

.compose-field {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.compose-field span {
  display: inline-block;
  width: 60px;
  font-weight: 700;
  opacity: 0.55;
  font-size: 12px;
}

.link-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 0;
  border: none;
  background: none;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.link-btn:hover { opacity: 0.75; }

.compose-attachments {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin: 18px 0 14px;
}

.attachment-chip {
  position: relative;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 18px 12px 14px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  background: var(--white);
  box-shadow: 0 2px 6px rgba(20, 104, 179, 0.06);
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.attachment-chip span:first-child { font-size: 26px; }

.attachment-chip:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(20, 104, 179, 0.15);
}

.attachment-chip.picked {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: 0 0 0 3px rgba(20, 104, 179, 0.12);
}

.attachment-chip.reveal {
  cursor: default;
}

.attachment-chip.reveal:hover {
  transform: none;
}

.attachment-chip.reveal.correct {
  border-color: #1f7a4d;
  background: #e6f7ee;
  box-shadow: none;
}

.attachment-chip.reveal.wrong {
  border-color: #b23434;
  background: #fdeaea;
  box-shadow: none;
}

.chip-verdict {
  font-size: 11px;
  font-weight: 700;
}

.attachment-chip.reveal.correct .chip-verdict { color: #1f7a4d; }
.attachment-chip.reveal.wrong .chip-verdict { color: #b23434; }

.chip-why {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.8;
  line-height: 1.3;
}

.attachment-chip.picked::after {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#btn-send { width: 100%; margin-top: 6px; }

/* ---------- Results ---------- */

.score-ring-wrap { display: flex; justify-content: center; margin-bottom: 26px; }

.score-ring {
  position: relative;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(var(--blue) 0deg, var(--panel) 0deg);
  transition: background 900ms ease;
}

#score-ring span {
  background: var(--white);
  color: var(--ink);
  width: 128px;
  height: 128px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px var(--line);
}

.results-detail {
  max-width: 560px;
  margin: 0 auto 26px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(20, 104, 179, 0.08);
}

.detail-panel-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
}

.detail-panel-icon { font-size: 18px; }
.detail-panel-title { font-weight: 800; font-size: 14px; flex: 1; }
.detail-panel-score { font-weight: 900; font-size: 13px; color: var(--blue); }
.detail-panel-chevron {
  font-size: 12px;
  opacity: 0.5;
  transition: transform 150ms ease;
}
.detail-panel.open .detail-panel-chevron { transform: rotate(180deg); }

.detail-panel-body {
  padding: 0 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-summary {
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.85;
}

.detail-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--panel);
}

.detail-row.correct { background: rgba(47, 168, 107, 0.1); }
.detail-row.wrong { background: rgba(214, 69, 69, 0.08); }
.detail-row.neutral { background: var(--panel); }
.detail-row.neutral .detail-row-mark { color: var(--blue); }

.detail-row-mark {
  font-weight: 900;
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 1px;
}
.detail-row.correct .detail-row-mark { color: #2fa86b; }
.detail-row.wrong .detail-row-mark { color: #d64545; }

.detail-row-title { font-size: 13px; font-weight: 700; }
.detail-row-note { font-size: 12.5px; opacity: 0.7; margin-top: 3px; }

@media (max-width: 640px) {
  .teams-body { grid-template-columns: 130px 1fr; }
  .teams-sidebar { display: none; }
}

@media (max-width: 480px) {
  .teams-body { grid-template-columns: 1fr; }
  .teams-list {
    border-right: none;
    border-bottom: 1px solid var(--line);
    max-height: 180px;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .email-item { min-width: 160px; flex-shrink: 0; }
}
