*{
    box-sizing: border-box;
    font-family: 'Comic Sans MS';
    margin: 0;
}

html{
    margin: 0;
    min-height: 100vh;
    background-color: #08081A;
    background-image: 
        /* Top-Left Glow */
        radial-gradient(circle at 15% 15%, rgba(92, 82, 245, 0.15) 0%, transparent 40%),
        
        /* Center/Main Glow */
        radial-gradient(circle at 80% 80%, rgba(120, 80, 240, 0.25) 0%, transparent 50%);
    
    background-repeat: no-repeat;
}

h1{
    color: #A176F7;
    text-align: center;
    margin-top: 4rem;
    font-size: 4rem;
}

p{
    color: #fff;
    text-align: center;
    margin: 1rem 0;
    font-size: 1.5rem;
}

.board{
    display: grid;
    justify-content: center;
    align-items: center;
    grid-template-columns:repeat(3, auto);
}

.cell{
    width: 8rem;
    height: 8rem;
    border: .1rem solid #eee;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.circle:before{
    content: 'O';
    font-size: 3rem;
}

.circle{
    color: #746bfc;
}

.x:before{
    content: 'X';
    font-size: 3rem;
}

.x{
    color: #c273ff;
}

.result{
    display: none;
    position: fixed;
    inset: 0; /* top: 0; bottom: 0; left: 0; right: 0; */
    background: rgba(44, 26, 44, 90%);
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 3rem;
    flex-direction: column;
    gap: 2rem;
}

.result.show{
    display: flex;
}

.result button {
  font-size: 2rem;
  background: linear-gradient(
    90deg, #5C52F5 0%, #B258F6 50%, #5C52F5 100%);
  background-size: 200% 100%;
  background-position: 0% 0%;
  color: #fff;
  border: .1rem solid #000;
  border-radius: .5rem;
  padding: .4rem .1rem;
  cursor: pointer;
}

.result button:hover {
  animation: continuousFlow 4s linear infinite;
  color: #fff;
  border-color: #1A1942;
}

@keyframes continuousFlow {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: -200% 0%;
  }
}

.back-toggle {
  position: absolute;
  top: 8px;
  left: 12px;
  z-index: 1100;
  background: #282f42;
  border: 1px solid #3b435e;;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 1;
}

.back-toggle:hover {
  background: #3b435e;;
}