:root{
  --topic-color:#ff4d4d;
  --base-dark:#07111f;
}

body{
  margin:0;
  font-family:Poppins,sans-serif;
  background:
    radial-gradient(
      circle at top right,
      var(--topic-color) 0%,
      rgba(255,255,255,0) 35%
    ),
    linear-gradient(
      135deg,
      var(--base-dark),
      #111827
    );
 
  color:white;
  overflow-x:hidden;
  min-height:100vh;
  transition:background 0.6s ease;
}

.background-glow{
  position:fixed;
  width:700px;
  height:700px;
  background:var(--topic-color);
  filter:blur(160px);
  opacity:0.45;
  top:-250px;
  right:-250px;
  transition:background 0.6s ease;
}
 
header{
  padding:30px;
  text-align:center;
}
 
h1{
  margin:0;
  font-size:28px;
}
 
.screen{
  display:none;
  min-height:80vh;
  justify-content:center;
  align-items:center;
  padding:40px;
}
 
.screen.active{
  display:flex;
}
 
.hero-card,
.topic-card,
.writing-card,
.results-card{
  width:100%;
  max-width:900px;
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.08);
  border-radius:30px;
  padding:40px;
  backdrop-filter:blur(20px);
  box-shadow:0 20px 60px rgba(0,0,0,0.4);
}
 
.hero-card{
  text-align:center;
}
 
.hero-card h2{
  font-size:70px;
  margin:10px 0;
}
 
.hero-text{
  color:#cfd7e3;
  max-width:600px;
  margin:auto;
  line-height:1.7;
}
 
button,
.button-row a{
  background:white;
  color:black;
  border:none;
  padding:16px 30px;
  border-radius:100px;
  font-weight:600;
  cursor:pointer;
  text-decoration:none;
  display:inline-block;
  margin-top:20px;
}
 
.topic-card{
  text-align:center;
}
 
.topic-card h2{
  font-size:90px;
  letter-spacing:6px;
  animation:pulse 1s infinite alternate;
}
 
.final-topic{
  color:var(--topic-color);
}
 
@keyframes pulse{
  from{
    transform:scale(1);
  }
 
  to{
    transform:scale(1.05);
  }
}
 
.top-bar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:30px;
}
 
.timer-ring{
  width:100px;
  height:100px;
  border-radius:50%;
  border:6px solid #4d8dff;
  display:flex;
  justify-content:center;
  align-items:center;
  font-size:32px;
  font-weight:700;
}
 
.timer-ring.danger{
  border-color:#ff4d4d;
  animation:shake 0.5s infinite;
}
 
@keyframes shake{
  0%{transform:translateX(0);}
  25%{transform:translateX(-3px);}
  50%{transform:translateX(3px);}
  75%{transform:translateX(-3px);}
  100%{transform:translateX(0);}
}
 
.requirements{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
}
 
.req-box{
  background:rgba(255,255,255,0.05);
  border-radius:20px;
  padding:20px;
}
 
.word-pill,
.detected-pill{
  display:inline-block;
  padding:10px 14px;
  border-radius:100px;
  margin:5px;
  background:#2b3f5c;
}
 
.desc-pill{
  background:#3d3168;
}
 
.detected-pill{
  background:#1d4d8d;
}
 
.green{
  background:#1f7a4e;
}
 
textarea{
  width:100%;
  height:180px;
  border:none;
  border-radius:25px;
  padding:25px;
  margin-top:30px;
  font-size:20px;
  resize:none;
}
 
.live-detection{
  margin-top:30px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
}
 
.score-number{
  font-size:90px;
  font-weight:700;
  color:var(--topic-color);
}
 
.back-link{
  position:absolute;
  top:30px;
  left:30px;
  color:white;
  text-decoration:none;
}

.back-link{

  position:absolute;

  top:25px;

  left:25px;
 
  color:white;

  text-decoration:none;
 
  padding:12px 18px;
 
  border-radius:16px;
 
  background:rgba(255,255,255,0.08);
 
  border:1px solid rgba(255,255,255,0.12);
 
  backdrop-filter:blur(10px);
 
  transition:0.3s ease;

}
 
.back-link:hover{

  background:rgba(255,255,255,0.16);

  transform:translateY(-2px);

}
 
#gameScreen{

  align-items:flex-start;

}
 
.writing-card{

  animation:fadeInUp 0.6s ease;

}
 
@keyframes fadeInUp{
 
  from{

    opacity:0;

    transform:translateY(30px);

  }
 
  to{

    opacity:1;

    transform:translateY(0);

  }
 
}
.screen{
  display:none;
}
 
.screen.active{
  display: flex;
}
body{
  display:flex;
  flex-direction:column;
  align-items:center;
}
 
main{
  width:100%;
  display:flex;
  justify-content:center;
  align-items:center;
  padding:40px 20px;
  box-sizing:border-box;
}
 
.topic-card,
.writing-card,
.results-card{
  margin:auto;
}
 
header{
  width:100%;
  text-align:center;
}
 
.top-bar{
  width:100%;
}
 
.requirements{
  width:100%;
}
 
.live-detection{
  width:100%;
}
.writing-card{

  width:100%;

  max-width:900px;

  margin:auto;

  box-sizing:border-box;

}
 
textarea{

  box-sizing:border-box;

}
 .game-title{
  text-align:center;
  margin-bottom:30px;
}

.game-title h2{
  font-size:60px;
  margin-bottom:10px;
  letter-spacing:4px;
}

.game-title p{
  color:#d7d7d7;
}

.results-panel{
  margin-top:40px;
  display:none;
  background:rgba(255,255,255,0.05);
  padding:30px;
  border-radius:25px;
  text-align:center;
}

.score-big{
  font-size:80px;
  font-weight:700;
  color:var(--topic-color);
  margin:20px 0;
}
.big-box{
  width:100%;
}

.helper-section{
  margin-top:25px;
}

#toggleHelpers{
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.1);
  color:white;
  width:100%;
}

.helper-box{
  margin-top:15px;
  background:rgba(255,255,255,0.04);
  border-radius:20px;
  padding:20px;
  display:none;
}

.helper-box h3{
  margin-top:0;
  color:#d7d7d7;
}.single-column{
  display:block;
}

.big-box{
  width:100%;
  box-sizing:border-box;
}

.small-help{
  color:#cbd5e1;
  font-size:14px;
  margin-top:-5px;
  margin-bottom:15px;
}

.helper-section{
  margin-top:25px;
}

#toggleHelpers{
  width:100%;
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.12);
  color:white;
  padding:14px 20px;
  border-radius:18px;
  cursor:pointer;
}

.helper-box{
  display:none;
  margin-top:15px;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
  border-radius:22px;
  padding:20px;
}
.ready-btn{
  background:var(--topic-color);
  color:white;
  box-shadow:0 0 25px var(--topic-color);
}

.results-panel p{
  font-size:18px;
}