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

body,
html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;

  background: #0a0a0a;
  color: white;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 20px;
  line-height: 1.6;
}

.container {
  max-width: 1200px; /* 1000px ko 1200px ya isse jyada kar dein */
  width: 100%;
  background: #111111;
  border-radius: 16px;
  border: 1px solid #222222;
  padding: 48px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.header {
  text-align: center;
  margin-bottom: 48px;
}

.title {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.subtitle {
  color: #888888;
  font-size: 1rem;
  font-weight: 400;
}

.stats-grid {
  display: flex;
  justify-content: space-between; /* This will spread the items out */
  align-items: center;
  gap: 24px;
  margin-bottom: 48px;
  flex-wrap: wrap; /* This ensures items wrap to the next line on smaller screens */
}

.stat-card {
  background: #1a1a1a;
  border: 1px solid #333333;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.stat-card:hover {
  border-color: #444444;
  transform: translateY(-2px);
}

.stat-icon {
  font-size: 1.5rem;
  color: #666666;
  margin-bottom: 12px;
  display: block;
}

.stat-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
  line-height: 1;
}

.stat-label {
  font-size: 0.9rem;
  color: #888888;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
  font-weight: 500;
}

.progress-container{
    margin-bottom: 32px;
}

.progress-bar{
    height: 4px;
    background: #222222;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill{
    height: 100%;
    background: white;
    border-radius: 2px;
    transition: width .3s ease;
    width: 0%;
}

.progress-text{
    font-size: 0.9rem;
    color: #666666;
    text-align: center;
}

.text-container{
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    font-size: 1.125rem;
    line-height: 1.8;
    font-family: 'SF Mono',Monaco 'Cascadia Code',monospace;
    position: relative;
    min-height: 120px;
    display: flex;
    align-items: center;
}

.text-content{
    width: 100%;
}

.char{
    position: relative;
    transition: all .15s ease;
}

.char.correct{
    color: white;
    background: rgba(34,197,94,.2);
}

.char.incorrect{
    color: white;
    background: rgba(239, 63,63, .3);
}

.char.current{
    background: white;
    color: #000000;
    animation: pulse 1s infinite;
}
.char.pending{
    color: #666666;
}

@keyframes pulse {
    0%,50%{opacity: 1;}
    51%,100%{opacity: .7;}
}

.input-section{
    margin-bottom: 32px;
}

.typing-input{
    width: 100%;
    padding: 16px;
    font-size: 1.125rem;
    background: #1a1a1a;
    border: 2px solid #333333;
    border-radius: 12px;
    color: white;
    outline: none;
    transition: all .3s ease;
    font-family:'SF Mono',Monaco 'Cascadia Code',monospace ;
}

.typing-input:focus{
    border-color: white;
}

.typing-input:disabled{
    opacity: .5;
    cursor: not-allowed;
}

.controls{
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding:12px 24px;
    font-size: .95rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all .2s ease;
    text-decoration: none;
    outline: none;
}

.btn-primary{
    background: white;
    color: black;
}
.btn-primary:hover{
    background: #f0f0f0;
    transform: translateY(-1px);
}
.btn-secondary{
    background: transparent;
    color: white;
    border: 1px solid #333333;
}
.btn-secondary:hover{
    background: #666666;
    transform: translateY(-1px);
}

.timer{
    position: fixed;
    top: 32px;
    right: 32px;
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: .95rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1000;
}


.results-modal {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px; /* Adjust width as needed */
  height: 100%;
  background: #111111;
  border-left: 1px solid #222222;
  padding: 48px 24px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
}

.results-modal.active {
  transform: translateX(0);
}

.results-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.results-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  text-align: center;
}

.results-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 24px;
}

.results-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: white;
}

.results-stat-label {
  font-size: 0.9rem;
  color: #888888;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
  font-weight: 500;
}