.hero,
.hero-body {
  position: relative
}

:root {
  --primary: #4361ee;
  --secondary: #3a0ca3;
  --accent: #f72585;
  --light: #f8f9fa;
  --dark: #212529;
  --gradient: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%)
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #fff;
  min-height: 100vh
}

.navbar-brand-title {
  font-weight: 700;
  font-size: 1.5rem;
  color: #fff
}

.hero {
  background: var(--gradient);
  color: #fff;
  overflow: hidden
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiPjxkZWZzPjxwYXR0ZXJuIGlkPSJwYXR0ZXJuIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHBhdHRlcm5UcmFuc2Zvcm09InJvdGF0ZSg0NSkiPjxyZWN0IHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0icmdiYSgyNTUsMjU1LDI1NSwwLjAzKSIvPjwvcGF0dGVybj48L2RlZnM+PHJlY3QgZmlsbD0idXJsKCNwYXR0ZXJuKSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIvPjwvc3ZnPg==')
}

.hero-body {
  z-index: 1
}

.footer {
  background: var(--dark);
  color: #fff;
  padding: 3rem 1.5rem
}

.result-container,
.stat-box {
  background: var(--light);
  text-align: center
}

.typing-container {
  padding-top: 20px;
  margin-top: 100px;
  margin-bottom: 30px
}

.typing-input {
  width: 50%;
  font-size: 1.4rem;
  padding: 1rem;
  border: 2px solid #dee2e6;
  border-radius: 12px;
  outline: 0;
  transition: .3s;
  text-align: center;
  margin: 0 auto 1.5rem;
  display: block
}

.typing-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(67, 97, 238, .15)
}

.typing-input.correct {
  background-color: rgba(40, 167, 69, .08);
  border-color: rgba(40, 167, 69, .4)
}

.typing-input.incorrect {
  background-color: rgba(220, 53, 69, .08);
  border-color: rgba(220, 53, 69, .4)
}

.stats-container {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 2rem 0;
  flex-wrap: wrap
}

.stat-box {
  border-radius: 12px;
  padding: 1.5rem;
  min-width: 140px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .05);
  transition: transform .3s
}

.stat-box:hover {
  transform: translateY(-5px)
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .5rem
}

.stat-label {
  font-size: 1rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600
}

.sentence-display {
  font-size: 2rem
}

.timer-display {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--secondary);
  text-align: center;
  margin: 1rem 0
}

.result-container {
  display: none;
  margin-top: 2rem;
  padding: 2rem;
  border-radius: 16px
}

.result-title {
  font-size: 2rem;
  color: var(--dark);
  margin-bottom: 1.5rem
}

.progress-container {
  margin: 2rem 0
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: .5rem;
  font-weight: 500;
  color: var(--dark)
}

.progress-bar {
  height: 12px;
  background: #e9ecef;
  border-radius: 10px;
  overflow: hidden
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  border-radius: 10px;
  transition: width .5s ease-in-out
}

.typing-hint {
  color: #6c757d;
  text-align: center;
  margin-top: 1rem;
  font-style: italic
}

.pulse {
  animation: 1.5s infinite pulse
}

.fade-in {
  animation: .5s forwards fadeIn
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

@media (max-width:768px) {
  .sentence-display {
    font-size: 1.4rem;
    min-height: 100px
  }

  .typing-input {
    font-size: 1.2rem
  }

  .stat-value {
    font-size: 2rem
  }

  .stat-box {
    min-width: 110px;
    padding: 1rem
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1
  }

  50% {
    transform: scale(1.05);
    opacity: .8
  }
}

.fade-in {
  opacity: 1;
  transition: opacity 0.5s ease-in;
}

.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

.navbar-item:hover {
  background-color: transparent !important;
}
.typing-hero {
    display: grid;
    place-items: center;
    min-height: 60vh;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #2b5876 0%, #4e4376 100%);
    color: white;
  }
  
  .typing-hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
  }
  
  .typing-title {
    font-size: clamp(1.75rem, 5vw, 3rem);
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  }
  
  .typing-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    line-height: 1.5;
    margin-bottom: 2rem;
    opacity: 0.9;
  }
  
  .typing-cta {
    background: white;
    color: #4e4376;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 50px;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s;
  }
  
  .typing-cta:hover {
    transform: translateY(-2px);
  }
  
  /* Animation only when reduced-motion isn't preferred */
  @media (prefers-reduced-motion: no-preference) {
    .pulse {
      animation: pulse 2s infinite;
    }
  }
  
  @keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.7); }
    70% { box-shadow: 0 0 0 12px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
  }