/* ============================================================
   MARIO PORTFOLIO — Global Styles
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");

/* ---------- Reset & Root ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --mario-red: #e52521;
  --mario-blue: #049cd8;
  --mario-yellow: #fbd000;
  --mario-green: #43a047;
  --mario-brown: #6d2800;
  --mario-sky: #5c94fc;
  --mario-dark: #0a0a1a;
  --coin-gold: #f7b731;
  --pixel-font: "Press Start 2P", monospace;
  --panel-bg: rgba(0, 0, 16, 0.92);
  --panel-border: #fbd000;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--mario-dark);
  font-family: var(--pixel-font);
  color: #fff;
}

/* ============================================================
   LANDING SCREEN
   ============================================================ */
#landing-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--mario-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px 20px 56px;
  text-align: center;
  overflow: hidden;
}

/* Starfield */
#landing-screen .stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.star {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  animation: twinkle var(--dur, 2s) infinite alternate;
}
@keyframes twinkle {
  from {
    opacity: 0.2;
    transform: scale(1);
  }
  to {
    opacity: 1;
    transform: scale(1.4);
  }
}

/* Clouds in landing */
.landing-cloud {
  position: absolute;
  background: #fff;
  border-radius: 50px;
  opacity: 0.15;
  animation: cloudDrift var(--speed, 20s) linear infinite;
}
.landing-cloud::before,
.landing-cloud::after {
  content: "";
  position: absolute;
  background: #fff;
  border-radius: 50%;
}
@keyframes cloudDrift {
  from {
    transform: translateX(-200px);
  }
  to {
    transform: translateX(110vw);
  }
}

/* Avatar container */
#landing-greeting {
  position: relative;
  z-index: 1;
  font-size: clamp(20px, 4vw, 34px);
  color: #fff;
  letter-spacing: 2px;
  text-shadow:
    3px 3px 0 #000,
    -1px -1px 0 #000;
  margin-bottom: 2px;
}

#avatar-wrapper {
  position: relative;
  width: clamp(148px, 23vw, 196px);
  height: clamp(148px, 23vw, 196px);
  margin-bottom: 10px;
  flex: 0 0 auto;
  animation: avatarFloat 3s ease-in-out infinite;
}
@keyframes avatarFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-18px);
  }
}

#avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--mario-yellow);
  image-rendering: pixelated;
  box-shadow:
    0 0 30px rgba(251, 208, 0, 0.6),
    0 0 60px rgba(251, 208, 0, 0.3);
  display: none;
}

#avatar-pixel-canvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

/* Title text */
#landing-title {
  font-size: clamp(14px, 3vw, 22px);
  color: #fff;
  text-align: center;
  text-shadow:
    3px 3px 0 #000,
    -1px -1px 0 #000;
  letter-spacing: 2px;
  line-height: 1.6;
  max-width: 26ch;
  margin-bottom: 4px;
}

#landing-subtitle {
  font-size: clamp(10px, 2vw, 14px);
  color: var(--mario-yellow);
  text-align: center;
  text-shadow: 2px 2px 0 #000;
  max-width: min(52ch, calc(100vw - 32px));
  margin-bottom: 22px;
  letter-spacing: 2px;
  white-space: nowrap;
  animation: subtitlePulse 2s ease-in-out infinite;
}
@keyframes subtitlePulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* Come Play button */
#start-btn {
  font-family: var(--pixel-font);
  font-size: clamp(10px, 2vw, 14px);
  color: var(--mario-dark);
  background: var(--mario-yellow);
  border: none;
  padding: 16px 36px;
  cursor: pointer;
  letter-spacing: 2px;
  box-shadow:
    4px 4px 0 #8b6000,
    inset 0 -4px 0 rgba(0, 0, 0, 0.3);
  transition: all 0.08s;
  image-rendering: pixelated;
  position: relative;
  animation: btnGlow 2s ease-in-out infinite;
}
#start-btn:hover {
  background: #ffe040;
  transform: translateY(-2px);
  box-shadow:
    4px 6px 0 #8b6000,
    inset 0 -4px 0 rgba(0, 0, 0, 0.3);
}
#start-btn:active {
  transform: translateY(2px);
  box-shadow: 2px 2px 0 #8b6000;
}
@keyframes btnGlow {
  0%,
  100% {
    box-shadow:
      4px 4px 0 #8b6000,
      0 0 15px rgba(251, 208, 0, 0.4);
  }
  50% {
    box-shadow:
      4px 4px 0 #8b6000,
      0 0 35px rgba(251, 208, 0, 0.8);
  }
}

/* Pixel coins decoration around button */

#skip-btn {
  font-family: var(--pixel-font);
  font-size: clamp(8px, 1.5vw, 10px);
  color: #aaa;
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(255,255,255,0.2);
  padding: 10px 24px;
  cursor: pointer;
  letter-spacing: 2px;
  margin-top: 14px;
  transition: all 0.1s;
}
#skip-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-1px);
}

#start-btn,
#skip-btn {
  position: relative;
  z-index: 1;
}

.coin-deco {
  position: absolute;
  font-size: 20px;
  animation:
    coinSpin 0.5s steps(4) infinite,
    coinFloat 2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes coinSpin {
  to {
    filter: brightness(1.5);
  }
}
@keyframes coinFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Screen transition */
.fade-out {
  animation: fadeOut 0.8s forwards !important;
}
@keyframes fadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(1.05);
    pointer-events: none;
  }
}

/* ============================================================
   GAME SCREEN
   ============================================================ */
#game-screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
}

#game-canvas {
  display: block;
  width: 100vw;
  height: 100vh;
  image-rendering: pixelated;
  cursor: none;
}

/* HUD */
#hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: none;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 20px;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.7) 0%,
    transparent 100%
  );
}

.hud-panel {
  font-family: var(--pixel-font);
  font-size: 10px;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
  line-height: 2;
}

.hud-panel span {
  color: var(--mario-yellow);
}

/* Mobile controls */
#mobile-controls {
  position: fixed;
  bottom: 20px;
  left: 0;
  right: 0;
  z-index: 20;
  display: none;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 20px;
  pointer-events: none;
}

.dpad {
  display: grid;
  grid-template-columns: repeat(3, 50px);
  grid-template-rows: repeat(2, 50px);
  gap: 4px;
  pointer-events: all;
}

.ctrl-btn {
  font-family: var(--pixel-font);
  font-size: 14px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 3px solid rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.1s;
  width: 50px;
  height: 50px;
}
.ctrl-btn:active,
.ctrl-btn.pressed {
  background: rgba(255, 255, 255, 0.3);
}

.ctrl-btn.left {
  grid-column: 1;
  grid-row: 2;
}
.ctrl-btn.right {
  grid-column: 3;
  grid-row: 2;
}
.ctrl-btn.jump {
  width: 70px;
  height: 70px;
  font-size: 18px;
  border-color: var(--mario-yellow);
  color: var(--mario-yellow);
  border-radius: 50%;
  pointer-events: all;
}

/* ============================================================
   PROJECT MODAL
   ============================================================ */
#modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#modal-overlay.active {
  display: flex;
}

#project-modal {
  font-family: var(--pixel-font);
  background: var(--panel-bg);
  border: 6px solid var(--mario-yellow);
  box-shadow:
    8px 8px 0 #000,
    inset 0 0 0 2px rgba(255, 255, 255, 0.1);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
  position: relative;
  animation: modalPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalPop {
  from {
    transform: scale(0.5) translateY(40px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Scrollbar styling */
#project-modal::-webkit-scrollbar {
  width: 8px;
}
#project-modal::-webkit-scrollbar-track {
  background: #111;
}
#project-modal::-webkit-scrollbar-thumb {
  background: var(--mario-yellow);
  border-radius: 4px;
}

.modal-header {
  background: var(--mario-red);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 4px solid var(--mario-yellow);
}
.modal-header.video-header {
  background: var(--mario-blue);
}

.modal-type-badge {
  font-size: 8px;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 8px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  letter-spacing: 1px;
}

.modal-title-text {
  font-size: clamp(9px, 2vw, 14px);
  text-shadow: 2px 2px 0 #000;
  flex: 1;
}

#modal-close {
  font-family: var(--pixel-font);
  font-size: 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid #fff;
  padding: 6px 10px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.1s;
  white-space: nowrap;
}
#modal-close:hover {
  background: #fff;
  color: #000;
}

.modal-body {
  padding: 20px;
}

.modal-subtitle {
  font-size: 9px;
  color: var(--mario-yellow);
  margin-bottom: 14px;
  letter-spacing: 1px;
}

.modal-description {
  font-size: 9px;
  color: #ccc;
  line-height: 2.2;
  margin-bottom: 20px;
}

.modal-section-label {
  font-size: 8px;
  color: var(--mario-yellow);
  margin-bottom: 10px;
  letter-spacing: 2px;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tech-tag {
  font-family: var(--pixel-font);
  font-size: 7px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 6px 10px;
  letter-spacing: 1px;
}

.modal-meta {
  font-size: 8px;
  color: #888;
  margin-bottom: 20px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.modal-meta span {
  color: #aaa;
}

.modal-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.modal-link-btn {
  font-family: var(--pixel-font);
  font-size: 8px;
  color: #000;
  background: var(--mario-yellow);
  border: none;
  padding: 10px 18px;
  cursor: pointer;
  letter-spacing: 1px;
  box-shadow: 3px 3px 0 #8b6000;
  transition: all 0.08s;
  text-decoration: none;
  display: inline-block;
}
.modal-link-btn:hover {
  background: #ffe040;
  transform: translateY(-2px);
}
.modal-link-btn:active {
  transform: translateY(1px);
  box-shadow: 1px 1px 0 #8b6000;
}
.modal-link-btn.secondary {
  background: #333;
  color: #fff;
  box-shadow: 3px 3px 0 #000;
}
.modal-link-btn.secondary:hover {
  background: #555;
}

.modal-highlight {
  display: inline-block;
  font-size: 8px;
  background: var(--mario-green);
  color: #fff;
  padding: 4px 10px;
  margin-bottom: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  letter-spacing: 1px;
}
.modal-highlight.video-hl {
  background: var(--mario-blue);
}

/* Continue hint */
.modal-continue {
  text-align: center;
  font-size: 8px;
  color: #666;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 2px solid #222;
  animation: blinkText 1s step-end infinite;
}
@keyframes blinkText {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* ============================================================
   RESUME MODAL
   ============================================================ */
#resume-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#resume-overlay.active {
  display: flex;
}

#resume-modal {
  font-family: var(--pixel-font);
  background: var(--panel-bg);
  border: 6px solid var(--mario-yellow);
  box-shadow:
    8px 8px 0 #000,
    inset 0 0 0 2px rgba(255, 255, 255, 0.1);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
  position: relative;
  animation: modalPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.resume-header {
  background: #2c3e50;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 4px solid var(--mario-yellow);
}

.resume-badge {
  font-size: 8px;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 8px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  letter-spacing: 1px;
  color: #fff;
}

.resume-name {
  font-size: clamp(10px, 2.5vw, 16px);
  text-shadow: 2px 2px 0 #000;
  flex: 1;
  color: var(--mario-yellow);
}

#resume-close {
  font-family: var(--pixel-font);
  font-size: 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid #fff;
  padding: 6px 10px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.1s;
  white-space: nowrap;
}
#resume-close:hover {
  background: #fff;
  color: #000;
}

.resume-body {
  padding: 20px;
}

.resume-contact {
  font-size: 8px;
  color: #aaa;
  letter-spacing: 1px;
  margin-bottom: 16px;
  text-align: center;
}

.resume-headline {
  font-size: 11px;
  color: var(--mario-yellow);
  text-shadow: 2px 2px 0 #000;
  text-align: center;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.resume-summary {
  font-size: 8px;
  color: #ccc;
  line-height: 2.2;
  margin-bottom: 24px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-left: 4px solid var(--mario-yellow);
}

.resume-section-title {
  font-size: 10px;
  color: var(--mario-yellow);
  letter-spacing: 3px;
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid rgba(251, 208, 0, 0.3);
}

.resume-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.resume-skill-tag {
  font-family: var(--pixel-font);
  font-size: 7px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 6px 10px;
  letter-spacing: 1px;
}

.resume-job {
  margin-bottom: 22px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(255, 255, 255, 0.08);
}

.resume-job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}

.resume-job-role {
  font-size: 9px;
  color: #fff;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.resume-job-company {
  font-size: 8px;
  color: var(--mario-yellow);
  letter-spacing: 1px;
}

.resume-job-dates {
  font-size: 7px;
  color: #888;
  letter-spacing: 1px;
}

.resume-job-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
}

.resume-job-bullets li {
  font-size: 8px;
  color: #bbb;
  line-height: 2.2;
  padding-left: 14px;
  position: relative;
}

.resume-job-bullets li::before {
  content: "▸";
  color: var(--mario-yellow);
  position: absolute;
  left: 0;
}

.resume-edu {
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.resume-edu-school {
  font-size: 9px;
  color: #fff;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.resume-edu-degree {
  font-size: 8px;
  color: #aaa;
}

.resume-edu-year {
  font-size: 8px;
  color: var(--mario-yellow);
  letter-spacing: 1px;
}

/* ============================================================
   END SCREEN
   ============================================================ */
#end-screen {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: radial-gradient(ellipse at center, #0d0d2b 0%, #000 100%);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  overflow: hidden;
}
#end-screen.active {
  display: flex;
}

.end-scroll-wrapper {
  width: 100%;
  max-width: 900px;
  overflow-y: auto;
  padding: 40px 20px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.end-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#end-title {
  font-size: clamp(18px, 5vw, 36px);
  color: var(--mario-yellow);
  text-shadow:
    4px 4px 0 #000,
    0 0 30px rgba(251, 208, 0, 0.8);
  text-align: center;
  letter-spacing: 4px;
  margin-bottom: 8px;
  animation: titleShake 0.5s ease-out;
}
@keyframes titleShake {
  0% {
    transform: scale(0.5) rotate(-3deg);
  }
  50% {
    transform: scale(1.1) rotate(1deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}

#end-subtitle {
  font-size: clamp(9px, 2vw, 12px);
  color: #fff;
  text-shadow: 2px 2px 0 #000;
  margin-bottom: 10px;
  letter-spacing: 2px;
}

#end-score {
  font-size: 11px;
  color: var(--mario-yellow);
  margin-bottom: 40px;
  letter-spacing: 2px;
}

.end-links-label {
  font-size: 9px;
  color: #888;
  letter-spacing: 3px;
  margin-bottom: 20px;
}

.end-section-label {
  font-size: 10px;
  color: var(--mario-yellow);
  letter-spacing: 3px;
  margin: 30px 0 18px;
  text-shadow: 2px 2px 0 #000;
}

.end-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  width: 100%;
  margin-bottom: 10px;
}

.end-project-card {
  font-family: var(--pixel-font);
  background: rgba(255,255,255,0.05);
  border: 3px solid rgba(255,255,255,0.12);
  padding: 16px;
  cursor: pointer;
  transition: all 0.15s;
  animation: socialAppear 0.4s var(--delay, 0s) both;
  position: relative;
}
.end-project-card:hover {
  border-color: var(--mario-yellow);
  background: rgba(251,208,0,0.08);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
.end-project-card.video-card {
  border-color: rgba(4,156,216,0.3);
}
.end-project-card.video-card:hover {
  border-color: var(--mario-blue);
  background: rgba(4,156,216,0.08);
}

.end-card-type {
  font-size: 7px;
  color: #888;
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.end-card-title {
  font-size: 10px;
  color: var(--mario-yellow);
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.video-card .end-card-title {
  color: var(--mario-blue);
}

.end-card-subtitle {
  font-size: 8px;
  color: #aaa;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.end-card-desc {
  font-size: 7px;
  color: #888;
  line-height: 2;
  margin-bottom: 12px;
}

.end-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 12px;
}

.end-card-tag {
  font-family: var(--pixel-font);
  font-size: 6px;
  color: #ccc;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 3px 6px;
  letter-spacing: 1px;
}

.end-card-links {
  display: flex;
  gap: 8px;
}

.end-card-link {
  font-family: var(--pixel-font);
  font-size: 7px;
  color: var(--mario-yellow);
  text-decoration: none;
  letter-spacing: 1px;
  padding: 4px 8px;
  border: 2px solid var(--mario-yellow);
  transition: all 0.1s;
}
.end-card-link:hover {
  background: var(--mario-yellow);
  color: #000;
}
.video-card .end-card-link {
  color: var(--mario-blue);
  border-color: var(--mario-blue);
}
.video-card .end-card-link:hover {
  background: var(--mario-blue);
  color: #fff;
}

.social-links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 32px;
}

.social-btn {
  font-family: var(--pixel-font);
  font-size: 9px;
  background: var(--mario-dark);
  color: var(--mario-yellow);
  border: 4px solid var(--mario-yellow);
  padding: 16px 22px;
  cursor: pointer;
  letter-spacing: 1px;
  box-shadow: 5px 5px 0 #000;
  transition: all 0.1s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 120px;
  text-align: center;
  animation: socialAppear 0.4s var(--delay, 0s) both;
}
.social-btn .social-icon {
  font-size: 22px;
}
.social-btn:hover {
  background: var(--mario-yellow);
  color: #000;
  transform: translateY(-4px);
  box-shadow: 5px 9px 0 #000;
}
.social-btn:active {
  transform: translateY(1px);
  box-shadow: 3px 4px 0 #000;
}
@keyframes socialAppear {
  from {
    transform: translateY(40px) scale(0.8);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

#play-again-btn {
  font-family: var(--pixel-font);
  font-size: 10px;
  background: var(--mario-red);
  color: #fff;
  border: none;
  padding: 14px 28px;
  cursor: pointer;
  letter-spacing: 2px;
  box-shadow: 4px 4px 0 #8b0000;
  transition: all 0.1s;
  margin-top: 10px;
}
#play-again-btn:hover {
  background: #ff4444;
  transform: translateY(-2px);
}

/* ============================================================
   PAUSE / CONTROLS HINT
   ============================================================ */
#controls-hint {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  font-size: 7px;
  color: rgba(255, 255, 255, 0.5);
  text-shadow: 1px 1px 0 #000;
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
  display: none;
}

/* ============================================================
   PIXEL TRANSITION OVERLAY
   ============================================================ */
#pixel-transition {
  position: fixed;
  inset: 0;
  z-index: 500;
  pointer-events: none;
  display: grid;
  grid-template-columns: repeat(10, 10%);
  grid-template-rows: repeat(10, 10%);
}
.pixel-cell {
  background: #000;
  opacity: 0;
  transition: opacity var(--t, 0.3s) var(--d, 0s);
}
.pixel-cell.on {
  opacity: 1;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  #landing-screen {
    gap: 10px;
    padding: 24px 16px 44px;
  }
  #landing-greeting {
    font-size: clamp(18px, 8vw, 28px);
  }
  #avatar-wrapper {
    width: 140px;
    height: 140px;
    margin-bottom: 4px;
  }
  #landing-title {
    line-height: 1.45;
  }
  #landing-subtitle {
    max-width: min(46ch, calc(100vw - 24px));
    white-space: normal;
    margin-bottom: 18px;
  }
  #mobile-controls {
    display: flex;
  }
  #controls-hint {
    display: none !important;
  }
}

@media (min-width: 601px) {
  #mobile-controls {
    display: none !important;
  }
}

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   SCROLLBAR (global)
   ============================================================ */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #111;
}
::-webkit-scrollbar-thumb {
  background: var(--mario-yellow);
}
