/* BS-600 — Microsoft Certified: Power Platform Shitposter
   Design language: Microsoft-ish, but slightly off-brand. That's the joke. */

:root {
  --ms-blue: #0067b8;
  --ms-dark: #1a1a2e;
  --ms-light: #f5f5f7;
  --ms-accent: #e74c3c;
  --ms-green: #0b7a3e;
  --ms-gold: #d4a017;
  --ms-gray: #5c6370;
  --ms-border: #d2d2d7;
  --font-sans: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --max-width: 800px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--ms-light);
  color: var(--ms-dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header / Nav bar — very Microsoftian */
header {
  background: var(--ms-dark);
  color: #fff;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
}

header .logo {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: #fff;
}

header .logo span {
  color: var(--ms-accent);
}

header nav a {
  color: #ccc;
  text-decoration: none;
  margin-left: 1.5rem;
  transition: color 0.2s;
}

header nav a:hover {
  color: #fff;
}

/* Main content wrapper */
main {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Hero section — landing page */
.hero {
  text-align: center;
  padding: 3rem 0 2rem;
}

.hero .badge-img {
  width: 100%;
  max-width: var(--max-width);
  height: auto;
  object-fit: contain;
  margin-bottom: 1.5rem;
  padding: 0 1.5rem;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
}

.hero h1 .code {
  color: var(--ms-accent);
}

.hero .subtitle {
  font-size: 1.15rem;
  color: var(--ms-gray);
  max-width: 560px;
  margin: 0 auto 2rem;
}

/* Shared button style */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}

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

.btn-primary {
  background: var(--ms-blue);
  color: #fff;
}

.btn-primary:hover {
  background: #005a9e;
}

.btn-accent {
  background: var(--ms-accent);
  color: #fff;
}

.btn-accent:hover {
  background: #c0392b;
}

.btn-linkedin {
  background: #0a66c2;
  color: #fff;
}

.btn-linkedin:hover {
  background: #004182;
}

.btn-green {
  background: var(--ms-green);
  color: #fff;
}

.btn-green:hover {
  background: #096330;
}

/* About / info blocks */
.info-section {
  margin: 2rem 0;
}

.info-section h2 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.info-section p {
  margin-bottom: 1rem;
  color: #333;
}

.info-section blockquote {
  border-left: 4px solid var(--ms-blue);
  padding: 0.75rem 1.25rem;
  margin: 1rem 0;
  background: #fff;
  border-radius: 0 4px 4px 0;
  font-style: italic;
  color: var(--ms-gray);
}

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.card {
  background: #fff;
  border: 1px solid var(--ms-border);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
}

.card .emoji {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.card h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.card p {
  font-size: 0.9rem;
  color: var(--ms-gray);
}

/* Quiz page */
.quiz-header {
  text-align: center;
  margin-bottom: 2rem;
}

.quiz-header h1 {
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
}

.quiz-header p {
  color: var(--ms-gray);
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--ms-border);
  border-radius: 3px;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.progress-bar .fill {
  height: 100%;
  background: var(--ms-blue);
  border-radius: 3px;
  transition: width 0.4s ease;
  width: 0%;
}

.progress-label {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ms-gray);
  margin-bottom: 0.25rem;
}

.status-message {
  text-align: center;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--ms-blue);
  margin-bottom: 1.5rem;
  min-height: 1.4em;
}

.status-fade {
  animation: fadeInUp 0.4s ease both;
}

.question-card {
  background: #fff;
  border: 1px solid var(--ms-border);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.question-card .q-number {
  display: inline-block;
  background: var(--ms-blue);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  margin-bottom: 0.75rem;
}

.question-card h2 {
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
  line-height: 1.45;
}

.question-card .options {
  list-style: none;
}

.question-card .options li {
  margin-bottom: 0.6rem;
}

.question-card .options label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--ms-border);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-size: 0.95rem;
  line-height: 1.4;
}

.question-card .options label:hover {
  border-color: var(--ms-blue);
  background: #f0f7ff;
}

.question-card .options input[type="radio"] {
  margin-top: 0.2rem;
  accent-color: var(--ms-blue);
  flex-shrink: 0;
}

.question-card .options input[type="radio"]:checked + span {
  font-weight: 600;
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

.quiz-nav .counter {
  color: var(--ms-gray);
  font-size: 0.9rem;
}

.btn-back {
  background: transparent;
  color: var(--ms-blue);
  border: 2px solid var(--ms-blue);
}

.btn-back:hover:not(:disabled) {
  background: var(--ms-blue);
  color: #fff;
}

.btn-back:disabled,
.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Question slide animations */
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

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

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

.slide-in-right {
  animation: slideInRight 0.35s ease both;
}

.slide-in-left {
  animation: slideInLeft 0.35s ease both;
}

/* Option selection pop */
.question-card .options label:has(input:checked) {
  border-color: var(--ms-blue);
  background: #f0f7ff;
  animation: optionPop 0.2s ease;
}

@keyframes optionPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.015); }
  100% { transform: scale(1); }
}

/* Results page */
.results-hero {
  text-align: center;
  padding: 2rem 0;
}

.results-hero .tier-emoji {
  font-size: 4rem;
  margin-bottom: 0.5rem;
}

.results-hero h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.results-hero .score-line {
  font-size: 1.2rem;
  color: var(--ms-gray);
  margin-bottom: 0.5rem;
}

.results-hero .tier-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.tier-apprentice .tier-title { color: var(--ms-accent); }
.tier-certified .tier-title { color: var(--ms-blue); }
.tier-elite .tier-title { color: var(--ms-gold); }

.cert-section {
  text-align: center;
  margin: 2rem 0;
}

.cert-section h2 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.cert-section p {
  color: var(--ms-gray);
  margin-bottom: 1rem;
}

.cert-section .name-input {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.cert-section .name-input input {
  padding: 0.7rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--ms-border);
  border-radius: 4px;
  font-family: var(--font-sans);
  width: 280px;
  max-width: 100%;
}

.cert-section .name-input input:focus {
  outline: none;
  border-color: var(--ms-blue);
}

.cert-canvas-wrap {
  margin: 1.5rem auto;
  max-width: 100%;
  overflow-x: auto;
}

.cert-canvas-wrap canvas {
  border: 1px solid var(--ms-border);
  border-radius: 4px;
  max-width: 100%;
  height: auto;
}

.cert-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8rem;
  color: var(--ms-gray);
  border-top: 1px solid var(--ms-border);
  margin-top: auto;
}

footer a {
  color: var(--ms-blue);
  text-decoration: none;
}

/* Disclaimer */
.disclaimer {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #6d4c00;
}

/* Responsive */
@media (max-width: 600px) {
  .hero h1 { font-size: 1.6rem; }
  .hero .badge-img { width: calc(100% + 2rem); max-width: none; margin-left: -1rem; margin-right: -1rem; padding: 0; }
  .question-card { padding: 1.25rem; }
  .results-hero h1 { font-size: 1.5rem; }
  main { padding: 1.5rem 1rem; }
}
