/* General Styles */
* {
  font-family: "Inter", sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
}

body {
  background-color: #2a2a2a;
  color: #e0e0e0;
  text-align: center;
  padding-top: 20px;
}

/* === removing default button style === */
.ptype-button {
  margin: 0;
  height: auto;
  background: transparent;
  padding: 0;
  border: none;
  cursor: pointer;
}

/* button styling */
.ptype-button {
  --border-right: 6px;
  --text-stroke-color: rgba(255, 255, 255, 0.6);
  --animation-color: #FFA500; /* Orange for animation */
  --fs-size: 2.5em;
  letter-spacing: 3px;
  text-decoration: none;
  font-size: var(--fs-size);
  font-family: "Arial", sans-serif;
  position: relative;
  color: transparent;
  -webkit-text-stroke: 1px var(--text-stroke-color);
  display: inline-block;
}

/* this is the text, when you hover on button */
.hover-text {
  position: absolute;
  box-sizing: border-box;
  content: attr(data-text);
  color: var(--animation-color);
  width: 0%;
  inset: 0;
  border-right: var(--border-right) solid var(--animation-color);
  overflow: hidden;
  transition: 0.5s;
  -webkit-text-stroke: 1px var(--animation-color);
}

/* hover */
.ptype-button:hover .hover-text {
  width: 100%;
  filter: drop-shadow(0 0 23px var(--animation-color));
}

/* Styling for the banner */
.banner {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px;
  background-color: #333; /* Example background */
}

.ptype-logo {
  text-decoration: none;
}


/* Banner Styles */
.banner {
  background: #343434;
  color: #e0e0e0;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #333;
}

.banner a {
  text-decoration: none;
  color: #e0e0e0;
  font-size: 1.25rem;
}

.banner a:hover {
  color: #f39c12;
  transition: color 0.3s ease-in-out;
}



/* Sub-Banner */
.sub-banner {
  margin: 30px auto;
  max-width: 80%;
  padding: 15px 20px;
  background-color: #1e1e1e;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.grid-item-font1, .grid-item-font2, .grid-item-font3, .grid-item-font4, 
.grid-item-font5, .grid-item-font6, .grid-item-font7, .grid-item-font8, 
.grid-item-font9, .grid-item-font10 {
    padding: 15px;
    background-color: #f4f4f4;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.grid-item-font1:hover, .grid-item-font2:hover, .grid-item-font3:hover, 
.grid-item-font4:hover, .grid-item-font5:hover, .grid-item-font6:hover, 
.grid-item-font7:hover, .grid-item-font8:hover, .grid-item-font9:hover, 
.grid-item-font10:hover {
    background-color: #e0e0e0;
}

/* Grid Containers */
.grid-container,
.grid-container2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 30px;
  padding: 20px;
  text-align: center;
}

/* Grid Items */
.grid-container div {
  background-color: #1e1e1e;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.grid-container2 div {
  background-color: #ffffff;
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  color: black;
}

.grid-container2 div:hover {
  background-color: #292929;
  transition: background-color 0.3s ease;
  color: white;
}

/* Specific Grid Items */
.grid-item-streaks,
.grid-item-stateliner,
.grid-item-tiger,
.grid-item-scalito,
.grid-item-skenes,
.grid-item-dunn,
.grid-item-johnp {
  display: flex;
  padding: 0.875em 2em;
  font-family: inherit;
  color: #fff;
  text-decoration: none;
  transition: background-color 0.3s;
  place-content: center;
  font-size: 22px
}
.grid-item-streaks {
  background: linear-gradient(90deg, #3f51b5, transparent) #0073ff;
}

.grid-item-streaks:hover,
.grid-item-streaks:focus {
  background-color: #ffffff;
  color: #2600ff;
}

.grid-item-stateliner {
  background: linear-gradient(90deg, maroon, transparent) #3a6d4d;
}

.grid-item-stateliner:hover,
.grid-item-stateliner:focus {
  background-color: #878787;
  color: rgb(202, 12, 12);
}

.grid-item-tiger {
  background: linear-gradient(90deg, rgb(0, 0, 0), transparent) #3a6d4d;
  color: #ec6600;
}

.grid-item-tiger:hover,
.grid-item-tiger:focus {
  background-color: #ff7b00;
  color: rgb(0, 0, 0);
}

.grid-item-skenes {
  background: linear-gradient(90deg, rgb(0, 0, 0), transparent) #3a6d4d;
  color: #fff000;
}

.grid-item-skenes:hover,
.grid-item-skenes:focus {
  background-color: #fff000;
  color: rgb(0, 0, 0);
}

.grid-item-dunn {
  background: linear-gradient(90deg, rgb(143, 0, 186), transparent) #3a6d4d;
  color: #fff000;
}

.grid-item-dunn:hover,
.grid-item-dunn:focus {
  background-color: #fff000;
  color: rgb(0, 0, 0);
}

.grid-item-johnp {
  background: linear-gradient(90deg, rgb(255, 82, 206), transparent) #3a6d4d;
  color: #ff75aa;
}

.grid-item-johnp:hover,
.grid-item-johnp:focus {
  background-color: #ff00cc;
  color: rgb(0, 0, 0);
}

/* Image Background Items */
.grid-item-scalito {
  background-image: url("img/scalito.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.grid-item-scalito:hover,
.grid-item-scalito:focus {
  color: rgb(255, 100, 100);
}

.grid-item-sweden {
  background-image: url("img/sweden.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: black;
}

.grid-item-sweden:hover,
.grid-item-sweden:focus {
  color: rgb(100, 255, 255);
}

.grid-item-freedom {
  background-image: url("img/freedom.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.grid-item-freedom:hover,
.grid-item-freedom:focus {
  color: rgb(45, 45, 45);
}





/* Font Styles */
.grid-item-font1 {
  font-family: 'Times New Roman', Times, serif;
  font-size: 20px;
}

.grid-item-font2 {
  font-family: monospace;
  font-size: 20px;
}

.grid-item-font3 {
  font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
  font-size: 20px;
}

.grid-item-font4 {
  font-family: "Eater", serif;
  font-weight: 400;
  font-style: normal;
}

.grid-item-font5 {
  font-family: "Bokor", system-ui;
  font-weight: 400;
  font-style: normal;
  font-size: 20px;
}

.grid-item-font6 {
  font-family: "Jaro", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-size: 30px;
}

.grid-item-font7 {
  font-family: "Lacquer", system-ui;
  font-weight: 400;
  font-style: normal;
  font-size: 30px;
}

.grid-item-font8 {
  font-family: "Press Start 2P", system-ui;
  font-weight: 400;
  font-style: normal;
}

.grid-item-font9 {
  font-family: "Rye", serif;
  font-weight: 400;
  font-style: normal;
  font-size: 25px;
}
.grid-item-font10 {
  font-family: "Rubik Moonrocks", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 30px
}
input[type="text"] {
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  border: none;
  border-bottom: 2px solid #444;
  background: transparent;
  color: #e0e0e0;
  outline: none;
}

input[type="text"]:focus {
  border-bottom: 2px solid #f39c12;
  transition: border-color 0.3s ease;
}

/* Screen Keyboard */
section.screen-keyboard-desktop {
  display: grid;
  grid-template-areas:
    "row1"
    "row2"
    "row3"
    "row4"
    "row5";
  gap: 8px;
  justify-content: center;
  margin: 20px auto;
}



.keys { 
  display: grid; 
  grid-gap: 5px; 
  /* Spacing between keys */ 
  grid-template-columns: repeat(15, 1fr); 
  /* 15 columns for layout flexibility */ 
  justify-content: center; 
} button { 
  width: 100%; /* Take full space within the grid cell */ 
  height: 50px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  font-family: "Open Sans", sans-serif; 
  font-size: 16px; 
  font-weight: 600; 
  color: #333; 
  background-color: #f39c12; 
  border: 2px solid #999; 
  border-radius: 5px; 
  cursor: pointer; 
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); 
} 
button.accent { 
  background-color: #f39c12; 
} 
button.active {
  background-color: green;
  color: white;
  box-shadow: 0 0 10px #2ed573;
}
button.special { 
  grid-column: span 2; 
 }
button.space { 
  grid-column: span 5; 
} 
button:disabled { 
  background: #ddd; cursor: not-allowed; 
} 
body { 
  background-color: #121212; 
  color: #eaeaea; 
  text-align: center; 
  padding-top: 20px;
} 

  .banner { 
    background: #1f1f1f;
    color: #eaeaea; 
    padding: 15px 20px;
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    border-bottom: 2px solid #333; 
  } 
.banner a { 
  color: #ff9800; 
  font-size: 1.5rem; 
  text-decoration: none; 
  font-weight: bold; 
} 
.banner a:hover {
   color: #ffd54f; 
   transition: color 0.3s ease-in-out; 
  } 


/* Typing Game container */
.typing-game { 
  margin: 20px auto; 
  max-width: 90%; 
  padding: 15px; 
  margin-top: 60px;
  position: relative; 
  background-color: #1e1e1e; 
  border-radius: 8px; 
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

/* Translucent overlay */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(147, 128, 128, 0.3);  /* Translucent black */
  cursor: pointer;
  z-index: 1;  /* Make sure the overlay is above the content */
}
.overlay-text {
  padding-top:20%;
  font-size: 24px;
  color: #ccc;  /* Gray text instead of bluish */
  font-weight: bold;
}
 #text-to-type { 
  font-size: 1.75rem; 
  color: #ff9800; 
  font-weight: bold; 
  text-align:left;
  position: relative;
  top: 0;
  left: 0;
  font-size: 23px;
  pointer-events: none; /* Prevent interaction with display text */
} 
#user-input {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 25px;
  color: transparent; /* Typing text color */
  background: transparent;
  outline: none; /* Remove outline for cleaner look */
  border: none; /* Remove border for clean look */
  width: 100%;
}
textarea { 
  width: 100%; 
  padding: 15px; 
  background: #1f1f1f; 
  color: #eaeaea; 
  border: 2px solid #333; 
  border-radius: 6px; 
  resize: none; 
  transition: border-color 0.3s ease;
 } 
 textarea:focus 
 { border-color: #ff9800; }


/* From Uiverse.io by thomas-m-njuguna */ 
.header {
  display: flex;
  justify-content: center;
  align-items: center;
  height: auto;
  background-color: #1e1e1e;
  margin: 0;
  border: 1px solid #ff9800;
  border-radius: 10px;
}
.Tbutton {
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: 5px;
  position: relative;
  transition: background-color 0.2s ease;
}
.Tbutton:hover .tooltip {
  background-color: rgba(255, 255, 255, 0.1);
  visibility: visible;
  opacity: 1;
}
.settings-btn {
  display: block;
  transition: transform 0.3s ease-in;
}
.settings-btn:hover {
  transform: rotate(60deg);
}
.settings-btn:active {
  animation: rot 1s linear infinite;
}
@keyframes rot {
  from {
    transform: rotate(-100deg);
  }
  to {
    transform: rotate(180deg);
  }
}
.tooltip {
  visibility: hidden;
  width: 120px;
  background-color: black;
  color: #ff9800;
  text-align: center;
  border-radius: 5px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -60px;
  opacity: 0;
  transition: opacity 0.3s;
}


.quoteButton{
  --😀: #ff9800;
  --😀😀: #4836bb;
  --😀😀😀: #FFA500;
  cursor: pointer;
  margin-top: 2rem;
  margin-left:40%;
  width: 184px;
  height: 48px;
  display: flex;
  align-items:center;
  display: flex;
  gap: 1rem;
  font-size: 1.125em;
  font-weight: 800;
  letter-spacing: 2px;
  color: #1e1e1e;
  background: var(--😀);
  border: 2px solid var(--😀😀);
  border-radius: .75rem;
  box-shadow: 0 8px 0 var(--😀😀);
  transform: skew(-10deg);
  transition: all .1s ease;
  filter: drop-shadow(0 2px 5px var(--😀😀😀));
  
}

.quoteButton:active {
  letter-spacing: 0px;
  transform: skew(-10deg) translateY(8px);
  box-shadow: 0 0 0 var(--😀😀😀);
}

.pButton{
  --😀: #ff9800;
  --😀😀: #4836bb;
  --😀😀😀: #FFA500;
  cursor: pointer;
  margin-top: 2rem;
  margin-left:40%;
  width: 184px;
  height: 48px;
  display: flex;
  align-items:center;
  text-decoration: none;
  display: flex;
  gap: 1rem;
  font-size: 1.125em;
  font-weight: 800;
  letter-spacing: 2px;
  color: #1e1e1e;
  background: var(--😀);
  border: 2px solid var(--😀😀);
  border-radius: .75rem;
  box-shadow: 0 8px 0 var(--😀😀);
  transform: skew(-10deg);
  transition: all .1s ease;
  filter: drop-shadow(0 2px 5px var(--😀😀😀));
}

.pButton:active {
  letter-spacing: 0px;
  transform: skew(-10deg) translateY(8px);
  box-shadow: 0 0 0 var(--😀😀😀);
}


.trRestart {
  font-size: 1.5rem;
  color: #ff9800;
  text-transform: uppercase;
  padding: 10px 20px;
  border-radius: 10px;
  border: 2px solid #ff9800;
  background: #252525;
  box-shadow: 3px 3px #ff9800;
  cursor: pointer;
  margin: 35px 0;
  width:20rem;
  display: inline-block;
}

.trRestart:active {
  box-shadow: none;
  transform: translate(3px, 3px);
}

.results-page
{
  margin-top: 5%;
  color: #ff9800;
}


.rounded-box {
  margin: 20px auto; 
  max-width: 90%; 
  padding:15px; 
  color: #ff9800; 
  position: relative;
  background-color: #1e1e1e; 
  border-radius: 8px; 
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}
.button-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px; /* Space between items */
}

.mode-group, 
.setting-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.checkBox {
  cursor: pointer;
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255, 255, 255, 0);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: 0px 0px 0px 2px #fff;
  margin-bottom: 5px; /* Space between checkbox and text */
}

.checkBox div {
  width: 60px;
  height: 60px;
  background-color: #fff;
  top: -52px;
  left: -52px;
  position: absolute;
  transform: rotateZ(45deg);
  z-index: 100;
}

.checkBox input[type=checkbox]:checked + div {
  left: -10px;
  top: -10px;
}

.checkBox input[type=checkbox] {
  position: absolute;
  left: 50px;
  visibility: hidden;
}

.transition {
  transition: 300ms ease;
}

h3 {
  color: #ff9800;
  text-align: center;
}
.score-bar-container {
  width: 80%; /* Full width of the parent container */
  height: 30px;
  background-color: #f3f3f3; /* Light gray background */
  border-radius: 18px; /* Rounded corners */
  border: 1px solid #ccc; /* Border color */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Optional shadow */
}

/* Styling for the score bar */
.score-bar {
  height: 100%;
  background: rgb(2,0,36);
  background: rgb(2,0,36);
  background: linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(255,0,0,1) 52%, rgba(255,166,0,1) 100%);
  text-align: center; /* Text in the middle */
  color: white;
  font-weight: bold;
  line-height: 30px; /* Vertically center text */
  transition: width 0.3s ease; /* Smooth transition for the width change */
}

/* Styling for the score display */
.scoreboard{
  margin-left:22.5%;
  margin-right:10%;
}
.score-display {
  font-size: 20px;
  margin: 10px 0;
}
#score{
  font-size: 40px;
  font-weight: bold;
}
.ranks
{
  text-align: left;
  font-size: 30px;
  margin-left:80px;
  font-weight: bolder;
}
#rank
{
  font-weight:1000;
  text-align: center;
  font-size:40px;
  border-radius: 8px;
  border-width: 3px;
  border-color: white;
  margin:30px;
  font-family: Arial, Helvetica, sans-serif
}
#rank-list1{
  color: red
}#rank-list2{
  color: rgb(255, 94, 0)
}#rank-list3{
  color: rgb(255,255,0)
}#rank-list4{
  color: rgb(26, 255, 0)
}#rank-list5{
  color: rgb(0, 157, 255)
}
#rank-list6{
  color: rgb(255, 0, 242);
}
#rank-list7{
  margin-bottom: 70px;
}
