:root {
    --cell-size: 4rem;
    --light-color: white;
    --dark-color: black;
    --background-radial-percent: 70%;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 10px rgba(0,255,255,0.4); }
  50% { box-shadow: 0 0 18px rgba(0,255,255,0.7); }
  100% { box-shadow: 0 0 10px rgba(0,255,255,0.4); }
}

body {
    background: #141E30;  /* fallback for old browsers */
    background: hsla(0, 0%, 0%, 1);
    background: radial-gradient(circle, hsla(0, 0%, 0%, 1) 0%, hsla(219, 41%, 13%, 1) var(--background-radial-percent));
    background: -moz-radial-gradient(circle, hsla(0, 0%, 0%, 1) 0%, hsla(219, 41%, 13%, 1) var(--background-radial-percent));
    background: -webkit-radial-gradient(circle, hsla(0, 0%, 0%, 1) 0%, hsla(219, 41%, 13%, 1) var(--background-radial-percent));

    filter: progid: DXImageTransform.Microsoft.gradient( startColorstr="#000000", endColorstr="#141E30", GradientType=1 );

    display: flex;
    justify-content: center;  /* horizontal centering */
    align-items: center;      /* vertical centering */
    height: 100vh;            /* make body full height */
    margin: 0;                /* remove default margin */
}

#board {
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, var(--cell-size));
    grid-template-rows: repeat(5, var(--cell-size));

    gap: 0; /* we'll use borders instead */
    background: #ad5389;  /* fallback for old browsers */
    background: -webkit-linear-gradient(to right, #3c1053, #ad5389);  /* Chrome 10-25, Safari 5.1-6 */
    background: linear-gradient(to right, #3c1053, #ad5389); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */

    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow:
        0 0 12px rgba(0, 255, 255, 0.4),
        0 0 24px rgba(150, 0, 255, 0.25),
        inset 0 0 12px rgba(255, 255, 255, 0.1);
    border-radius: 8px; /* optional, looks more "techno" */
    animation: pulseGlow 3.5s ease-in-out infinite;
}

.audiowide-regular {
  font-family: "Audiowide", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.puzzle-container {
  display: flex;
  flex-direction: column;
  align-items: center;    /* center children horizontally */
  margin: 0 auto;         /* center the container itself if it has intrinsic width */
  gap: 16px;              /* spacing between title and board */
  width: fit-content;     /* shrink-wrap to board width */
}

/* keep your existing h1 rules, or scope them */
.puzzle-container h1 {
  text-align: center;
  margin: 0;
}

h1 {
    font-style: italic;
    font-size: 1.3rem;
    text-align: center;
    color: #cfcfcf;
    text-shadow: 0 0 8px rgba(0,255,255,0.6);
    letter-spacing: 1px;

}

.token {
    background-color: #17A398;
    width: 60%;
    height: 60%;
    border-radius: 50%;
    margin: auto;
    position: relative;
    top: 20%;
}

#player-token {
    background-color: #EE6C4D;
    cursor: grab;
    touch-action: none;
}

.cell {
    width: var(--cell-size);
    height: var(--cell-size);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-sizing: border-box;  /* ensures borders don't expand cells */
}

.dark {
    background-color: var(--dark-color);
}

.light {
    background-color: var(--light-color);
}