* {
  box-sizing: border-box;
}

header {
  margin: 0;
  padding: 0;
}

span {
  /* Weird phone number detection fix */
  user-select: text;
  -webkit-touch-callout: none;
  -webkit-user-select: text;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  padding: 24px 16px 72px; /* space for header + footer */
  text-align: center;

  display: flex;
  flex-direction: column;
  align-items: center;

  min-height: 100vh;

  background: #f5f7fb;
  color: #111;
}

/* CENTER PAGE CONTENT */
body > div {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
}

/* GRID (keep yours, slightly improved) */
div.grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  max-width: 1400px;
  width: 100%;
}

/* CARD (improved spacing + hover) */
.card {
  min-width: 20rem;
  border-radius: 14px;
  padding: 15px;
  margin: 10px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

/* IMAGE */
img {
  border-radius: 8px;
  width: 100%;
  max-width: 650px;
  height: auto;
  max-height: 650px;
  object-fit: contain;
  padding: 5px;
  display: block;
  margin: 0 auto;
}

/* BUTTONS */
button {
  min-width: 160px;
  margin: 10px;
  padding: 12px 14px;
  background: #2FBF71;
  color: #0F3D2E;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.slider {
  -webkit-appearance: none;
  width: 100%;
  height: 15px;
  border-radius: 5px;  
  background: #d3d3d3;
  outline: none;
  opacity: 0.7;
  -webkit-transition: .2s;
  transition: opacity .2s;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 25px;
  height: 25px;
  border-radius: 50%; 
  background: #04AA6D;
  cursor: pointer;
}

.slider::-moz-range-thumb {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #04AA6D;
  cursor: pointer;
}

.slider:hover {
  opacity: 1;
}

input,
select {
  width: 100%;
  padding: 12px 14px;

  border-radius: 10px;
  border: 1px solid #D1D5DB;

  font-size: 1rem;
  background: #F9FAFB;

  box-sizing: border-box; /* VERY important */
}

.navbar {
  padding: 12px 24px;

  display: flex;
  justify-content: center;
  gap: 32px;

  background: #FFFFFF;
  border-radius: 16px;

  box-shadow: 0 6px 16px #D1D5DB;
}

.navbar a {
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;

  color: #0F3D2E;
  padding: 8px 14px;

  border-radius: 8px;
  transition: all 0.2s ease;
}

.navbar a:hover {
  background-color: #2FBF71;
  color: white;
}



.lb-card {
  display: flex;
  justify-content: space-between;
  align-items: center;

  background: #ffffff;
  border-radius: 18px;

  padding: 16px 20px;
  margin-bottom: 14px;

  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.06);

  transition: transform 0.15s ease;
}

.lb-card div{
  display: flex;
  align-items: center;
  gap: 14px;
}

.lb-card label {
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lb-card:hover {
  transform: translateY(-2px);
}

.rank {
  background: #f1f3f8;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 14px;
  color: #909090;
}

.avatar {
  width: 128px;
  height: 128px;
  border-radius: 33%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  padding: 0;
  margin: 0;
  border-radius: 0;
}

.info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bar-track {
  width: 320px;
  height: 6px;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #eaff00, #ff0000);
  border-radius: 999px;
}



/* SUBJECT DETAIL PAGE */

.subject-header {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.subject-image {
  width: 320px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
}

.rating-card {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 15px 20px;
  margin-bottom: 12px;

  border-radius: 12px;
  background: #f9fafb;

  border: 1px solid #e5e7eb;

  text-align: left;
}

.rating-score {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2FBF71;
}
