@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  min-height: 100vh;
  height: 100vh;
  width: 100vw;
  padding: 0;
  margin: 0;
  color: #fff;
  background: transparent;
  position: relative;
}

body::after {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);  /* Slight overlay */
  backdrop-filter: blur(4px);   /* Light blur */
  z-index: -1;
}


#background-video {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -2;
  pointer-events: none;
  opacity: 1;
  filter: none;
}

/* Navbar */
.header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  padding: 20px 40px;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 100;
}


.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 24px;
  font-weight: 600;
  color: white;
  text-decoration: none;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-links a {
  color: #ffffff;
  text-decoration: none;
  margin-left: 30px;
  font-size: 18px;
  font-weight: 500;
  position: relative;
  transition: color 0.3s, transform 0.3s;
  display: inline-block;
}

/* Underline effect */
.nav-links a::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  left: 0;
  bottom: -6px;
  background: #00e6e6;
  border-radius: 5px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease;
}

.nav-links a:hover {
  color: #00e6e6;
  transform: scale(1.1);
}

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Main App Container */
.wrapper {
  width: 100vw !important;
  min-height: 100vh !important;
  height: 100vh;
  max-width: 100vw !important;
  max-height: 100vh !important;
  box-sizing: border-box;
  padding: 40px 26px;
  padding-top: 120px;
  padding-bottom: 80px;
  background: rgba(20, 20, 30, 0.6);
  border-radius: 0; /* Remove rounded corners if you want true edge-to-edge */
  box-shadow: none;
  margin: 0;
  position: relative;
  backdrop-filter: blur(8px);
  transition: box-shadow 0.4s;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
/* Invisible input for typing */
.wrapper .input-field {
  opacity: 0;
  z-index: -999;
  position: absolute;
}

/* Paragraph styling */
.content-box .typing-text {
  max-height: 400px;
  min-height: 200px;
  margin-bottom: 14px;
  overflow: auto;
}

.typing-text::-webkit-scrollbar {
  width: 0;
}

.typing-text p {
  font-size: 21px;
  color: #fff;
  letter-spacing: 1px;
  text-align: justify;
  word-break: break-all;
  line-height: 1.8;
}


/* Typing color logic */
.typing-text p {
  font-size: 24px;
  line-height: 2;
}
.typing-text p span {
  position: relative;
  transition: color 0.2s;
}

.typing-text p span.correct {
  color: #8aff8a;
}

.typing-text p span.incorrect {
  color: #ff5e5e;
  border-radius: 2px;
  background: #32000044;
}

.typing-text p span.active {
  color: #17A2B8;
}

.typing-text p span.active::before {
  position: absolute;
  content: "";
  height: 2px;
  width: 100%;
  bottom: 0;
  left: 0;
  opacity: 1;
  border-radius: 5px;
  background: #00e6e6;
  animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Glass border for focus area */
.wrapper .content-box {
  min-height: 400px;
  padding: 32px 48px 10px;
  border-radius: 16px;
  border: 2px solid #00e6e6;
  box-shadow: 0 3px 16px rgba(0,230,230,0.09);
  background: rgba(23,25,40,0.3);
}

/* Stat/result bar */
.content-box .content {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  border-top: 3px solid #00e6e6;
  padding: 16px 0 0 0;
}

/* Try Again Button */
.content button {
  position: relative;
  outline: none;
  border: none;
  width: 120px;
  color: #00e6e6;
  background: transparent;
  padding: 11px 0;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 15px;
  box-shadow: 0 2px 4px rgba(0,230,230,0.13);
  border: 3px solid #00e6e6;
  transition: background 0.25s, color 0.25s, transform 0.15s;
}

.content button:active {
  transform: scale(0.95);
}

.content button:hover {
  background: transparent;
  color: #fff;
  box-shadow: 0 0 1px #00e6e6, 0 0 5px #00e6e6;
  transform: scale(1.03);
}

/* Result details (WPM, CPM...) */
.content .result-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: calc(100% - 140px);
  justify-content: space-between;
}

.result-details li {
  display: flex;
  list-style: none;
  align-items: center;
  margin-right: 18px;
  font-size: 15px;
  color: #abb8c3;
  padding-left: 0;
}

.result-details li:not(:first-child) {
  padding-left: 22px;
  border-left: 2px solid #bfbfbf66;
}

.result-details li p {
  margin: 0;
  font-size: 14px;
}

.result-details li span {
  font-size: 15px;
  margin-left: 10px;
  font-weight: 600;
}

li span b {
  font-weight: 600;
}

/* Responsive */
@media (max-width: 745px) {
  .wrapper {
    padding: 18px 5px;
    width: 99vw;
  }
  .content-box .typing-text {
    max-height: unset;
  }
  .typing-text p {
    font-size: 17px;
    text-align: left;
  }
  .content button {
    width: 100%;
    font-size: 16px;
    padding: 13px 0;
    margin-top: 18px;
  }
  .content .result-details {
    width: 100%;
    justify-content: space-between;
  }
  .result-details li:not(:first-child) {
    border-left: 0;
    padding: 0;
  }
  .result-details li p,
  .result-details li span {
    font-size: 15px;
  }
}

@media (max-width: 520px) {
  .wrapper .content-box {
    padding: 9px 6px 0;
  }
  .typing-text p {
    font-size: 12px;
  }
  .result-details li {
    margin-bottom: 12px;
  }
  .content button {
    margin-top: 12px;
  }
}

