.game-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  background-color: var(--bg-app);
  color: var(--text-primary);
  padding: 20px 16px;
  box-sizing: border-box;
}

.game-container {
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  box-sizing: border-box;
}

.back-link-container {
  margin-bottom: 16px;
  text-align: left;
}

.back-link {
  font-size: var(--fs-sm);
  color: var(--text-muted-2);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.back-link:hover {
  color: var(--text-primary);
}

.game-card {
  width: 100%;
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-hairline);
  padding: 32px 28px;
  position: relative;
  box-sizing: border-box;
}

.game-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.status-badge, .points-badge {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-weight: 500;
  padding: 7px 12px;
  background: var(--surface-0);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  color: var(--text-faint);
}

.points-badge {
  color: var(--gold-text);
}

.game-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 10px 0;
  letter-spacing: -0.03em;
}

.instruction-text {
  font-size: var(--fs-sm);
  color: var(--text-muted-2);
  margin-bottom: 24px;
  line-height: 1.65;
}

.mock-device-frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.phone-status-bar {
  background: #f3f4f6;
  color: #1f2937;
  padding: 6px 16px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.sms-style {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.sms-header {
  background: #ffffff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.contact-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--fs-sm);
}

.sms-avatar {
  background: #f59e0b;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.sms-sender-info {
  display: flex;
  flex-direction: column;
}

.sms-sender-name {
  font-weight: 700;
  font-size: var(--fs-sm);
  color: #1f2937;
}

.sms-subtitle {
  font-size: 11px;
  color: #9ca3af;
}

.sms-body {
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.sms-bubble {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 12px 16px;
  max-width: 85%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
  position: relative;
}

.sms-text {
  margin: 0;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: #1f2937;
  white-space: pre-wrap;
  word-break: break-word;
}

.sms-time {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 6px;
  margin-left: 8px;
}

.call-style {
  background: #000000;
  border-color: #111111;
}

.call-style .phone-status-bar {
  background: #000000;
  color: #ffffff;
}

.call-interface {
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.call-avatar {
  background: #27272a;
  color: #ffffff;
  font-size: 24px;
  font-weight: 600;
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.05);
}

.caller-name {
  font-size: var(--fs-h2);
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px 0;
}

.caller-number {
  font-size: var(--fs-sm);
  color: #a1a1aa;
  margin: -2px 0 6px 0;
  letter-spacing: 0.5px;
}

.caller-status {
  font-size: 13px;
  color: #71717a;
  margin: 0 0 20px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.audio-wave {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  margin-bottom: 24px;
}

.audio-wave span {
  display: block;
  width: 3px;
  height: 100%;
  background: #a78bfa;
  border-radius: 2px;
  animation: bounce 0.8s infinite alternate;
}

.audio-wave span:nth-child(2) { animation-delay: 0.15s; height: 60%; }
.audio-wave span:nth-child(3) { animation-delay: 0.3s; height: 80%; }
.audio-wave span:nth-child(4) { animation-delay: 0.45s; height: 40%; }
.audio-wave span:nth-child(5) { animation-delay: 0.1s; height: 70%; }

.call-dialogue-box {
  background: #1c1c1f;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  border: 1px solid #2a2a2e;
  max-width: 90%;
  margin-top: 10px;
}

.call-dialogue-text {
  margin: 0;
  color: #e4e4e7;
  font-size: var(--fs-sm);
  line-height: 1.6;
  font-style: italic;
}

.email-style {
  background: #ffffff;
  border-color: #e5e7eb;
}

.email-window-header {
  background: #f3f4f6;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #e5e7eb;
}

.window-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.window-dot.red { background: #ff5f56; }
.window-dot.yellow { background: #ffbd2e; }
.window-dot.green { background: #27c93f; }

.window-title {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 600;
  margin-left: 8px;
}

.email-header {
  padding: 16px 20px;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #ffffff;
}

.email-meta {
  font-size: 13px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.email-label {
  font-weight: 600;
  color: #6b7280;
  width: 40px;
}

.email-sender {
  color: #1f2937;
  font-weight: 500;
  word-break: break-word;
  min-width: 0;
}

.email-recipient {
  color: #6b7280;
}

.email-body {
  padding: 24px 20px;
  background: #ffffff;
  min-height: 150px;
  text-align: left;
}

.email-text {
  margin: 0;
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: #374151;
  white-space: pre-wrap;
  word-break: break-word;
}

.action-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.game-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: var(--fs-body);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease),
              color var(--ease), filter var(--ease);
  box-sizing: border-box;
  text-decoration: none !important;
  outline: none;
  min-height: 50px;
  text-align: center;
}

.btn-primary {
  background: var(--grad-primary);
  color: var(--on-accent);
}

.btn-primary:hover { filter: brightness(0.92); }

.btn-outline {
  background: var(--surface-4);
  border-color: var(--border-control);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);

  color: var(--text-primary);
}

.btn-choice {
  background: var(--surface-4);
  border-color: var(--border-control);
  color: var(--text-primary);
}

.btn-choice:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

.feedback-module {
  margin-top: 24px;
  padding: 24px;
  border-radius: var(--radius-md);
  animation: slideUp 0.3s ease-out;
}

.feedback-module.pass {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
}

.feedback-module.fail {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
}

.feedback-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid currentColor;
}

.feedback-module.pass .status-icon { color: var(--success); }
.feedback-module.fail .status-icon { color: var(--danger-text); }

.status-title {
  font-size: 18px;
  font-weight: 700;
}

.feedback-module.pass .status-title { color: var(--success); }
.feedback-module.fail .status-title { color: var(--danger-text); }

.verdict-text {
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-primary);
  margin: 0 0 10px 0;
}

.explanation-text {
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 20px 0;
  max-width: 62ch;
}

.next-btn {
  width: auto;
  min-width: 150px;
  display: inline-flex;
  gap: 8px;
}

.results-card {
  text-align: center;
}

.results-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  background: var(--surface-accent-soft);
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.results-score-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 3px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px auto;
  box-shadow: var(--shadow-lg);
}

.score-circle-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.score-percentage {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
}

.score-label {
  font-size: 11px;
  color: var(--text-muted-2);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}

.stats-panel {
  background: var(--surface-0);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
  text-align: left;
}

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

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

.stat-label {
  font-size: var(--fs-xs);
  color: var(--text-muted-2);
}

.stat-value {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--fs-sm);
  color: var(--text-primary);
}

.highlight-green {
  color: var(--success);
}

.highlight-white {
  color: var(--text-primary);
}

.results-subtext {
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--text-muted-2);
  margin-bottom: 28px;
}

.cert-box {
  background: var(--surface-accent-soft);
  border: 1px solid var(--border-accent);
  padding: 20px;
  border-radius: var(--radius-md);
  margin-bottom: 28px;
  text-align: center;
}

.cert-title {
  font-weight: 700;
  font-size: var(--fs-body);
  color: var(--text-primary);
  margin: 0 0 6px 0;
}

.cert-desc {
  font-size: 13px;
  color: var(--text-muted-2);
  line-height: 1.5;
  margin: 0 0 16px 0;
}

.cert-btn {
  font-size: 13px;
  min-height: 44px;
  padding: 10px 16px;
  display: inline-flex;
}

.share-section {
  margin-bottom: 28px;
}

.share-prompt {
  font-size: var(--fs-sm);
  color: var(--text-muted-2);
  margin-bottom: 12px;
  font-weight: 600;
}

.share-buttons {
  display: flex;
  gap: 10px;
}

.share-btn {
  flex: 1;
  padding: 12px 6px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  background: var(--surface-4);
  border: 1px solid var(--border-control);
  color: var(--text-secondary);
  transition: background var(--ease), border-color var(--ease), color var(--ease);
  text-align: center;
}

.share-btn:hover {
  background: var(--surface-hover);
}

.btn-x:hover        { border-color: var(--border-hover); color: var(--text-primary); }
.btn-facebook:hover { border-color: #1877f2; color: #0866ff; }
.btn-whatsapp:hover { border-color: #25d366; color: var(--success); }

.restart-btn {
  margin-top: 10px;
}

@keyframes bounce {
  from { transform: scaleY(0.3); }
  to { transform: scaleY(1.1); }
}

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

@media (max-width: 480px) {
  .game-page {
    padding: 10px 8px;
  }

  .game-card {
    padding: 24px 16px;
  }

  .game-title {
    font-size: 1.5rem;
  }

  .sms-bubble {
    max-width: 95%;
  }

  .share-buttons {
    flex-direction: column;
  }

  .share-btn {
    width: 100%;
    padding: 12px;
  }
}

.incoming-call-controls {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  margin-top: 40px;
  padding-bottom: 20px;
  box-sizing: border-box;
}

.call-control-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.2s ease;
  user-select: none;

  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
}

.call-control-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 8px;
}

.call-control-btn:hover {
  transform: scale(1.05);
}

.call-control-btn:active {
  transform: scale(0.95);
}

.call-control-btn .btn-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.call-control-btn.answer .btn-circle {
  background-color: #22c55e;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.call-control-btn svg {
  width: 28px;
  height: 28px;
  fill: #ffffff;
}

.control-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted-2);
  letter-spacing: 0.2px;
}

.call-control-btn.answer .control-label {
  color: #86efac;
}

.search-style {
  background: #ffffff;
  border-color: #e5e7eb;
}

.search-style .phone-status-bar {
  background: #ffffff;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
}

.google-search-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #f3f4f6;
  background: #ffffff;
}

.google-logo-small {
  font-size: var(--fs-h2);
  font-weight: 900;
  color: #4285f4;
  flex-shrink: 0;
  font-family: 'Product Sans', Arial, sans-serif;
}

.google-input-mock {
  flex: 1;
  background: #f1f3f4;
  border-radius: 24px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #e8eaed;
}

.google-query-text {
  font-size: 13px;
  color: #202124;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.google-mic-icon {
  font-size: var(--fs-body);
  flex-shrink: 0;
  margin-left: 6px;
}

.google-tabs-bar {
  display: flex;
  gap: 0;
  padding: 0 8px;
  border-bottom: 1px solid #e8eaed;
  background: #ffffff;
}

.g-tab {
  font-size: 13px;
  color: #5f6368;
  padding: 10px 12px;
  cursor: default;
  font-weight: 500;
  border-bottom: 3px solid transparent;
}

.g-tab-active {
  color: #1a73e8;
  border-bottom-color: #1a73e8;
}

.search-results-list {
  background: #ffffff;
  padding: 8px 0;
}

.search-result-item {
  padding: 12px 16px;
}

.result-top-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.result-favicon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.sponsored-favicon {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  font-size: 9px;
  letter-spacing: 0.3px;
}

.organic-favicon {
  background: #f3f4f6;
  font-size: var(--fs-sm);
}

.result-url-block {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.result-domain {
  font-size: 13px;
  color: #202124;
  font-weight: 400;
}

.organic-domain {
  color: #1e8e3e;
}

.sponsored-label {
  font-size: 11px;
  color: #70757a;
  border: 1px solid #dadce0;
  padding: 1px 5px;
  border-radius: 3px;
}

.result-title {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 4px;
}

.sponsored-title {
  color: #1a0dab;
}

.organic-title {
  color: #1a0dab;
}

.result-snippet {
  font-size: 13px;
  color: #4d5156;
  line-height: 1.5;
}

.search-divider {
  height: 1px;
  background: #f1f3f4;
  margin: 4px 16px;
}

@media (min-width: 900px) {
  .game-container {
    max-width: var(--page-max);
  }

  .game-card {
    height: 634px;
    display: flex;
    flex-direction: column;
  }

  .game-title {
    margin-bottom: 16px;
  }

  .instruction-text {
    margin-top: 0;
  }

  .game-status-bar {
    position: absolute;
    top: 29px;
    right: 28px;
    gap: 8px;
    margin-bottom: 0;
  }

  .game-layout {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    grid-template-rows: minmax(0, 1fr);
    gap: 32px;
  }

  .game-layout .mock-device-frame {
    margin-bottom: 0;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
  }

  .screen-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
  }

  .call-interface {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .audio-wave {
    margin-bottom: 12px;
  }

  .email-body {
    padding-bottom: 16px;
  }

  .decision-pane .action-layout {
    margin-top: 0;
  }

  .decision-pane .feedback-module {
    margin-top: 0;
    max-height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
  }

  .decision-pane .explanation-text {
    min-height: 0;
    overflow-y: auto;
  }

  .decision-pane .next-btn {
    width: 100%;
    flex-shrink: 0;
  }

  .results-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "title title"
      "main  side"
      "main  actions";
    column-gap: 32px;
  }

  .results-badge {
    position: absolute;
    top: 35px;
    right: 28px;
    margin: 0;
  }

  .results-card .game-title {
    grid-area: title;
    margin-bottom: 24px;
    text-align: left;
  }

  .results-main {
    grid-area: main;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
  }

  .results-score-circle,
  .stats-panel,
  .results-subtext {
    margin: 0;
  }

  .stats-panel,
  .results-subtext {
    width: 100%;
    max-width: 440px;
    box-sizing: border-box;
  }

  .results-side {
    grid-area: side;
  }

  .results-side .cert-box {
    margin-bottom: 24px;
  }

  .results-side .share-section {
    margin-bottom: 0;
  }

  .results-card .action-layout {
    grid-area: actions;
  }

  .restart-btn {
    margin-top: 0;
  }
}
