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

:root {
--pbg: #ffffff;
--sbg: #f8f9fa;
--tbg: #f1f3f4;

--pcolor: #202124;
--scolor: #5f6368;

--br: #d0d0d0;
--br2: #c0c0c0;
--br3: #b0b0b0;
    
--bs: rgba(0, 0, 0, 0.3);
}

.dark-theme {
--pbg: #0f0f0f;
--sbg: #1a1a1a;
--tbg: #2d2d2d;

--pcolor: #e8eaed;
--scolor: #9aa0a6;

--br: #404040;
--br2: #505050;
--br3: #606060;
    
    --bs: rgba(255, 255, 255, 0.15);
}

body {
    background: var(--pbg);
    color: var(--pcolor);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

header{
  display: flex;
  justify-content: space-evenly;
  flex-direction: column;
  width:100%;
  height: 50px;
  padding: 2px;
  align-items: center;
  background: var(--sbg);
  color: var(--pcolor);
  z-index: 10;
  margin-bottom: 24px;
}

header h1{
  font-size: 2.4rem;
  padding: 3px;
}

#Hbtns{
  display: flex;
  width:100%;
}

#Hbtns button{
  flex:1;
  height: 25px;
  font-size: 18px;
  font-weight: 700;
  background: var(--tbg);
  color:var(--pcolor);
  border: 1px solid var(--br2);
}

a{
  text-decoration: none;
  color:var(--pcolor);
}

#Scontent {
  height: 350px;
  width: 260px;
  background: var(--sbg);
  border: 3px solid var(--br2);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  gap: 15px;
  align-items: center;
  padding: 15px 10px;
  box-shadow: 0 0 40px 10px var(--bs);  /* Changed this line */
  visibility: hidden;  
}

#SC1 {
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--br2);
  width: 80%;
  padding-bottom: 8px;
  font-size: 18px;
  font-weight: 700;
}

#Scontent button {
  flex: none;
  height: 32px;
  width: 90%;
  border: 1px solid var(--br2);
  background: var(--tbg);
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  color: var(--pcolor);
}

#Scontent button:hover {
  filter: brightness(1.1);
}

#Scontent #CButton {
  position: absolute;
  bottom: 12px;
  border: 2px solid var(--br2);
  background: red;
  color: white;
  font-weight: 900;
  width: 94%;
  height: 45px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;  
  justify-content: center;
}

#Scontent #CButton:hover {
  filter: brightness(1.2);
}

#game{
  background: var(--sbg);
    border: 1.5px solid var(--br2);
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    gap: 20px;
}

#P1, #P2{
  display: flex;
  gap:10px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  position: absolute;
  left:50%;
  transform: translate(-50%);
  width:auto;
  white-space: nowrap;
}

#P1 div{
  display: flex;
  gap:10px;
}

#P1 div button{
  width: 100px;
  height: 40px;
  border: 2px solid var(--br2);
  border-radius: 8px;
  background: var(--tbg);
  color: var(--pcolor);
  font-size: 18px;
  font-weight: 700;
}

#P2 p{
  font-style: italic;
  font-size: 1.2rem;
}

main{
    display: flex;
    flex-direction: column;
    gap:10px;
    border:2px solid var(--br);
    width:95%;
    padding: 12px 10px 15px 10px;
    margin: -5px 0 10px 0;
}


#Pstats{
  height: 350px;
  width: 260px;
  background: var(--sbg);
  border: 3px solid var(--br2);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  gap: 5px;
  align-items: center;
  padding: 15px 10px;
  box-shadow: 0 0 40px 10px var(--bs);  /* Changed this line */
  visibility: hidden;  
}

#Pstats h1{
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--br2);
  width: 80%;
  padding-bottom: 8px;
  font-size: 2rem;
  font-weight: 700;
}

#Pstats div:last-of-type{
  /*border: 1px solid var(--br3);*/
  width:98%;
  padding: 4px 7px 4px 7px;
  display: flex;
  flex-direction: column;
  gap:10px;
  font-size: 1.2rem;
}

#Cstats button{
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translate(-50%);
  border: 2px solid var(--br2);
  background: red;
  color: white;
  font-weight: 900;
  width: 94%;
  height: 45px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;  
  justify-content: center;
}

#btns{
  background: var(--sbg);
    border: 1.5px solid var(--br2);
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
  flex-direction: column;
    gap: 20px;
  height: auto;
}

#Stat{
  background: var(--tbg);
  width: 80%;
  height: 35px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  gap:10px;
  padding: 5px;
  border: 1px solid var(--br3);
}

#play, #history, #stats{
  width: 130px;
  height: 40px;
  border: 2px solid var(--br2);
  border-radius: 8px;
  background: var(--tbg);
  color: var(--pcolor);
  font-size: 18px;
  font-weight: 700;
}

#Phistory{
  height: 350px;
  width: 260px;
  background: var(--sbg);
  border: 3px solid var(--br2);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  gap: 5px;
  align-items: center;
  padding: 15px 10px;
  box-shadow: 0 0 40px 10px var(--bs);  /* Changed this line */
  visibility: hidden;  
}

#Phistory h1{
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--br2);
  width: 80%;
  padding-bottom: 8px;
  font-size: 2rem;
  font-weight: 700;
}

#Chistory button{
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translate(-50%);
  border: 2px solid var(--br2);
  background: red;
  color: white;
  font-weight: 900;
  width: 94%;
  height: 45px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;  
  justify-content: center;
}

#Hlist{
  overflow: scroll;
  display: flex;
  gap: 4px;
  flex-direction: column;
  width: 98%;
  min-height: 67%;
  border: 1px solid var(--br3);
  padding: 7px;
  font-size: 14px;
  font-weight: 800;
  font-style: italic;
  
}

#Presult{font-weight: 900;}

footer {
    text-align: center;
    color: var(--pcolor);
}