.grade-tool {
  max-width:680px;
  margin:40px auto;
  padding:25px;
  font-family:system-ui, -apple-system, sans-serif;
  background:#ffffff;
  border-radius:16px;
  box-shadow:0 10px 25px rgba(0,0,0,0.08);
  transition:0.3s;
}

.grade-tool:hover {
  transform:translateY(-2px);
}

h1 {
  text-align:center;
  margin-bottom:20px;
  font-size:26px;
}

.grid {
  display:flex;
  gap:12px;
}

.grid input {
  flex:1;
  padding:12px;
  border-radius:10px;
  border:1px solid #ddd;
  font-size:16px;
  transition:0.2s;
}

.grid input:focus {
  border-color:#2563eb;
  box-shadow:0 0 0 3px rgba(37,99,235,0.15);
  outline:none;
}

/* RESULT CARD */
.result {
  margin-top:18px;
  padding:14px;
  border-radius:10px;
  font-weight:600;
  text-align:center;
  background:#f1f5f9;
  transition:0.3s;
}

/* PROGRESS BAR */
.progress-wrap {
  height:10px;
  background:#e5e7eb;
  border-radius:10px;
  margin:15px 0;
  overflow:hidden;
}

#progress-bar {
  height:100%;
  width:0%;
  background:linear-gradient(90deg,#22c55e,#2563eb);
  transition:width 0.4s ease;
}

/* TABLE */
table {
  width:100%;
  border-collapse:collapse;
  margin-top:15px;
  font-size:14px;
}

th {
  background:#2563eb;
  color:white;
  padding:10px;
}

td {
  padding:10px;
  border-bottom:1px solid #eee;
  text-align:center;
}

tr:nth-child(even) {
  background:#f8fafc;
}

tr:hover {
  background:#eef2ff;
  transition:0.2s;
}

/* GRADE COLORS */
.grade-A { background:#dcfce7; color:#166534; }
.grade-B { background:#dbeafe; color:#1e40af; }
.grade-C { background:#fef9c3; color:#854d0e; }
.grade-D { background:#ffedd5; color:#9a3412; }
.grade-F { background:#fee2e2; color:#991b1b; }

/* MOBILE */
@media(max-width:600px){
  .grid {
    flex-direction:column;
  }
}