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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: #fff;
  color: #1A202C;
  overflow: hidden;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  font-size: 1rem;
  line-height: 1.5;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100vw;
  position: fixed;
  top: 0;
  left: 0;
}

.mentoria-logo-top-left {
  background-image: url('/logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 60px;
  height: 18px;
  margin: 0 auto 0.375rem;
  position: relative;
  z-index: 10;
}

@media (max-width: 768px) {
  .mentoria-logo-top-left {
    width: 100px;
    height: 30px;
    margin: 0 auto 0;
  }
}

.mentoria-logo-top-center {
  background-image: url('/logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 180px;
  height: 54px;
  margin: 0.75rem auto 1.25rem;
  position: relative;
  z-index: 10;
}

@media (max-width: 480px) {
  .mentoria-logo-top-center {
    width: 160px;
    height: 48px;
    margin: 0.5rem auto 1rem;
  }
}

@media (min-width: 480px) {
  .mentoria-logo-top-left {
    width: 80px;
    height: 24px;
    margin-bottom: 0.875rem;
  }
  
  .mentoria-logo-top-center {
    width: 280px;
    height: 84px;
    margin: 1.5rem auto 2rem;
  }
}

@media (min-width: 768px) {
  .mentoria-logo-top-left {
    width: 100px;
    height: 28px;
    margin-bottom: 1.25rem;
  }
  
  .mentoria-logo-top-center {
    width: 350px;
    height: 105px;
    margin: 2rem auto 2.5rem;
  }
}

@media (min-width: 1024px) {
  .mentoria-logo-top-left {
    width: 110px;
    height: 32px;
    margin-bottom: 0.75rem;
  }
  
  .mentoria-logo-top-center {
    width: 280px;
    height: 84px;
    margin: 1.25rem auto 1.5rem;
  }
}

@media (min-width: 1280px) {
  .mentoria-logo-top-left {
    width: 150px;
    height: 42px;
    margin-bottom: 2rem;
  }
  
  .mentoria-logo-top-center {
    width: 500px;
    height: 150px;
    margin: 3.5rem auto 4rem;
  }
}

.mentoria-logo-game {
  background-image: url('/logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  position: fixed;
  top: 1rem;
  left: 1rem;
  max-width: 80px;
  width: 25%;
  height: 35px;
  z-index: 100;
}

.screen {
  display: none;
  width: 100%;
  height: 100vh;
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.screen.active {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

@media (max-width: 768px) {
  .screen.active {
    justify-content: center;
    align-items: center;
  }
}

/* Card Container */
.card-container {
  position: relative;
  width: 90vw;
  max-width: 900px;
  height: 85vh;
  max-height: 750px;
  background: #fff;
  border-radius: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  display: flex;
  overflow: hidden;
}

@media (max-width: 768px) {
  .card-container {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
  
  @supports not (height: 100dvh) {
    .card-container {
      height: 100vh;
      max-height: 100vh;
    }
  }
}

@media (max-width: 480px) {
  .card-container {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  
  @supports not (height: 100dvh) {
    .card-container {
      height: 100vh;
      max-height: 100vh;
    }
  }
}

@media (max-width: 375px) {
  .card-container {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  
  @supports not (height: 100dvh) {
    .card-container {
      height: 100vh;
      max-height: 100vh;
    }
  }
}

/* Intro Screen (Screen A) */
#intro-screen {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

@media (max-width: 768px) {
  #intro-screen {
    justify-content: center;
    align-items: center;
  }
}

/* LEGO Bracket Frame Container */
.lego-bracket-container {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  padding: 0;
}

.lego-bracket-frame {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
}

/* LEGO Block Styles */
.lego-blocks-left,
.lego-blocks-right {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
}

.lego-blocks-left {
  align-items: flex-start;
}

.lego-blocks-right {
  align-items: flex-end;
}


.lego-block {
  position: relative;
  box-sizing: border-box;
}

.lego-stud {
  position: absolute;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  box-shadow: inset 0px 1px 1px rgba(255, 255, 255, 0.4),
              inset 0px -1px 2px rgba(0, 0, 0, 0.3);
}

/* Stud positions for desktop and tablet - centered for 30px blocks with 15px studs */
/* Using mobile configuration: 2 studs for 1x1/1x2, 3 studs for 1x3/1x4 */
/* Horizontal: (30-15)/2 = 7.5px */
.lego-stud[style*="left: 12px"] { left: 7.5px !important; }

/* Vertical positions for each block type:
   1x1 (50px): 2 studs at 12px, 28px (top, bottom with margins)
   1x2 (65px): 2 studs at 16px, 39px  
   1x3 (80px): 3 studs at 13px, 32.5px, 52px
   1x4 (95px): 3 studs at 16px, 40px, 64px */
.lego-stud[style*="top: 8px"] { top: 12px !important; }      /* 1x1 first */
.lego-stud[style*="top: 15px"] { top: 16px !important; }     /* 1x2 first, 1x3 first */  
.lego-stud[style*="top: 20px"] { top: 16px !important; }     /* 1x4 first */
.lego-stud[style*="top: 35px"] { top: 28px !important; }     /* 1x1 second */
.lego-stud[style*="top: 50px"] { top: 39px !important; }     /* 1x2 second, 1x3 middle */
.lego-stud[style*="top: 60px"] { top: 40px !important; }     /* 1x4 middle */
.lego-stud[style*="top: 80px"] { top: 52px !important; }     /* 1x3 third */
.lego-stud[style*="top: 95px"] { top: 64px !important; }     /* 1x4 third */

/* Mobile responsive stud sizes and positions - no changes needed for tablet */
@media (max-width: 768px) {
  /* Stud sizes already match, positions already set above */
}

@media (max-width: 480px) {
  .lego-stud {
    width: 12px;
    height: 12px;
    box-shadow: inset 0px 1px 1px rgba(255, 255, 255, 0.4),
                inset 0px -1px 1px rgba(0, 0, 0, 0.3);
  }

  /* Scale stud positions for mobile */
  .lego-stud[style*="top: 8px"] { top: 4px !important; }
  .lego-stud[style*="top: 15px"] { top: 8px !important; }
  .lego-stud[style*="top: 20px"] { top: 10px !important; }
  .lego-stud[style*="top: 35px"] { top: 18px !important; }
  .lego-stud[style*="top: 50px"] { top: 26px !important; }
  .lego-stud[style*="top: 60px"] { top: 31px !important; }
  .lego-stud[style*="top: 80px"] { top: 42px !important; }
  .lego-stud[style*="top: 95px"] { top: 50px !important; }
  
  .lego-stud[style*="left: 12px"] { left: 6px !important; }
}

@media (max-width: 375px) {
  .lego-stud {
    width: 10px;
    height: 10px;
    box-shadow: inset 0px 1px 1px rgba(255, 255, 255, 0.4),
                inset 0px -1px 1px rgba(0, 0, 0, 0.3);
  }

  /* Scale stud positions for small mobile */
  .lego-stud[style*="top: 8px"] { top: 3px !important; }
  .lego-stud[style*="top: 15px"] { top: 6px !important; }
  .lego-stud[style*="top: 20px"] { top: 8px !important; }
  .lego-stud[style*="top: 35px"] { top: 14px !important; }
  .lego-stud[style*="top: 50px"] { top: 20px !important; }
  .lego-stud[style*="top: 60px"] { top: 24px !important; }
  .lego-stud[style*="top: 80px"] { top: 32px !important; }
  .lego-stud[style*="top: 95px"] { top: 38px !important; }
  
  .lego-stud[style*="left: 12px"] { left: 5px !important; }
}

/* Block colors */
.lego-yellow { background-color: #fecb00; }
.lego-blue { background-color: #0056a7; }
.lego-green { background-color: #009739; }
.lego-orange { background-color: #f47b20; }
.lego-red { background-color: #d8281c; }

/* Block sizes */
.lego-rect-1x1 { width: 30px; height: 50px; }
.lego-rect-1x2 { width: 30px; height: 65px; }
.lego-rect-1x3 { width: 30px; height: 80px; }
.lego-rect-1x4 { width: 30px; height: 95px; }

/* Mobile responsive block sizes - tablet already matches desktop */
@media (max-width: 768px) {
  /* Block sizes already match desktop */
}

@media (max-width: 480px) {
  .lego-rect-1x1 { width: 24px; height: 45px; }
  .lego-rect-1x2 { width: 24px; height: 55px; }
  .lego-rect-1x3 { width: 24px; height: 70px; }
  .lego-rect-1x4 { width: 24px; height: 85px; }
}

@media (max-width: 375px) {
  .lego-rect-1x1 { width: 20px; height: 40px; }
  .lego-rect-1x2 { width: 20px; height: 50px; }
  .lego-rect-1x3 { width: 20px; height: 60px; }
  .lego-rect-1x4 { width: 20px; height: 75px; }
}

.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
  overflow-y: auto;
  overflow-x: hidden;
  padding: clamp(0.75rem, 2vh, 1.5rem) 60px;
}

/* Desktop: remove scrollbar and fit content on one screen */
@media (min-width: 769px) {
  #intro-screen .card-content {
    overflow-y: hidden;
    padding: clamp(0.875rem, 2vh, 1.5rem) 60px;
  }
  
  .intro-presenter {
    margin-bottom: 0.2rem;
  }
  
  .intro-headline {
    margin-bottom: 0.3rem;
  }
  
  .intro-subline {
    margin-bottom: 0.65rem;
  }
  
  .controls-grid {
    margin-bottom: 0.6rem;
    gap: 0.55rem;
  }
  
  .control-item {
    min-height: auto;
    padding: 0.55rem;
  }
}

@media (max-width: 768px) {
  .card-content {
    padding: clamp(1.5rem, 3vh, 2.5rem) 50px;
  }
}

@media (max-width: 480px) {
  .card-content {
    padding: clamp(1.25rem, 2.5vh, 2rem) 40px;
  }
}

@media (max-width: 375px) {
  .card-content {
    padding: clamp(1rem, 2vh, 1.75rem) 35px;
  }
}

.intro-content {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (max-width: 768px) {
  #intro-screen .card-content {
    padding: 0 50px;
    overflow-y: hidden;
    justify-content: center;
    gap: 1rem;
    height: 100%;
  }
  
  .intro-content {
    height: auto;
    gap: 0.5rem;
  }
  
  .intro-presenter {
    margin-bottom: 0.25rem;
  }
  
  .intro-headline {
    margin-bottom: 0;
  }
}

@media (max-width: 480px) {
  #intro-screen .card-content {
    padding: 0 40px;
    gap: 1rem;
  }
  
  .intro-content {
    gap: 0.5rem;
  }
  
  .intro-presenter {
    margin-bottom: 0.25rem;
  }
  
  .intro-headline {
    margin-bottom: 0;
  }
}

@media (max-width: 375px) {
  #intro-screen .card-content {
    padding: 0 35px;
    gap: 1rem;
  }
  
  .intro-content {
    gap: 0.5rem;
  }
  
  .intro-presenter {
    margin-bottom: 0.25rem;
  }
  
  .intro-headline {
    margin-bottom: 0;
  }
}

.intro-presenter {
  font-size: clamp(0.5rem, 1.5vw, 0.75rem);
  color: #dc2626;
  margin-bottom: clamp(0.25rem, 0.75vw, 0.5rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

.intro-headline {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: clamp(0.375rem, 1vw, 0.75rem);
  line-height: 0.95;
}

@media (max-width: 768px) {
  .intro-headline {
    margin-bottom: 0;
  }
}

.headline-the {
  font-size: clamp(0.875rem, 3.5vw, 2rem);
  color: #1A202C;
  font-weight: 400;
  font-family: 'Squada One', sans-serif;
}

.headline-parenting {
  font-size: clamp(1.25rem, 5vw, 3rem);
  color: #00005a;
  font-weight: 400;
  margin: clamp(-0.125rem, -0.5vw, -0.25rem) 0;
  font-family: 'Squada One', sans-serif;
}

.headline-puzzle {
  font-size: clamp(1.25rem, 5vw, 3rem);
  color: #dc2626;
  font-weight: 400;
  font-family: 'Squada One', sans-serif;
}

@media (max-width: 768px) {
  .headline-the {
    font-size: clamp(2.25rem, 7vw, 3rem);
  }
  
  .headline-parenting {
    font-size: clamp(3.5rem, 11vw, 5rem);
    margin-top: -0.5rem;
  }
  
  .headline-puzzle {
    font-size: clamp(3.5rem, 11vw, 5rem);
    margin-top: -0.5rem;
  }
}

@media (min-width: 1024px) {
  .headline-the {
    font-size: 2rem;
  }
  
  .headline-parenting {
    font-size: 3.25rem;
  }
  
  .headline-puzzle {
    font-size: 3.25rem;
  }
}

.intro-subline {
  font-size: clamp(0.6875rem, 2vw, 1rem);
  color: #1e3a8a;
  margin-bottom: clamp(1.25rem, 2.5vw, 2.5rem);
  max-width: 100%;
  text-align: center;
  line-height: 1.4;
  font-weight: 200;
  font-family: sans-serif;
  padding: 0;
}

@media (max-width: 768px) {
  .intro-subline {
    font-size: clamp(0.875rem, 2.5vw, 1.125rem);
    line-height: 1.3;
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
  }
}

@media (min-width: 1024px) {
  .intro-presenter {
    font-size: 0.75rem;
    margin-bottom: 0.35rem;
  }
  
  .intro-headline {
    margin-bottom: 0.4rem;
  }
  
  .intro-subline {
    font-size: 1rem;
    margin-bottom: 0.85rem;
  }
}

.btn-start {
  background: #00005a;
  color: white;
  border: none;
  padding: clamp(0.625rem, 1.25vw, 0.75rem) clamp(1.25rem, 2.5vw, 1.5rem);
  font-size: clamp(0.875rem, 1.75vw, 1rem);
  font-weight: 600;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
  margin-top: clamp(0.25rem, 0.75vw, 0.5rem);
  min-height: 44px;
  width: auto;
  max-width: 100%;
}

@media (max-width: 768px) {
  .btn-start {
    padding: 0.875rem 1.75rem;
    font-size: 1.0625rem;
    min-height: 48px;
    margin-top: 0;
  }
}

@media (min-width: 1024px) {
  .btn-start {
    padding: 0.75rem 2rem;
    font-size: 1.0625rem;
    margin-top: 0.5rem;
    min-height: 46px;
  }
}

.btn-start:hover {
  background: #1111aa;
  transform: translateY(-2px);
}

.btn-start:active {
  transform: translateY(0);
  background: #00003a;
}

/* Instructions Screen (Screen B) */
#instructions-screen {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 50%, #f5f3ff 100%);
  padding: clamp(1rem, 2.5vw, 2rem);
  overflow: hidden;
}

.instructions-content {
  max-width: min(550px, 100%);
  width: 100%;
  padding-top: clamp(2rem, 4vw, 3.5rem);
}

.instructions-header {
  font-size: clamp(0.875rem, 3vw, 1.375rem);
  font-weight: 700;
  margin-bottom: clamp(0.5rem, 1.25vw, 0.875rem);
  margin-top: clamp(0.5rem, 1.25vw, 0.875rem);
  color: #1A202C;
  text-align: center;
}

.instructions-subline {
  font-size: clamp(0.75rem, 2.25vw, 1.0625rem);
  color: #4A5568;
  margin-bottom: clamp(0.75rem, 1.75vw, 1.5rem);
  line-height: 1.5;
  padding: 0 0.5rem;
}

.controls-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(0.25rem, 0.75vw, 0.5rem);
  margin-bottom: clamp(0.375rem, 1vw, 0.75rem);
  text-align: left;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 768px) {
  .controls-grid {
    gap: 0.65rem;
    margin-top: 0;
    margin-bottom: 1rem;
  }
}

@media (min-width: 480px) {
  .controls-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.control-item {
  display: flex;
  align-items: center;
  gap: clamp(0.25rem, 0.75vw, 0.5rem);
  padding: clamp(0.25rem, 0.75vw, 0.5rem);
  background: #F7FAFC;
  border-radius: 0.375rem;
  min-height: 44px;
}

@media (max-width: 768px) {
  .control-item {
    gap: 0.65rem;
    padding: 0.65rem;
    min-height: 48px;
  }
}

.control-icon {
  width: 32px;
  height: 32px;
  min-width: 24px;
  min-height: 24px;
  background: #00005a;
  color: white;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.75rem, 1.75vw, 1.125rem);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .control-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    font-size: 1.125rem;
  }
}

.control-text {
  flex: 1;
  min-width: 0;
}

.control-label {
  font-weight: 600;
  color: #1A202C;
  margin-bottom: 0.0625rem;
  font-size: clamp(0.625rem, 1.5vw, 0.8125rem);
}

@media (max-width: 768px) {
  .control-label {
    font-size: clamp(0.75rem, 2vw, 0.875rem);
    margin-bottom: 0.0625rem;
  }
}

.control-desc {
  font-size: clamp(0.5625rem, 1.25vw, 0.6875rem);
  color: #718096;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .control-desc {
    font-size: clamp(0.625rem, 1.75vw, 0.75rem);
    line-height: 1.3;
  }
}

@media (min-width: 1024px) {
  .controls-grid {
    gap: 0.6rem;
    margin-bottom: 0.65rem;
  }
  
  .control-item {
    gap: 0.6rem;
    padding: 0.6rem;
    min-height: 48px;
  }
  
  .control-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    font-size: 1.125rem;
  }
  
  .control-label {
    font-size: 0.875rem;
    margin-bottom: 0.0625rem;
  }
  
  .control-desc {
    font-size: 0.75rem;
  }
}

.instructions-footer {
  font-size: clamp(0.6875rem, 1.75vw, 0.875rem);
  color: #718096;
  font-style: italic;
  margin-bottom: clamp(0.5rem, 1.5vw, 1rem);
  text-align: center;
  padding: 0 0.5rem;
}

@media (min-width: 1024px) {
  .instructions-footer {
    font-size: 1rem;
    margin-bottom: 1.25rem;
  }
}

/* Game Screen (Screen C) */
#game-screen {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: #17255A;
  overflow: hidden;
  padding: 0;
}

/* Mobile Game Title */
.mobile-game-title {
  display: none;
}

/* Mobile Load Tracker */
.mobile-load-tracker {
  display: none;
}

.mobile-tracker-items {
  display: flex;
  gap: clamp(0.375rem, 1.5vw, 0.625rem);
  padding: clamp(0.25rem, 1vw, 0.375rem);
  min-height: clamp(48px, 12vw, 72px);
  align-items: center;
}

.mobile-tracker-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.375rem, 1.5vw, 0.625rem) clamp(0.5rem, 2vw, 0.875rem);
  border-radius: clamp(0.25rem, 1vw, 0.375rem);
  min-width: clamp(80px, 22vw, 140px);
  max-width: clamp(130px, 32vw, 200px);
  min-height: clamp(44px, 11vw, 64px);
  flex-shrink: 0;
}

@media (max-width: 375px) {
  .mobile-tracker-item {
    min-width: 75px;
    max-width: 28vw;
  }
  
  .mobile-tracker-label {
    font-size: 0.625rem;
  }
}

@media (min-width: 480px) {
  .mobile-tracker-item {
    min-width: 110px;
    max-width: 160px;
  }
  
  .mobile-tracker-label {
    font-size: 0.8125rem;
  }
}

.mobile-tracker-label {
  color: white;
  font-size: clamp(0.6875rem, 2.5vw, 0.9375rem);
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  word-wrap: break-word;
  hyphens: auto;
}

@media (min-width: 768px) {
  .mobile-game-title,
  .mobile-load-tracker {
    display: none;
  }
  
  #game-screen {
    flex-direction: row;
    padding-top: 0;
  }
}

/* Desktop Side Panels (Screen D) */
.left-panel, .right-panel {
  display: none;
  flex-direction: column;
  padding: clamp(1rem, 3vw, 2rem) clamp(0.75rem, 2.5vw, 1.5rem);
  border-radius: 1rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  background: #fff;
}

/* Tablet layout: show both panels below canvas */
@media (min-width: 768px) and (max-width: 1023px) {
  #game-screen {
    flex-direction: column;
    overflow: hidden;
  }
  
  .left-panel {
    display: flex;
    min-height: auto;
    width: 100%;
    max-width: 100%;
    padding: clamp(1.25rem, 2.5vw, 1.75rem);
    flex-direction: row;
    gap: clamp(1.25rem, 3vw, 2.5rem);
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .left-panel > div {
    flex: 1 1 280px;
    max-width: 400px;
    min-width: 250px;
  }
  
  .right-panel {
    display: flex;
    min-height: auto;
    width: 100%;
    max-width: 100%;
    padding: clamp(1.25rem, 2.5vw, 1.75rem);
    flex-direction: row;
    gap: clamp(1.25rem, 3vw, 2.5rem);
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .right-panel > div {
    flex: 1 1 280px;
    max-width: 400px;
    min-width: 250px;
  }
}

@media (min-width: 1024px) {
  .left-panel, .right-panel {
    display: flex;
    width: clamp(18%, 20vw, 22%);
    max-width: 340px;
    min-width: 240px;
  }
}

.left-panel {
  background: linear-gradient(180deg, #2a3e5f 0%, #1f2f4d 100%);
  color: white;
  justify-content: flex-start;
}

.left-panel-title {
  font-size: clamp(1.25rem, 2.5vw, 1.875rem);
  font-weight: 700;
  margin-top: clamp(5rem, 8vw, 6.5rem);
  margin-bottom: clamp(0.375rem, 1vw, 0.625rem);
  line-height: 1.2;
}

.left-panel-subtitle {
  font-size: clamp(0.875rem, 1.75vw, 1.0625rem);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
  line-height: 1.4;
}

.left-panel-logo {
  background-image: url('/logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: right center;
  width: 100%;
  max-width: 120px;
  height: 32px;
  margin-top: auto;
  margin-left: auto;
  opacity: 0.8;
}

.right-panel {
  background: linear-gradient(180deg, #2a3e5f 0%, #1f2f4d 100%);
  color: white;
}

.right-panel-logo {
  background-image: url('/white-logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 100%;
  max-width: 150px;
  height: 45px;
  margin-top: auto;
  margin-left: auto;
  margin-right: 0;
}

.load-tracker {
  margin-bottom: 2rem;
  margin-top: 2rem;
  border: 3px solid #22c55e;
  border-radius: 0.75rem;
  padding: 1.5rem;
  background: rgba(34, 197, 94, 0.05);
}

.tracker-title {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1rem;
  font-weight: 600;
}

.tracker-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tracker-item {
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  animation: fadeIn 0.3s ease;
  border-left: 3px solid;
}

.score-section {
  margin-bottom: 3rem;
  border: 3px solid #f59e0b;
  border-radius: 0.75rem;
  padding: 1.5rem;
  background: rgba(245, 158, 11, 0.05);
}

.score-value {
  font-size: 3rem;
  font-weight: 700;
  color: white;
  text-align: left;
}

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

.next-preview {
  margin-bottom: 2rem;
}

.preview-blocks {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.preview-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.375rem;
}

.preview-swatch {
  width: 32px;
  height: 32px;
  border-radius: 0.25rem;
  flex-shrink: 0;
}

.preview-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
}

/* Game Center Area */
.game-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: clamp(0.5rem, 2vw, 1.25rem);
  min-width: 0;
  height: 100%;
}

@media (max-width: 768px) {
  .game-center {
    min-height: 80vh;
  }
}

.game-controls {
  padding: clamp(0.5rem, 1.5vw, 1rem);
  position: fixed;
  top: clamp(0.5rem, 1.5vw, 1rem);
  left: clamp(0.5rem, 1.5vw, 1rem);
  display: flex;
  gap: clamp(0.375rem, 1vw, 0.625rem);
  z-index: 1000;
}

.control-btn {
  width: clamp(2.75rem, 5vw, 3rem);
  height: clamp(2.75rem, 5vw, 3rem);
  min-width: 44px;
  min-height: 44px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.control-btn:hover {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.control-btn:active {
  transform: scale(0.95);
  background: rgba(235, 235, 235, 1);
}

.control-btn svg {
  width: clamp(1.125rem, 2.5vw, 1.625rem);
  height: clamp(1.125rem, 2.5vw, 1.625rem);
  fill: #1A202C;
}

.watermark {
  position: fixed;
  bottom: clamp(0.5rem, 1.5vw, 1rem);
  right: clamp(0.5rem, 1.5vw, 1rem);
  background-image: url('/logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: clamp(70px, 12vw, 110px);
  height: clamp(20px, 3.5vw, 32px);
  opacity: 0.4;
  z-index: 100;
}

/* Mobile Game Logo - White version at bottom right */
.mobile-game-logo {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background-image: url('/white-logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 60px;
  height: 18px;
  opacity: 0.7;
  z-index: 100;
  display: none;
}

@media (max-width: 768px) {
  .mobile-game-logo {
    display: block;
  }
}

@media (min-width: 768px) {
  .mobile-game-logo {
    display: none;
  }
}

/* Mobile Score Display (top-right) - Only visible on small screens */
.mobile-score-display {
  position: fixed;
  top: clamp(0.5rem, 1.5vw, 1rem);
  right: clamp(0.5rem, 1.5vw, 1rem);
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.875rem, 3.5vw, 1.25rem);
  font-weight: 700;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.8);
  padding: clamp(0.375rem, 1.5vw, 0.75rem) clamp(0.625rem, 2.5vw, 1.125rem);
  border-radius: clamp(0.375rem, 1.5vw, 0.5rem);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.5px;
}

/* Hide mobile score on tablet and desktop where panels are visible */
@media (min-width: 768px) {
  .mobile-score-display {
    display: none !important;
  }
}

#game-canvas {
  border: 2px solid rgba(42, 62, 95, 0.3);
  background: #2D3E5C;
  max-width: 100%;
  max-height: 85vh;
  width: 100%;
  height: auto;
  border-radius: clamp(0.5rem, 1.5vw, 1rem);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

@media (max-width: 768px) {
  #game-canvas {
    max-height: 90vh;
    max-width: 90vw;
  }
}

@media (max-width: 480px) {
  #game-canvas {
    max-height: 85vh;
  }
}

@media (max-width: 375px) {
  #game-canvas {
    max-height: 82vh;
  }
}

@media (min-width: 768px) {
  #game-canvas {
    max-width: 400px;
    max-height: 85vh;
  }
}

@media (min-width: 1024px) {
  #game-canvas {
    max-width: 450px;
    max-height: 85vh;
  }
}

/* End Screen */
#end-screen {
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

@media (max-width: 768px) {
  #end-screen {
    justify-content: center;
    align-items: center;
  }
}

#end-screen .card-container {
  background: #fff;
}

.end-content {
  width: 100%;
  max-width: 500px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

@media (min-width: 1024px) {
  .end-content {
    gap: 0.4rem;
  }
}

.end-headline {
  font-family: 'Squada One', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.75rem);
  font-weight: 300;
  margin-bottom: clamp(0.75rem, 1.5vw, 1rem);
  line-height: 1.1;
  color: #1A202C;
}

.end-subhead {
  font-size: clamp(0.875rem, 2.5vw, 1.125rem);
  font-weight: 600;
  color: red;
  line-height: 1.4;
  margin-bottom: clamp(0.625rem, 1.25vw, 0.875rem);
}

.end-body {
  font-size: clamp(0.75rem, 2vw, 0.9375rem);
  color: #4A5568;
  line-height: 1.5;
  margin-bottom: clamp(0.75rem, 1.75vw, 1.25rem);
}

@media (min-width: 1024px) {
  .end-headline {
    font-size: 2.75rem;
    margin-bottom: 0.75rem;
  }
  
  .end-subhead {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
  }
  
  .end-body {
    font-size: 0.9375rem;
    margin-bottom: 1rem;
  }
}

.end-score {
  font-size: clamp(0.9375rem, 2vw, 1.25rem);
  font-weight: 600;
  margin-bottom: clamp(1rem, 2vw, 1.75rem);
  color: #1976d2;
}

@media (min-width: 1024px) {
  .end-score {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
  }
}

.btn-cta-primary {
  width: 100%;
  padding: clamp(0.625rem, 1.25vw, 0.75rem) clamp(1rem, 2vw, 1.25rem);
  background: #00005a;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: clamp(0.875rem, 1.625vw, 0.9375rem);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
  margin-bottom: clamp(0.375rem, 1.25vw, 0.75rem);
  min-height: 44px;
}

@media (min-width: 1024px) {
  .btn-cta-primary {
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    min-height: 46px;
  }
}

.btn-cta-primary:hover {
  background: #1111aa;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 90, 0.3);
}

.btn-cta-primary:active {
  transform: translateY(0);
  background: #00003a;
}

.secondary-buttons {
  display: flex;
  gap: clamp(0.625rem, 1.5vw, 0.875rem);
  margin-top: clamp(0.5rem, 1vw, 0.75rem);
  margin-bottom: clamp(0.75rem, 1.75vw, 1rem);
  width: 100%;
  flex-wrap: wrap;
}

.btn-secondary {
  flex: 1 1 calc(50% - 0.5rem);
  min-width: 100px;
  padding: clamp(0.625rem, 1.125vw, 0.625rem) clamp(0.75rem, 1.5vw, 0.875rem);
  background: #e0e7ff;
  color: #3730a3;
  border: 2px solid #818cf8;
  border-radius: 0.5rem;
  font-size: clamp(0.8125rem, 1.375vw, 0.875rem);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
  min-height: 44px;
}

@media (min-width: 1024px) {
  .secondary-buttons {
    gap: 0.65rem;
    margin-bottom: 0.75rem;
  }
  
  .btn-secondary {
    min-width: 130px;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    min-height: 44px;
  }
}

.btn-secondary:hover {
  background: #c7d2fe;
  border-color: #6366f1;
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(0);
  background: #a5b4fc;
}

.btn-share-full {
  width: 100%;
  padding: clamp(0.625rem, 1.125vw, 0.625rem) clamp(1rem, 2vw, 1.25rem);
  background: #0f172a;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: clamp(0.8125rem, 1.375vw, 0.875rem);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
  min-height: 44px;
}

@media (min-width: 1024px) {
  .btn-share-full {
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
    min-height: 44px;
  }
}

.btn-share-full:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.btn-share-full:active {
  transform: translateY(0);
  background: #0f172a;
}


/* Pause Overlay */
.pause-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

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

.pause-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 700;
  color: #1A202C;
  padding: 0 1rem;
  text-align: center;
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: clamp(1.5rem, 3vw, 2.5rem);
  left: 50%;
  transform: translateX(-50%);
  background: #1A202C;
  color: white;
  padding: clamp(0.75rem, 2vw, 1rem) clamp(1.25rem, 3vw, 2rem);
  border-radius: 0.5rem;
  font-size: clamp(0.8125rem, 2vw, 0.9375rem);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 1001;
  max-width: 90%;
  text-align: center;
}

.toast.show {
  opacity: 1;
}
