/* ==========================================================================
   ComicCraft AI Studio – Pure Comic Edition Design System
   ========================================================================== */

:root {
  --bg-main: #090a10;
  --bg-card: #12141f;
  --bg-card-elevated: #1a1e2f;
  --primary: #f59e0b;
  --primary-glow: rgba(245, 158, 11, 0.4);
  --accent-cyan: #06b6d4;
  --accent-magenta: #ec4899;
  --accent-yellow: #facc15;
  --accent-purple: #8b5cf6;
  --border-color: #262b42;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --font-comic: 'Bangers', cursive;
  --font-bubble: 'Comic Neue', cursive, sans-serif;
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Halftone Background */
.halftone-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  background-image: radial-gradient(#ffffff 2px, transparent 2px);
  background-size: 24px 24px;
}

.app-container {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Header */
.studio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 1.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.header-left .logo-badge {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-icon {
  font-size: 2.3rem;
  filter: drop-shadow(0 0 12px var(--primary-glow));
  animation: bounceSlow 3s infinite ease-in-out;
}

.logo-title {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 1.75rem;
  letter-spacing: -0.5px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.badge-ai {
  font-size: 0.82rem;
  font-family: var(--font-sans);
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta));
  color: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: 0.5rem;
  letter-spacing: 1px;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
}

.logo-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Audio Equalizer */
.audio-equalizer {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  padding: 0.4rem 0.8rem;
  border-radius: 2rem;
}

.eq-bar {
  width: 3px;
  height: 14px;
  background: #22c55e;
  border-radius: 2px;
  animation: eqBounce 0.8s infinite ease-in-out;
}

.eq-bar:nth-child(2) { animation-delay: 0.2s; height: 18px; }
.eq-bar:nth-child(3) { animation-delay: 0.4s; height: 10px; }
.eq-bar:nth-child(4) { animation-delay: 0.1s; height: 16px; }

.eq-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #22c55e;
  margin-left: 0.3rem;
}

.aws-status-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.45rem 0.9rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse 2s infinite;
}

.btn-ghost {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-ghost:hover {
  background: var(--bg-card-elevated);
  color: var(--text-main);
  border-color: var(--text-muted);
}

/* Studio Main Grid */
.studio-main {
  display: grid;
  grid-template-columns: 430px 1fr;
  gap: 1.5rem;
}

@media (max-width: 1100px) {
  .studio-main {
    grid-template-columns: 1fr;
  }
}

/* Creator Card */
.creator-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 1.25rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.card-tag {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

.card-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  margin-top: 0.2rem;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

/* Sparks */
.sparks-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.spark-btn {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 0.6rem;
  cursor: pointer;
  transition: all 0.2s;
}

.spark-btn:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* Form Styles */
.comic-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.75rem;
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}

textarea#promptInput {
  background: var(--bg-card-elevated);
  border: 2px solid var(--border-color);
  color: #fff;
  border-radius: 0.85rem;
  padding: 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  resize: vertical;
  transition: all 0.2s;
  width: 100%;
}

textarea#promptInput:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

.custom-select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  background: var(--bg-card-elevated);
  border: 2px solid var(--border-color);
  color: #fff;
  border-radius: 0.75rem;
  padding: 0.65rem 2rem 0.65rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 1rem;
  transition: all 0.2s;
}

.custom-select:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

/* Duet Switch */
.duet-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 0.6rem 0.85rem;
  border-radius: 0.75rem;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #334155;
  transition: 0.3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--accent-purple);
}

input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.duet-label-box {
  display: flex;
  flex-direction: column;
}

.duet-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #c4b5fd;
}

.duet-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Action Button */
.btn-action-primary {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  border: 3px solid #000;
  box-shadow: 4px 4px 0px #000;
  padding: 0.85rem 1.5rem;
  border-radius: 0.85rem;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 0.25rem;
}

.btn-action-primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px #000;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.btn-action-primary:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #000;
}

/* Sticker Tray */
.sticker-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.sticker-item {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.2px;
  background: #facc15;
  color: #000;
  padding: 0.35rem 0.65rem;
  border: 2px solid #000;
  box-shadow: 2px 2px 0px #000;
  border-radius: 0.5rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
}

.sticker-item:hover {
  transform: rotate(-5deg) scale(1.1);
  background: #fde047;
}

/* Canvas Area */
.canvas-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 1.25rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.canvas-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.toolbar-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.comic-headline {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 1.7rem;
  letter-spacing: -0.5px;
  color: var(--accent-yellow);
  line-height: 1.1;
  margin: 0;
}

.genre-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1.5px solid var(--accent-cyan);
  padding: 0.3rem 0.75rem;
  border-radius: 2rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
  white-space: nowrap;
}

.toolbar-right {
  display: flex;
  gap: 0.6rem;
}

.btn-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.5rem 0.9rem;
  border-radius: 2rem;
  border: 2px solid #000;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cinema {
  background: var(--accent-purple);
  color: #fff;
  box-shadow: 3px 3px 0px #000;
}

.btn-play {
  background: #22c55e;
  color: #000;
  box-shadow: 3px 3px 0px #000;
}

.btn-play:hover:not(:disabled) {
  background: #4ade80;
  transform: translate(-1px, -1px);
}

.btn-export {
  background: var(--accent-cyan);
  color: #000;
  box-shadow: 3px 3px 0px #000;
}

.btn-export:hover:not(:disabled) {
  background: #22d3ee;
  transform: translate(-1px, -1px);
}

.btn-pill:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.logline-bar {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  font-style: italic;
  padding: 0.25rem 0;
}

/* Comic Strip Container */
.comic-strip-wrapper {
  background: #161826;
  border: 4px solid #000;
  box-shadow: 8px 8px 0px #000;
  border-radius: 1rem;
  padding: 1.25rem;
}

.comic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (max-width: 850px) {
  .comic-grid {
    grid-template-columns: 1fr;
  }
}

/* Individual Comic Panel */
.comic-panel {
  position: relative;
  background: #0f172a;
  border: 3px solid #000;
  box-shadow: 4px 4px 0px #000;
  border-radius: 0.75rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 400px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.comic-panel.active-voice {
  border-color: var(--accent-yellow);
  box-shadow: 0 0 25px var(--primary-glow), 6px 6px 0px #000;
  transform: scale(1.02);
  z-index: 10;
}

.panel-caption-badge {
  background: #fef08a;
  color: #000;
  border-bottom: 2px solid #000;
  padding: 0.4rem 0.75rem;
  font-family: var(--font-bubble);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-num-tag {
  background: #000;
  color: #fff;
  font-family: var(--font-comic);
  font-size: 0.9rem;
  padding: 0.1rem 0.4rem;
  border-radius: 0.3rem;
}

.panel-visual-area {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.visual-graphic {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.scene-art-svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Grand Finale Panel 4 Meme Showcase */
.panel-punchline-hero {
  border: 3.5px solid var(--accent-yellow) !important;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.4), 6px 6px 0px #000 !important;
}

.caption-punchline {
  background: linear-gradient(135deg, #f59e0b, #ef4444) !important;
  color: #fff !important;
  text-shadow: 1px 1px 0px #000;
  letter-spacing: 1px;
}

.meme-punchline-showcase {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0.25rem 0 0.75rem 0;
  z-index: 5;
  width: 100%;
}

.meme-photo-wrapper {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0 auto;
  max-width: 100%;
}

.meme-hero-img {
  max-width: 100%;
  max-height: 185px;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 3px solid #000000;
  box-shadow: 5px 5px 0px #000000;
  border-radius: 0.75rem;
  display: block;
  animation: punchlinePop 0.4s ease-out;
}

.punchline-bubble {
  background: #fef08a !important;
  border: 2.5px solid #000 !important;
  box-shadow: 4px 4px 0px #000 !important;
  font-size: 1.05rem !important;
}

.scene-atmosphere-graphic {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

@keyframes punchlinePop {
  0% { transform: scale(0.92); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

.sound-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-family: var(--font-comic);
  font-size: 1.7rem;
  letter-spacing: 1px;
  background: #ec4899;
  color: #fff;
  padding: 0.25rem 0.75rem;
  border: 3px solid #000;
  box-shadow: 3px 3px 0px #000;
  border-radius: 0.5rem;
  transform: rotate(12deg);
  z-index: 5;
  text-shadow: 2px 2px 0px #000;
  animation: wobble 4s infinite ease-in-out;
}

.panel-dialogues {
  position: relative;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.speech-bubble {
  position: relative;
  background: #ffffff;
  color: #000000;
  border: 2px solid #000000;
  border-radius: 1rem;
  padding: 0.6rem 0.85rem;
  font-family: var(--font-bubble);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
  box-shadow: 3px 3px 0px rgba(0,0,0,0.8);
  max-width: 88%;
}

.speech-bubble.char-left {
  align-self: flex-start;
  border-bottom-left-radius: 0.2rem;
}

.speech-bubble.char-right {
  align-self: flex-end;
  background: #e0f2fe;
  border-bottom-right-radius: 0.2rem;
}

.bubble-speaker {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.3rem;
  background: rgba(15, 23, 42, 0.07);
  padding: 0.15rem 0.45rem;
  border-radius: 0.35rem;
  border-left: 3px solid #f59e0b;
}

.speech-bubble.char-right .bubble-speaker {
  border-left-color: #0284c7;
}

.bubble-text-editable {
  outline: none;
  cursor: text;
  font-family: var(--font-bubble);
  font-size: 1.02rem;
  font-weight: 700;
  color: #000000;
  line-height: 1.35;
}

.bubble-text-editable:focus {
  background: rgba(254, 240, 138, 0.6);
  border-radius: 0.25rem;
}

.panel-footer-bar {
  background: rgba(0, 0, 0, 0.75);
  border-top: 2px solid #000;
  padding: 0.4rem 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.panel-footer-actions {
  display: flex;
  gap: 0.4rem;
}

.panel-btn-small {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 0.25rem 0.6rem;
  border-radius: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s;
}

.panel-btn-small:hover {
  background: var(--primary);
  color: #000;
  border-color: #000;
}

.panel-reroll-btn:hover {
  background: var(--accent-magenta);
  color: #fff;
}

.empty-state {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  text-align: center;
  gap: 1rem;
}

.empty-icon {
  font-size: 4rem;
  filter: drop-shadow(0 0 20px var(--primary-glow));
}

.empty-state h3 {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.3px;
  color: var(--accent-yellow);
}

.empty-state p {
  color: var(--text-muted);
  max-width: 450px;
  font-size: 0.95rem;
}

/* Cinema Modal */
.cinema-container {
  background: #0f111a;
  border: 4px solid #000;
  box-shadow: 12px 12px 0px #000;
  border-radius: 1.25rem;
  max-width: 900px;
  width: 100%;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cinema-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.cinema-badge {
  font-family: var(--font-comic);
  font-size: 1rem;
  color: var(--accent-magenta);
  letter-spacing: 1px;
}

.cinema-stage {
  min-height: 480px;
  background: #181b28;
  border: 3px solid #000;
  border-radius: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.cinema-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cinema-nav-btn {
  background: var(--bg-card-elevated);
  border: 2px solid #000;
  box-shadow: 3px 3px 0px #000;
  color: #fff;
  font-weight: 700;
  padding: 0.5rem 1.2rem;
  border-radius: 0.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.cinema-nav-btn:hover {
  background: var(--primary);
  color: #000;
}

.cinema-step-indicators {
  display: flex;
  gap: 0.5rem;
}

.cinema-step-indicators .dot {
  width: 12px;
  height: 12px;
  background: #334155;
  border-radius: 50%;
  transition: all 0.2s;
}

.cinema-step-indicators .dot.active {
  background: var(--accent-yellow);
  box-shadow: 0 0 10px var(--accent-yellow);
  transform: scale(1.2);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

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

.modal-content {
  background: var(--bg-card);
  border: 3px solid #000;
  box-shadow: 10px 10px 0px #000;
  border-radius: 1.25rem;
  max-width: 750px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-family: var(--font-comic);
  font-size: 1.5rem;
  color: var(--accent-yellow);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  cursor: pointer;
}

.modal-body {
  padding: 1.5rem;
}

.architecture-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.arch-card {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1rem;
}

.arch-icon {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.arch-card h4 {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 0.3rem;
}

.arch-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.challenge-footer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.85rem;
  color: var(--accent-cyan);
}

.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(0,0,0,0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

.hidden {
  display: none !important;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bounceSlow { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes wobble { 0%, 100% { transform: rotate(12deg); } 50% { transform: rotate(7deg) scale(1.05); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes eqBounce { 0%, 100% { transform: scaleY(0.4); } 50% { transform: scaleY(1.2); } }
