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

body {
  background: #eef3f8;
  color: #1f2937;
}

.top-header {
  height: 60px;
  background: linear-gradient(135deg, #1e3a8a, #0284c7);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
}

.exam-title {
  font-size: 20px;
  font-weight: bold;
}

.top-actions button {
  border: none;
  background: rgba(255,255,255,0.18);
  color: white;
  padding: 9px 14px;
  border-radius: 8px;
  margin-left: 8px;
  cursor: pointer;
}

.exam-container {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 20px;
  padding: 20px;
}

.question-area {
  background: white;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

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

.timer {
  background: #fee2e2;
  color: #991b1b;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: bold;
}

.marking {
  margin-top: 15px;
  background: #f8fafc;
  padding: 12px;
  border-radius: 10px;
}

.language-box {
  margin-top: 15px;
  text-align: right;
}

.language-box select {
  padding: 7px;
  border-radius: 8px;
}

.question-card {
  margin-top: 25px;
}

.question-text {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 25px;
}

.option {
  display: block;
  padding: 16px;
  margin-bottom: 13px;
  background: #f8fafc;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  cursor: pointer;
  font-size: 18px;
}

.option:hover {
  border-color: #0284c7;
  background: #e0f2fe;
}

.option input {
  margin-right: 12px;
}

.bottom-buttons {
  margin-top: 35px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.bottom-buttons button,
.submit-btn {
  border: none;
  padding: 13px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
}

.clear-btn {
  background: #e5e7eb;
}

.review-btn {
  background: #7c3aed;
  color: white;
}

.next-btn {
  background: #16a34a;
  color: white;
  margin-left: auto;
}

.side-panel {
  background: white;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.profile-box {
  text-align: center;
  padding-bottom: 15px;
  border-bottom: 1px solid #e5e7eb;
}

.avatar {
  font-size: 55px;
}

.legend {
  margin: 18px 0;
}

.legend div {
  margin-bottom: 12px;
  font-size: 15px;
}

.badge {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  color: white;
  border-radius: 10px;
  margin-right: 8px;
  font-weight: bold;
}

.answered {
  background: #22c55e;
}

.not-answered {
  background: #f97316;
}

.not-visited {
  background: #cbd5e1;
  color: #111827;
}

.review {
  background: #7c3aed;
}

.choose-title {
  background: #0284c7;
  color: white;
  padding: 12px;
  border-radius: 10px;
  font-size: 17px;
  margin-bottom: 15px;
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.q-btn {
  height: 46px;
  border: none;
  border-radius: 10px;
  background: #e5e7eb;
  cursor: pointer;
  font-weight: bold;
}

.q-btn.active {
  background: #f97316;
  color: white;
}

.submit-btn {
  margin-top: 20px;
  width: 100%;
  background: #dc2626;
  color: white;
}

@media (max-width: 900px) {
  .exam-container {
    grid-template-columns: 1fr;
  }

  .next-btn {
    margin-left: 0;
  }

  .top-header {
    height: auto;
    padding: 15px;
    flex-direction: column;
    gap: 10px;
  }
}

.q-btn.answered {
  background: #22c55e;
  color: white;
}

.q-btn.not-answered {
  background: #f97316;
  color: white;
}

.q-btn.not-visited {
  background: #e5e7eb;
  color: black;
}

.q-btn.review {
  background: #7c3aed;
  color: white;
}
.result-page{
  width:100%;
  min-height:100vh;
  display:flex;
  justify-content:center;
  align-items:center;
  background:#0f172a;
  padding:30px;
}

.result-card{
  width:100%;
  max-width:700px;
  background:white;
  border-radius:20px;
  padding:40px;
  text-align:center;
  box-shadow:0 10px 30px rgba(0,0,0,0.2);
}

.result-card h1{
  font-size:40px;
  margin-bottom:30px;
  color:#111827;
}

.score-circle{
  width:180px;
  height:180px;
  background:#2563eb;
  color:white;
  border-radius:50%;
  display:flex;
  justify-content:center;
  align-items:center;
  margin:0 auto 40px;
  font-size:45px;
  font-weight:bold;
}

.result-stats{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:20px;
  margin-bottom:30px;
}

.stat{
  background:#f3f4f6;
  padding:20px;
  border-radius:15px;
}

.stat h2{
  font-size:35px;
  color:#2563eb;
}

.stat p{
  margin-top:10px;
  color:#374151;
}

.result-card button{
  padding:15px 30px;
  border:none;
  border-radius:10px;
  background:#2563eb;
  color:white;
  font-size:18px;
  cursor:pointer;
}
.review-page{
  min-height:100vh;
  background:#f1f5f9;
  padding:30px;
}

.review-page h1{
  text-align:center;
  margin-bottom:25px;
  color:#1e3a8a;
}

.review-card{
  background:white;
  padding:20px;
  margin-bottom:15px;
  border-radius:14px;
  box-shadow:0 5px 15px rgba(0,0,0,0.08);
}

.review-card h3{
  margin-bottom:12px;
  color:#111827;
}

.review-card p{
  margin-bottom:8px;
  font-size:16px;
}

.back-btn{
  display:block;
  margin:30px auto;
  padding:14px 28px;
  border:none;
  border-radius:10px;
  background:#2563eb;
  color:white;
  font-size:17px;
  cursor:pointer;
}
.dark-mode{
  background:#0f172a;
  color:white;
}

.dark-mode .question-area,
.dark-mode .side-panel,
.dark-mode .question-card,
.dark-mode .profile-box,
.dark-mode .result-card,
.dark-mode .review-card{
  background:#1e293b;
  color:white;
}

.dark-mode .option{
  background:#334155;
  color:white;
}

.dark-mode .option:hover{
  background:#475569;
}

.dark-mode .question-grid button{
  background:#334155;
  color:white;
}

.dark-mode .stat{
  background:#334155;
  color:white;
}

.dark-mode .stat p{
  color:#cbd5e1;
}

.dark-mode .review-page{
  background:#0f172a;
}

.q-btn.answered{
  background:#22c55e !important;
  color:white !important;
}

.q-btn.not-answered{
  background:#f97316 !important;
  color:white !important;
}

.q-btn.not-visited{
  background:#e5e7eb !important;
  color:black !important;
}

.q-btn.review{
  background:#7c3aed !important;
  color:white !important;
}

.q-btn.active{
  outline:3px solid #111827;
}

@media print {
  body {
    background: white !important;
  }

  button {
    display: none !important;
  }

  .result-page {
    background: white !important;
  }

  .result-card {
    box-shadow: none !important;
    border: 1px solid #ddd;
  }
}
.bookmark-btn{
  background:#facc15;
  color:black;
}

.report-btn{
  background:#ef4444;
}