@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&family=Orbitron:wght@500&display=swap');
@import url('var.css');

body {
  background: darkslategrey;
}

/* --- Console Container --- */
.console {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--console-plastic-core, #cfc8b0);
  border-radius: 30px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
  margin: 2rem auto;
  min-height: 90dvh;
  max-width: 960px;
  overflow: hidden;
  border: 6px solid #8a8577;
}

@keyframes led-pulse {
  0%, 100% { box-shadow: 0 0 4px red; }
  50% { box-shadow: 0 0 12px red; }
}

/* --- Top Bezel --- */
header {
  width: 100%;
  background: linear-gradient(to bottom, #d9d2be 0%, #bdb49f 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2.5rem;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  gap: 1.5rem;

  .led {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle, red 0%, darkred 80%);
    box-shadow: 0 0 6px red;
    flex-shrink: 0;
    margin-left: 0.25rem;
    animation: led-pulse 2s infinite;
  }

  h1 {
    font-family: var(--font-ui);
    font-size: 1.2rem;
    color: var(--lcd-dark, #2d4739);
    text-align: center;
    flex: 1;
    letter-spacing: 1px;
    margin: 0;
  }

  /* --- Navigation --- */
  nav {
    flex-shrink: 0;

    ul {
      display: flex;
      margin: 0;
      padding: 0;
      list-style: none;
    }

    li {
      flex: 1;
    }

    a {
      display: block;
      padding: 0.6rem 1rem;
      background: #bdb49f;
      border: 2px solid #8a8577;
      border-radius: 0;
      border-right: none; /* remove double borders between buttons */
      font-family: var(--font-ui);
      color: var(--lcd-dark, #2d4739);
      font-size: 0.75rem;
      text-decoration: none;
      text-transform: uppercase;
      text-align: center;
      transition: all 0.15s ease-in-out;
      min-width: 100px;
    }

    /* last button keeps right border */
    li:last-child a {
      border-right: 2px solid #8a8577;
    }

    /* Hover and click effects */
    a:hover {
      background: #a59c89;
      transform: translateY(-1px);
    }

    a:active {
      background: #8a8577;
      transform: translateY(1px);
    }
  }
}

/* Responsive stacking for small screens */
@media (max-width: 1000px) {
  header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;

    ul {
      flex-wrap: wrap;
    }

    li {
      flex: 1 1 50%;
    }

    a {
      font-size: 0.7rem;
    }
  }
}



/* --- LCD Screen --- */
main::before {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: brightness(1.05) contrast(0.95);
  background: linear-gradient(120deg, rgba(255,255,255,0.05), rgba(255,255,255,0));
  pointer-events: none;
  z-index: 1;
}

main {
  position: relative;
  background: var(--lcd-light, #c5dca0);
  color: var(--lcd-dark, #2d4739);
  width: 90%;
  max-width: 800px;
  min-height: 60dvh;
  padding: 2rem;
  border: 8px inset var(--lcd-border, #1e2f24);
  border-radius: 8px;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.4);
  text-align: center;
  text-shadow: 0 0 2px rgba(45, 71, 57, 0.6);
  margin: 1.5rem auto;
  overflow-y: auto;
  font-family: var(--font-alt);
  font-size: var(--font-size-base);

  h1 {
    font-size: 5rem;
  }

  h2 {
    font-size: 4rem;
  }

  h3 {
    font-size: 3rem;
  }

  p, li {
    font-size: 1.5rem;
  }
}

/* CRT lines */
main::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.06) 0px,
    rgba(0, 0, 0, 0.06) 1px,
    rgba(0, 0, 0, 0) 2px
  );
  background-size: 100% 2px;
  pointer-events: none;
  z-index: 2;
  border-radius: inherit;
}

main picture img {
  border: 4px solid var(--lcd-border, #1e2f24);
  border-radius: 6px;
  max-width: 100%;
  height: auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

game-review {
  display: block;
  border: 2px solid var(--lcd-border, #1e2f24);
  margin: 10px;
}



/* --- Bottom Bezel --- */
footer {
  width: 100%;
  background: linear-gradient(to top, #d9d2be 0%, #bdb49f 100%);
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
  box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.2);
  padding: 1.25rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;

  .speaker {
    width: 100px;
    height: 60px;
    background: repeating-linear-gradient(
      45deg,
      #444 0 2px,
      transparent 2px 4px
    );
    opacity: 0.5;
    border-radius: 8px;
    margin-left: 0.5rem;
  }

  .toggles {
    display: flex;
    gap: 1.25rem;
  }

  .toggle-btn {
    width: 50px;
    height: 50px;
    background: radial-gradient(circle at 30% 30%, #666 0%, #333 80%);
    border-radius: 50%;
    box-shadow: 0 3px 0 #111, inset 0 -2px 4px rgba(255,255,255,0.2);
    cursor: pointer;
    transition: all 0.1s ease-in-out;
  }

  .toggle-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #111, inset 0 2px 4px rgba(0,0,0,0.5);
    background: radial-gradient(circle at 30% 30%, #555 0%, #222 80%);
  }

  p {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--lcd-dark, #2d4739);
    margin: 0 0.5rem 0 auto;
  }
}



/* --- Minimal LCD mode for small screens --- */
@media (max-width: 600px) {
  body {
    background: var(--lcd-light, #c5dca0); /* Match the screen color */
    margin: 0;
  }

  .console {
    background: none;
    border: none;
    box-shadow: none;
    margin: 0;
    border-radius: 0;
  }

  .console-top,
  .console-bottom {
    display: none; /* Hide bezels */
  }

  main.screen {
    width: 100%;
    max-width: none;
    min-height: 100dvh;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 1rem;
  }

  /* Optional: put the nav links somewhere still accessible */
  .console nav {
    display: flex;
    justify-content: center;
    background: var(--lcd-dark, #2d4739);
    padding: 0.5rem;
  }

  .console nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .console nav a {
    background: var(--lcd-light, #c5dca0);
    border: 2px solid var(--lcd-dark, #2d4739);
    color: var(--lcd-dark, #2d4739);
    text-decoration: none;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
  }
}