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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: transparent;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

.l3-bar {
  position: fixed;
  left: 40px;
  right: 40px;
  bottom: 40px;
  z-index: 10;
  transform: translateY(calc(100% + 80px));
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
  opacity: 0;
  pointer-events: none;
}

.l3-bar.visible {
  transform: translateY(0);
  opacity: 1;
}

.l3-bar.animated-in .l3-accent {
  animation: accentSlide 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.l3-bar.animated-in .l3-team-strip.visible {
  animation: contentFade 0.5s ease 0.4s both;
}

.l3-bar.animated-in .l3-content {
  animation: contentFade 0.5s ease 0.5s both;
}

@keyframes accentSlide {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes contentFade {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes optionIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.l3-inner {
  position: relative;
  background: linear-gradient(135deg, rgba(15, 17, 23, 0.97), rgba(26, 29, 39, 0.95));
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.l3-accent {
  height: 5px;
  background: linear-gradient(90deg, #f5c518, #e94560, #f5c518);
  transform-origin: left;
}

.l3-body {
  display: flex;
  align-items: stretch;
}

.l3-team-strip {
  display: none;
  align-items: center;
  justify-content: center;
  width: 72px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  padding: 16px 0;
}

.l3-team-strip.visible {
  display: flex;
}

.l3-team-strip.red {
  background: linear-gradient(180deg, #ff6b5b, #c0392b);
  color: white;
}

.l3-team-strip.blue {
  background: linear-gradient(180deg, #5dade2, #2980b9);
  color: white;
}

.l3-main-content {
  flex: 1;
  min-width: 0;
}

.l3-content {
  padding: 16px 24px 12px;
  min-width: 0;
}

.l3-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-bottom: 4px;
  min-height: 28px;
}

.l3-question {
  color: #ffffff;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.3;
}

.l3-question-num {
  color: #f5c518;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 4px;
}

.l3-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 1fr;
  gap: 10px;
  padding: 0 24px 20px;
  align-items: stretch;
}

.l3-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  min-height: 52px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  border: 3px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
}

.l3-options.options-animate .l3-option {
  animation: optionIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.l3-options.options-animate .l3-option:nth-child(1) { animation-delay: 0.05s; }
.l3-options.options-animate .l3-option:nth-child(2) { animation-delay: 0.14s; }
.l3-options.options-animate .l3-option:nth-child(3) { animation-delay: 0.23s; }
.l3-options.options-animate .l3-option:nth-child(4) { animation-delay: 0.32s; }

.l3-options.options-visible .l3-option {
  opacity: 1;
}

.l3-option .opt-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #f5c518;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.l3-option .opt-text {
  color: #e8e8e8;
  font-size: 17px;
  font-weight: 500;
}

.l3-option.highlighted {
  border-color: #3498db;
  background: rgba(52, 152, 219, 0.25);
  box-shadow: 0 0 16px rgba(52, 152, 219, 0.35);
}

.l3-option.highlighted .opt-letter {
  background: #3498db;
  color: white;
}

.l3-option.correct {
  border-color: #2ecc71;
  background: rgba(46, 204, 113, 0.35);
  box-shadow: 0 0 20px rgba(46, 204, 113, 0.5);
  animation: pulseCorrect 0.6s ease 3;
}

.l3-option.correct .opt-letter {
  background: #2ecc71;
  color: white;
}

.l3-option.incorrect {
  border-color: #e74c3c;
  background: rgba(231, 76, 60, 0.35);
  box-shadow: 0 0 20px rgba(231, 76, 60, 0.5);
  animation: pulseIncorrect 0.6s ease 3;
}

.l3-option.incorrect .opt-letter {
  background: #e74c3c;
  color: white;
}

.l3-option.dimmed {
  opacity: 0.35;
}

@keyframes pulseCorrect {
  0%, 100% { box-shadow: 0 0 30px rgba(46, 204, 113, 0.6); }
  50% { box-shadow: 0 0 60px rgba(46, 204, 113, 1); }
}

@keyframes pulseIncorrect {
  0%, 100% { box-shadow: 0 0 30px rgba(231, 76, 60, 0.6); }
  50% { box-shadow: 0 0 60px rgba(231, 76, 60, 1); }
}

.l3-result-banner {
  display: none;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 4px;
  flex-shrink: 0;
  white-space: nowrap;
}

.l3-bar.revealed .l3-result-banner {
  display: block;
  animation: bannerPop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.l3-result-banner.correct {
  background: #2ecc71;
  color: white;
}

.l3-result-banner.incorrect {
  background: #e74c3c;
  color: white;
}

@keyframes bannerPop {
  0% { transform: scale(0) rotate(-8deg); opacity: 0; }
  60% { transform: scale(1.15) rotate(2deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.l3-flash {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
}

.l3-flash.active {
  animation: screenFlash 0.8s ease forwards;
}

.l3-flash.correct {
  background: rgba(46, 204, 113, 0.35);
}

.l3-flash.incorrect {
  background: rgba(231, 76, 60, 0.35);
}

@keyframes screenFlash {
  0% { opacity: 0; }
  15% { opacity: 1; }
  100% { opacity: 0; }
}

.l3-big-result {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  z-index: 15;
  font-size: 120px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  pointer-events: none;
  opacity: 0;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
}

.l3-big-result.active {
  animation: bigResultPop 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.l3-big-result.correct {
  color: #2ecc71;
}

.l3-big-result.incorrect {
  color: #e74c3c;
}

@keyframes bigResultPop {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  20% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
  40% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  80% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.1); opacity: 0; }
}

.l3-round-ident {
  position: fixed;
  left: 40px;
  right: 40px;
  bottom: 40px;
  z-index: 20;
  transform: translateY(calc(100% + 80px));
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
  opacity: 0;
  pointer-events: none;
}

.l3-round-ident.visible {
  transform: translateY(0);
  opacity: 1;
}

.l3-round-ident-inner {
  background: linear-gradient(135deg, rgba(15, 17, 23, 0.97), rgba(26, 29, 39, 0.95));
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  padding: 28px 40px;
  text-align: center;
}

.l3-round-ident-accent {
  height: 5px;
  background: linear-gradient(90deg, #f5c518, #e94560, #f5c518);
  transform-origin: left;
  margin: -28px -40px 20px;
}

.l3-round-ident.animated-in .l3-round-ident-accent {
  animation: accentSlide 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.l3-round-ident.animated-in .l3-round-ident-label,
.l3-round-ident.animated-in .l3-round-ident-name {
  animation: contentFade 0.5s ease 0.4s both;
}

.l3-round-ident-label {
  color: #f5c518;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  margin-bottom: 8px;
}

.l3-round-ident-name {
  color: #ffffff;
  font-size: 48px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.1;
}
