@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  src: local('Lato Regular'), local('Lato-Regular'), url(https://fonts.gstatic.com/s/lato/v11/MDadn8DQ_3oT6kvnUq_2r_esZW2xOQ-xsNqO47m55DA.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 400;
  src: local('Source Sans Pro'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/ODelI1aHBYDBqgeIAH2zlJbPFduIYtoLzwST68uhz_Y.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 900;
  src: local('Source Sans Pro Black'), local('SourceSansPro-Black'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/toadOcfmlt9b38dHJxOBGIq-Fb0zf838trI74uojZQY.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
@font-face {
  font-family: 'FontAwesome';
  src: url('../fonts/fontawesome-webfont.eot?v=3.0.1');
  src: url('../fonts/fontawesome-webfont.eot?#iefix&v=3.0.1') format('embedded-opentype'),
    url('../fonts/fontawesome-webfont.woff?v=3.0.1') format('woff'),
    url('../fonts/fontawesome-webfont.ttf?v=3.0.1') format('truetype');
  font-weight: normal;
  font-style: normal;
}
/* General */
html {
  font-size: 1em;
}
body {
  font: 1em 'Source Sans Pro';
  margin: 0;
  background: #000;
  background-size: cover;
  color: #fff;
}
a {
  color: #fff;
  text-decoration: none;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}
th {
  padding: 0;
  font-weight: normal;
}
td {
  padding: 0;
}

/* Header */
h1 {
  color: #fff;
  font-size: 2rem;
  margin: 0.65em 0;
}
.subtitle {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 200;
  letter-spacing: 0.2em;
  margin: -1.8em 0 1em 0;
  text-align: center;
  opacity: 0.7;
}
h3 {
  margin: 0;
  text-transform: uppercase;
  font-weight: normal;
  text-align: center;
}
nav > ul {
  margin: 0;
  padding: 0;
}
.button,
nav li {
  display: block;
}
.button,
nav a {
  font: 1.25rem 'Lato';
  display: inline-block;
  width: 50%;
  color: #fff;
  border: 2px solid #fff;
  cursor: pointer;
  border-radius: 5px;
  padding: 0.3rem 0.6rem 0.4rem;
  margin: 0.5em;
  background: #000;
  transition: all 0.15s ease;
}
/* Exclude logo from nav a styles - reset nav a properties but allow #logo-text properties */
nav a#logo-text {
  font: unset;
  width: unset;
  color: unset;
  border: unset;
  cursor: unset;
  border-radius: unset;
  padding: unset;
  margin: unset;
  background: unset;
  transition: unset;
}
nav a.menu-focused,
.button.menu-focused {
  border-color: #4da6ff;
  background: rgba(77, 166, 255, 0.15);
  box-shadow: 0 0 12px rgba(77, 166, 255, 0.6);
  transform: scale(1.02);
}
/* Prevent logo from getting menu-focused styles */
nav a#logo-text.menu-focused,
#menu-main h1 a#logo-text.menu-focused,
#menu-main a#logo-text {
  border: none !important;
  box-shadow: none !important;
  transform: none !important;
  border-color: transparent !important;
  border-radius: 0 !important;
}
nav a.menu-item-with-thumbnail.menu-focused {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 16px rgba(77, 166, 255, 0.7), 0 4px 12px rgba(77, 166, 255, 0.3);
}
nav a.menu-item-with-thumbnail.menu-focused .menu-item-thumbnail {
  border-color: #4da6ff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6),
              0 0 20px rgba(77, 166, 255, 0.5);
}
nav a.disabled {
  color: #555;
  border-color: #555;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.5;
}
nav a.menu-item-with-thumbnail.disabled .menu-item-thumbnail {
  border-color: rgba(85, 85, 85, 0.3);
  box-shadow: none;
  filter: grayscale(50%) brightness(0.7);
}
/* Menu item with thumbnail styling */
nav a.menu-item-with-thumbnail {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem;
  transition: all 0.2s ease;
  width: calc(100% - 1em);
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
}
nav a.menu-item-with-thumbnail:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(77, 166, 255, 0.3);
}
nav a.menu-item-with-thumbnail .menu-item-thumbnail {
  flex-shrink: 0;
  width: 110px;
  height: 75px;
  border-radius: 6px;
  border: 2px solid rgba(77, 166, 255, 0.4);
  object-fit: contain;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4),
              0 0 12px rgba(77, 166, 255, 0.15);
  transition: all 0.2s ease;
}
nav a.menu-item-with-thumbnail:hover .menu-item-thumbnail {
  border-color: rgba(77, 166, 255, 0.7);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6),
              0 0 20px rgba(77, 166, 255, 0.35);
  transform: scale(1.05);
}
nav a.menu-item-with-thumbnail .menu-item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}
nav a.menu-item-with-thumbnail .menu-item-content > span {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 1.3rem;
  font-weight: 500;
}
nav a.menu-item-with-thumbnail .skip-btn {
  position: absolute;
  right: 0;
  bottom: 0;
}
nav a.menu-item-with-thumbnail .progress-container {
  width: calc(100% - 4.5rem);
}
/* Progress bar container inside menu buttons */
.progress-container {
  position: relative;
  width: 100%;
  height: 18px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  margin-top: 0.4rem;
  overflow: hidden;
}
/* Container for progress bar and skip button */
nav a:has(.skip-btn) {
  position: relative;
}
/* Make progress bar narrower when skip button is present */
nav a:has(.skip-btn) .progress-container {
  width: calc(100% - 4.5rem);
  margin-right: 0.5rem;
}
/* Progress bar fill */
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4da6ee 0%, #3397d9 100%);
  border-radius: 2px;
  transition: width 0.3s ease-in-out;
}
/* Progress percentage text - overlayed and centered */
.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  z-index: 1;
}
/* Show green gradient when complete */
.progress-bar.complete {
  background: linear-gradient(90deg, #78a82e 0%, #5d8a0f 100%);
}
/* Enhanced text visibility on complete progress bars */
.progress-bar.complete + .progress-text {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 8px rgba(0, 0, 0, 0.7);
  font-weight: 700;
}
/* Disabled button progress styling */
nav a.disabled .progress-container {
  background: rgba(85, 85, 85, 0.15);
}
nav a.disabled .progress-bar {
  background: rgba(85, 85, 85, 0.5);
}
nav a.disabled .progress-text {
  color: rgba(85, 85, 85, 0.8);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
/* Skip button styling */
.skip-btn {
  position: absolute;
  right: 0;
  bottom: 0.4rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-family: 'Lato';
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.2s ease;
  height: 18px;
  line-height: 1;
}
.skip-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}
.skip-btn.skipped {
  background: rgba(255, 165, 0, 0.3);
  border-color: rgba(255, 165, 0, 0.6);
  color: rgba(255, 200, 100, 1);
}
.skip-btn.skipped:hover {
  background: rgba(255, 165, 0, 0.4);
  border-color: rgba(255, 165, 0, 0.8);
  color: #ffb84d;
}
.button {
  margin: 0;
}
[class^="icon-"],
[class*=" icon-"] {
  font-family: FontAwesome;
  font-weight: normal;
  font-style: normal;
  text-decoration: inherit;
  margin: 0 0.4em 0 0;
  -webkit-font-smoothing: antialiased;
}
.icon-cog:before{content:'\f021'}

/* Content */
#content {
  display: table;
  margin: auto;
  background: rgba(0,0,0,0.7);
}

/* Desktop: table-cell layout for side-by-side */
@media screen and (min-width: 769px) {
  #d, #b, #c {
    display: table-cell;
  }
}

/* Canvases */
#sprite {
  display: none;
}
/*#bg {
  position: fixed;
  top:0;
  left:0;
  height:100%;
  width:100%;
  z-index: -1;
  opacity: 0;
  transition: opacity .5s ease-in;
}*/
#bg {
  position: fixed;
  top:0;
  left:0;
  height:100%;
  width:100%;
  z-index: -1;
}
#a {
  position: relative;
  overflow: hidden;
  float: left;
}
#b {
  border: 1px solid #fff;
  box-shadow: 0 0 20px rgba(255,255,255,0.5);
  position: relative;
  overflow: hidden;
  float: left;
  z-index: 3;
}
#c {
  padding: 0 0.5em;
  position: relative;
  overflow: hidden;
  float: left;
}

/* Reset floats for mobile - handled in mobile media query below */
  #bgStack {
    background: #000;
    position: absolute;
    z-index: 2;
  }
  #hold,
  #preview,
  #stack {
    position: absolute;
    z-index: 2;
  }
  #active {
    position: absolute;
    z-index: 3;
  }
  #msg {
    font-weight: 900;
    font-family: 'Source Sans Pro', sans-serif;
    line-height: 1.2;
    color: #fff;
    position: absolute;
    text-align: center;
    width: 100%;
    margin: 0;
    z-index: 4;
    /* Center vertically using transform */
    top: 50%;
    transform: translateY(-50%);
    /* Font size is set dynamically by resize() in tetris.js */
  }

  @keyframes successPop {
    0% {
      opacity: 0;
      transform: translateY(-50%) scale(0.5);
    }
    30% {
      opacity: 1;
      transform: translateY(-50%) scale(1.2);
    }
    70% {
      opacity: 1;
      transform: translateY(-50%) scale(1);
    }
    100% {
      opacity: 0;
      transform: translateY(-50%) scale(0.9);
    }
  }

  .success-animation {
    animation: successPop 0.6s ease-in-out;
    animation-fill-mode: forwards;
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
  }

#d {
  float: left;
}

/* Stats */
#stats {
  display: block;
  position: absolute;
}
#stats tbody {
  display: block;
}
#stats tr {
  display: block;
  width: 100%;
  padding: 0 0.5rem;
}
#stats th {
  text-transform: uppercase;
  display: inline-block;
  width: 100%;
  vertical-align: top;
}
#stats td {
  font-size: 280%;
  font-weight: 900;
  text-align: center;
  line-height: 1;
  display: inline-block;
  width: 100%;
}
#time {
  text-align: center;
  font-weight: 900;
  font-size: 1.125em;
  display: block;
}

/* Menus */
.menu {
  text-align: center;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  margin-top: -200%;
  position: absolute;
  background: #000;
  background: rgba(0,0,0,0);
  top: 0;
  z-index: 50;
  opacity: 0;
  padding-bottom: 3em;
  /*-webkit-transition: opacity .4s ease-in-out;
     -moz-transition: opacity .4s ease-in-out;
       -o-transition: opacity .4s ease-in-out;*/
          transition: opacity .8s ease-out,
                      background .4s ease-out .3s,
                      margin .4s ease-out;
}

/* Widescreen menu layout - only when not in direct gameplay mode */
body:not(.url-direct-load) .menu {
  position: fixed;
  left: 0;
  right: 0;
  width: 100vw;
  max-width: 100%;
}

/* Center menu content in widescreen */
body:not(.url-direct-load) .menu > * {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Desktop: wider menu buttons for better use of space */
@media screen and (min-width: 769px) {
  body:not(.url-direct-load) .menu nav a,
  body:not(.url-direct-load) .menu .button,
  body:not(.url-direct-load) nav.menu a.menu-item-with-thumbnail {
    width: 70%;
    max-width: 600px;
  }

  body:not(.url-direct-load) .menu h1 {
    font-size: 3rem;
  }

  body:not(.url-direct-load) .menu h2 {
    font-size: 2rem;
  }
}

.on {
  background: rgba(0,0,0,0.8);
  opacity: 1;
  margin: 0;
}
.hidestat {
  display: none !important;;
}

/* Controls */
#controls {
  margin: 0 auto 1em;
  border-collapse: separate;
  border-spacing: 0.5em 0.3em;
}
#controls th {
  font-weight: bold;
  text-align: left;
  line-height: 1.6;
  padding-right: 1em;
}
#controls td {
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  width: 6em;
  padding: 0.4em 0.8em;
  line-height: 1.6;
  background: #111;
  border-radius: 5px;
}
#controls td:hover {
  background: #191919;
}

#controls td:active {
  background: #1a1a1a;
}

/* Mobile controls checkbox cell */
#controls td.mobile-control-cell {
  background: none;
  cursor: default;
  text-align: left;
  padding-left: 0;
  width: auto;
}

#controls td.mobile-control-cell:hover {
  background: none;
}

/* Mobile controls checkbox styling to match other controls */
#mobileControlsCheckbox {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 1.6em;
  height: 1.6em;
  border-radius: 5px;
  background: #111;
  border: 2px solid #111;
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  transition: all 0.15s ease;
}

#mobileControlsCheckbox:hover {
  background: #191919;
  border-color: #191919;
}

#mobileControlsCheckbox:active {
  background: #1a1a1a;
  border-color: #1a1a1a;
}

#mobileControlsCheckbox:checked {
  background: #3b3;
  border-color: #3b3;
}

#mobileControlsCheckbox:checked:hover {
  background: #4c4;
  border-color: #4c4;
}

#mobileControlsCheckbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 1.2em;
  font-weight: bold;
  line-height: 1;
}


/* Settings */
.left,
.right {
  font-weight: bold;
  font-style: normal;
  cursor: pointer;
  -webkit-font-smoothing: antialiased;
  -webkit-transition:all .1s ease-out;
  transition:all .1s ease-out;
  user-select: none;
}
.left:hover,
.right:hover {
  color: #4da6ee;
}
.left:before,
.right:before {
  text-decoration: inherit;
  display: inline-block;
}
.left:before  { content: "◀"; }
.right:before { content: "▶"; }

#settings {
  margin-bottom: 1em;
}
#settings b {
  text-align: left;
  display: inline-block;
  width: 7em;
}
#settings span {
  text-align: center;
  font-weight: bold;
  display: inline-block;
  width: 5em;
  margin: 0.3em 0;
}

/* Special Menus */
#go {
  background: none;
  transition: opacity .8s ease-out .8s;
}
#go ul {
  width: 100%;
  position: absolute;
  bottom: 2em;
}

#pause {
  background: none;
  transition: opacity .8s ease-out;
}
#pause ul {
  width: 100%;
  position: absolute;
  bottom: 2em;
}

/* Mobile Controls */
#mobile-controls {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: rgba(0, 0, 0, 0.9);
  border-top: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  padding: 10px 5px;
  z-index: 100;
  touch-action: none;
}

.mobile-controls-left {
  display: grid;
  grid-template-columns: repeat(3, 70px);
  grid-template-rows: repeat(4, 35px);
  gap: 8px;
  align-items: center;
  justify-content: center;
}

/* Arrow key layout:
     ↑
     ↑
   ← ↓ →
     ↓
   Up/down buttons span 2 rows each, left/right span all 4 rows */
#btn-hardDrop {
  grid-column: 2;
  grid-row: 1 / 3; /* Span 2 rows */
}

#btn-moveLeft {
  grid-column: 1;
  grid-row: 1 / 5; /* Span all 4 rows */
}

#btn-moveDown {
  grid-column: 2;
  grid-row: 3 / 5; /* Span 2 rows */
}

#btn-moveRight {
  grid-column: 3;
  grid-row: 1 / 5; /* Span all 4 rows */
}

.mobile-controls-right {
  display: grid;
  grid-template-columns: repeat(3, 65px);
  grid-template-rows: repeat(2, 65px);
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.control-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  font-size: 1.5rem;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.control-btn:active,
.control-btn.pressed {
  background: rgba(77, 166, 238, 0.5);
  border-color: rgba(77, 166, 238, 0.8);
  transform: scale(0.95);
}

.dpad-btn {
  font-size: 2rem;
}

.action-btn {
  font-size: 1.2rem;
}

.utility-btn {
  font-size: 1.5rem;
}

#btn-holdPiece {
  font-size: 0.9rem;
}

/* Mobile Layout Adjustments */
/* Note: Layout spacing is now handled by resize() function in tetris.js,
   which calculates proper padding based on mobile controls height */
#content.mobile-layout {
  margin-top: 10px !important;
}

/* Mobile-specific responsive adjustments */
@media screen and (max-width: 768px) {
  #content {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: flex-start;
    margin: 5px auto 0;
    width: 100%;
    max-width: 100vw;
    gap: 0;
  }

  #a, #d, #b, #c {
    float: none;
  }

  #d {
    order: 1;
    flex: 0 0 auto;
    width: auto;
    text-align: center;
    padding: 0 5px;
    margin: 0;
  }

  #b {
    order: 2;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    width: auto;
  }

  #c {
    order: 3;
    flex: 0 0 auto;
    width: auto;
    text-align: center;
    padding: 0 5px;
    margin: 0;
  }

  /* Reduce spacing for h3 headers on mobile */
  #d h3, #c h3 {
    font-size: 0.65rem;
    margin: 0.1em 0;
  }

  /* Make canvases smaller on mobile to fit */
  #hold, #preview {
    transform: scale(0.7);
    transform-origin: center center;
  }

  /* Center the hold canvas container */
  #a {
    text-align: center;
  }

  #a canvas {
    margin: 0 auto;
    display: block;
  }

  /* Center the preview canvas */
  #c canvas {
    margin: 0 auto;
    display: block;
    max-width: 100%;
  }

  h3 {
    font-size: 0.9rem;
    margin: 0.3em 0;
  }

  #stats {
    position: static;
    margin: 0.5em auto;
  }

  #stats tr {
    padding: 0.2rem;
  }

  #stats td {
    font-size: 180%;
  }

  nav li {
    margin: 0.3em auto;
  }

  nav a {
    width: 80%;
    font-size: 1rem;
    padding: 0.4rem 0.5rem;
  }

  /* Adjust progress bar width for skip button on mobile */
  nav a:has(.skip-btn) .progress-container {
    width: calc(100% - 4rem);
  }

  /* Smaller skip button on mobile */
  .skip-btn {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
  }

  h1 {
    font-size: 1.5rem;
    margin: 0.5em 0;
  }

  .subtitle {
    font-size: 0.8rem;
    margin: -1.5em 0 0.8em 0;
  }

  .menu {
    padding-top: 1em;
  }

  /* Adjust canvas sizes on very small screens */
  body.mobile-layout canvas {
    max-width: 90vw;
  }

  /* Fix modal content to not be hidden by mobile controls */
  .modal-content {
    padding-bottom: 200px;
  }
}

/* Very small screens (phones in portrait) */
@media screen and (max-width: 480px) {
  #mobile-controls {
    height: 160px;
    padding: 8px 3px;
  }

  .mobile-controls-left {
    grid-template-columns: repeat(3, 60px);
    grid-template-rows: repeat(4, 30px);
    gap: 6px;
  }

  .mobile-controls-right {
    grid-template-columns: repeat(3, 55px);
    grid-template-rows: repeat(2, 55px);
    gap: 6px;
  }

  .dpad-btn {
    font-size: 1.8rem;
  }

  .action-btn {
    font-size: 1rem;
  }

  .utility-btn {
    font-size: 1.3rem;
  }

  #btn-holdPiece {
    font-size: 0.8rem;
  }

  /* Fix modal content for very small screens */
  .modal-content {
    padding-bottom: 180px;
  }
}

/* Landscape mode on mobile */
@media screen and (max-width: 896px) and (max-height: 428px) and (orientation: landscape) {
  #mobile-controls {
    height: 120px;
    padding: 5px 3px;
  }

  .mobile-controls-left {
    grid-template-columns: repeat(3, 50px);
    grid-template-rows: repeat(4, 25px);
    gap: 5px;
  }

  .mobile-controls-right {
    grid-template-columns: repeat(3, 48px);
    grid-template-rows: repeat(2, 48px);
    gap: 5px;
  }

  .dpad-btn {
    font-size: 1.5rem;
  }

  .action-btn {
    font-size: 0.9rem;
  }

  .utility-btn {
    font-size: 1.2rem;
  }

  #btn-holdPiece {
    font-size: 0.7rem;
  }

  #content.mobile-layout {
    margin-top: 5px !important;
  }

  #content {
    margin-top: 5px;
  }

  h3 {
    font-size: 0.7rem;
    margin: 0.2em 0;
  }

  #stats tr {
    padding: 0.1rem;
  }

  /* Fix modal content for landscape mode */
  .modal-content {
    padding-bottom: 140px;
    max-height: 90vh;
  }
}

/* Welcome Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  animation: fadeIn 0.3s;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: #1a1a1a;
  border: 2px solid #4da6ff;
  border-radius: 10px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(77, 166, 255, 0.3);
  animation: slideIn 0.3s;
}

.modal-content h2 {
  color: #4da6ff;
  margin-top: 0;
  font-size: 1.8rem;
  text-align: center;
}

.modal-content p {
  line-height: 1.6;
  margin: 15px 0;
}

.welcome-section {
  background-color: #252525;
  border-left: 3px solid #4da6ff;
  padding: 15px;
  margin: 20px 0;
  border-radius: 5px;
}

.welcome-section h3 {
  color: #4da6ff;
  margin-top: 0;
  font-size: 1.2rem;
}

.welcome-section ul {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}

.welcome-section li {
  padding: 5px 0;
  font-size: 0.95rem;
}

.button-primary {
  background: linear-gradient(135deg, #4da6ff, #0066cc);
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
  width: 100%;
  margin-top: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.button-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(77, 166, 255, 0.5);
}

.button-primary:active {
  transform: scale(0.98);
}

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

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}


/* URL Direct Load - Hide menus when loading directly into gameplay */
body.url-direct-load nav {
  display: none !important;
}
body.url-direct-load h1 {
  display: none !important;
}
body.url-direct-load .subtitle {
  display: none !important;
}
