*{
  box-sizing:border-box;
}

:root{
  --bg:#0f172a;
  --card:#1e293b;
  --card2:#334155;
  --text:#e2e8f0;
  --accent:#3b82f6;
  --border:rgba(255,255,255,0.08);
}

.light{
  --bg:#f1f5f9;
  --card:#ffffff;
  --card2:#e2e8f0;
  --text:#0f172a;
  --accent:#2563eb;
  --border:rgba(0,0,0,0.08);
}

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:Segoe UI,sans-serif;
  line-height:1.6;
  transition:0.3s;
}

.container{
  max-width:1100px;
  margin:auto;
  padding:20px;
}

.hero{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  margin-bottom:20px;
}

.hero h1{
  margin:0;
  font-size:2.5rem;
}

.top-actions{
  display:flex;
  gap:10px;
}

button{
  border:none;
  background:var(--accent);
  color:white;
  padding:11px 16px;
  border-radius:12px;
  cursor:pointer;
  font-weight:600;
}

.sticky-tools{
  position:sticky;
  top:0;
  z-index:10;
  display:flex;
  gap:12px;
  margin-bottom:20px;
  background:var(--bg);
  padding:10px 0;
}

#searchInput{
  flex:1;
  padding:14px;
  border:none;
  border-radius:14px;
  background:var(--card);
  color:var(--text);
}

.timer-wrap{
  display:flex;
  gap:10px;
  align-items:center;
}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:20px;
  padding:22px;
  margin-bottom:20px;
}

.progress-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.progress-bar{
  height:18px;
  background:var(--card2);
  border-radius:20px;
  overflow:hidden;
  margin-top:14px;
}

.progress-fill{
  height:100%;
  width:0%;
  background:linear-gradient(to right,#22c55e,#3b82f6);
}

.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
  gap:14px;
}

.mini-card{
  background:var(--card2);
  padding:16px;
  border-radius:16px;
}

.tip{
  margin-top:18px;
  background:rgba(59,130,246,0.15);
  padding:14px;
  border-left:4px solid var(--accent);
  border-radius:12px;
}

.scenario-box{
  background:var(--card2);
  padding:18px;
  border-radius:16px;
  margin-bottom:14px;
}

.scenario-points{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:16px;
}

.scenario-points span{
  background:rgba(59,130,246,0.18);
  padding:8px 12px;
  border-radius:999px;
}

.topic-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:20px;
}

.topic-btn.active{
  outline:2px solid white;
}

.flashcard{
  background:var(--card2);
  border-radius:18px;
  padding:18px;
  margin-bottom:14px;
  cursor:pointer;
}

.flashcard p{
  margin:0;
}

.answer{
  margin-top:14px;
  display:none;
  color:#93c5fd;
}

.flashcard.revealed .answer{
  display:block;
}

@media(max-width:768px){

  .hero{
    flex-direction:column;
    align-items:flex-start;
  }

  .sticky-tools{
    flex-direction:column;
  }

  .timer-wrap{
    justify-content:space-between;
  }

  .hero h1{
    font-size:2rem;
  }

  .container{
    padding:14px;
  }
}
