/* ============================================
   AI JOB THREAT BINGO - NEO-BRUTALISM DESIGN
   ============================================ */

/* === CSS VARIABLES === */
:root {
  /* Colors - Neo-Brutalism Dark Theme */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --text-primary: #f0f0f5;
  --text-secondary: #8888aa;
  --accent: #39FF14;              /* Neon Green */
  --accent-glow: rgba(57, 255, 20, 0.2);
  --secondary: #FFD700;           /* Amber */
  --secondary-glow: rgba(255, 215, 0, 0.25);
  --danger: #ff1744;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(57, 255, 20, 0.3);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Typography */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* === RESET & BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  position: relative;
  overflow-y: auto;

  /* Gradient Mesh Background */
  background-image:
    radial-gradient(ellipse at 20% 30%, rgba(57, 255, 20, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(255, 215, 0, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(255, 23, 68, 0.04) 0%, transparent 50%);
}

/* === NOISE TEXTURE OVERLAY === */
.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

/* === CONTAINER === */
.container {
  max-width: 500px;
  margin: 0 auto;
  padding: var(--space-lg);
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === SCREENS === */
.screen {
  display: none;
  animation: fadeIn 0.5s var(--ease-out-expo);
}

.screen.active {
  display: block;
}

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

/* === BACK BUTTON === */
.back-btn {
  background: var(--bg-card);
  border: 2px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s var(--ease-out-expo);
  margin-bottom: var(--space-lg);
  backdrop-filter: blur(12px);
}

.back-btn:hover {
  border-color: var(--border-hover);
  transform: translateX(-4px);
}

/* === HEADER & TYPOGRAPHY === */
.header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  text-transform: uppercase;
}

.title-accent {
  color: var(--accent);
  text-shadow: 0 0 30px var(--accent-glow);
}

.subtitle {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.title-secondary {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

/* === INDUSTRY GRID === */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.industry-card {
  background: var(--bg-card);
  border: 3px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  backdrop-filter: blur(12px);
  min-height: 110px;
  position: relative;
}

.industry-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(57, 255, 20, 0.15);
}

.industry-card:active {
  transform: translateY(-2px) scale(0.98);
}

.industry-card.selected {
  border-color: var(--accent);
  background: rgba(57, 255, 20, 0.08);
  box-shadow: 0 0 40px var(--accent-glow);
}

.industry-icon {
  font-size: 36px;
}

.industry-name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* === ROLE GRID === */
.role-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.role-card {
  background: var(--bg-card);
  border: 3px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  backdrop-filter: blur(12px);
  text-align: left;
}

.role-card:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
  box-shadow: 0 4px 24px rgba(57, 255, 20, 0.12);
}

.role-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.role-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

/* === BINGO CARD === */
.bingo-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.job-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-sm);
}

.bingo-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
}

.bingo-card {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: var(--space-xl);
  max-width: 100%;
}

.bingo-cell {
  aspect-ratio: 1;
  background: var(--bg-card);
  border: 3px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s var(--ease-out-expo);
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.bingo-cell:hover {
  border-color: var(--border-hover);
  transform: scale(1.05);
}

.bingo-cell.free {
  background: rgba(57, 255, 20, 0.12);
  border-color: var(--accent);
  font-weight: 700;
  color: var(--accent);
  cursor: default;
}

.bingo-cell.marked {
  background: rgba(255, 215, 0, 0.15);
  border-color: var(--secondary);
  animation: stampIn 0.4s var(--ease-out-expo);
}

.bingo-cell.marked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  font-weight: 800;
  color: var(--secondary);
  text-shadow: 0 0 20px var(--secondary-glow);
  animation: checkIn 0.3s var(--ease-out-expo) 0.1s backwards;
}

@keyframes stampIn {
  0% { transform: scale(1.3) rotate(10deg); }
  50% { transform: scale(0.9) rotate(-5deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes checkIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* === BUTTONS === */
.check-bingo-btn {
  width: 100%;
  background: var(--accent);
  color: #000;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  text-transform: uppercase;
  padding: 18px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s var(--ease-out-expo);
  box-shadow: 0 4px 20px var(--accent-glow);
  position: relative;
  overflow: hidden;
}

.check-bingo-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
}

.check-bingo-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.check-bingo-btn:active {
  transform: translateY(-1px) scale(0.98);
}

/* === RESULTS === */
.results-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
  padding: var(--space-xl) 0;
}

.threat-gauge {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gauge-svg {
  position: absolute;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 12;
}

.gauge-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 565;
  stroke-dashoffset: 565;
  transition: stroke-dashoffset 1.5s var(--ease-out-expo),
              stroke 0.5s ease;
  filter: drop-shadow(0 0 12px var(--accent-glow));
}

.gauge-content {
  position: relative;
  text-align: center;
  z-index: 2;
}

.threat-percentage {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 56px;
  color: var(--accent);
  line-height: 1;
  text-shadow: 0 0 30px var(--accent-glow);
  animation: countUp 1s var(--ease-out-expo);
}

.threat-label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: var(--space-xs);
}

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

.threat-status {
  text-align: center;
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 3px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  width: 100%;
}

.status-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.status-message {
  font-size: 16px;
  color: var(--text-secondary);
}

.bingo-stats {
  width: 100%;
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 3px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-label {
  font-weight: 500;
  color: var(--text-secondary);
}

.stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--accent);
}

.ai-fact {
  width: 100%;
  padding: var(--space-lg);
  background: rgba(57, 255, 20, 0.05);
  border: 3px solid rgba(57, 255, 20, 0.2);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
}

.ai-fact h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.ai-fact p {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
}

.action-buttons {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.btn-primary,
.btn-secondary,
.btn-premium {
  width: 100%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  padding: 16px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s var(--ease-out-expo);
  position: relative;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-card);
  border: 3px solid var(--border);
  color: var(--text-primary);
  backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.btn-premium {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

.btn-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255, 215, 0, 0.4);
}

.stars-badge {
  background: rgba(0, 0, 0, 0.2);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

/* === BINGO OVERLAY === */
.bingo-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: overlayIn 0.3s var(--ease-out-expo);
}

.bingo-overlay.active {
  display: flex;
}

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

.bingo-content {
  text-align: center;
  animation: bingoPopIn 0.5s var(--ease-out-expo);
}

@keyframes bingoPopIn {
  0% { opacity: 0; transform: scale(0.5) rotate(-10deg); }
  50% { transform: scale(1.1) rotate(5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.bingo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 72px;
  color: var(--accent);
  text-transform: uppercase;
  text-shadow: 0 0 50px var(--accent-glow);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.bingo-message {
  font-family: var(--font-body);
  font-size: 20px;
  color: var(--text-primary);
}

/* === CONFETTI CANVAS === */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}

/* === STAGGERED ANIMATIONS === */
.animate-in {
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.6s var(--ease-out-expo) forwards;
}

.animate-in[data-delay="1"] { animation-delay: 0.1s; }
.animate-in[data-delay="2"] { animation-delay: 0.15s; }
.animate-in[data-delay="3"] { animation-delay: 0.2s; }
.animate-in[data-delay="4"] { animation-delay: 0.25s; }
.animate-in[data-delay="5"] { animation-delay: 0.3s; }
.animate-in[data-delay="6"] { animation-delay: 0.35s; }
.animate-in[data-delay="7"] { animation-delay: 0.4s; }
.animate-in[data-delay="8"] { animation-delay: 0.45s; }
.animate-in[data-delay="9"] { animation-delay: 0.5s; }

@keyframes slideUp {
  to { opacity: 1; transform: translateY(0); }
}

/* === RESPONSIVE === */
@media (max-width: 375px) {
  .title { font-size: 42px; }
  .bingo-cell { font-size: 9px; padding: 6px; }
  .threat-percentage { font-size: 48px; }
}

@media (min-width: 500px) {
  .container {
    padding: var(--space-xl);
  }
}
