body {
    background-color: #f4f7fa;
    font-family: "Segoe UI", Roboto, sans-serif;
}

.navbar-brand {
    font-size: 1.5rem;
}

/* -------------------- Form Card -------------------- */
.form-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 3rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.form-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.form-title {
    font-weight: 600;
    color: #0d6efd;
}

/* -------------------- Buttons -------------------- */
.btn-primary {
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #6610f2, #0d6efd);
}

/* -------------------- Footer -------------------- */
footer {
    font-size: 0.9rem;
    color: #555;
}

/* -------------------- Rating Badges -------------------- */
.badge {
    font-size: 0.85rem;
    padding: 0.4em 0.75em;
    border-radius: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Explicit grade colors (used in result.html) */
.grade-green {
    background-color: #28a745 !important; /* Bootstrap success green */
    color: #fff !important;
}

.grade-amber {
    background-color: #ffc107 !important; /* Bootstrap warning amber */
    color: #212529 !important;
}

.grade-red {
    background-color: #dc3545 !important; /* Bootstrap danger red */
    color: #fff !important;
}

/* -------------------- Section Cards -------------------- */
.card-hover {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

.card-grade {
    font-size: 0.9rem;
    padding: 0.35em 0.6em;
    border-radius: 0.4rem;
}

/* -------------------- Responsive tweaks -------------------- */
@media (max-width: 576px) {
    .form-card {
        margin-top: 1rem;
        padding: 1.5rem;
    }
}

.loader {
  width: 90px;
  height: 14px;
  box-shadow: 0 3px 0 #fff;
  background: linear-gradient(#fff 0 0) 50%/2px 100% no-repeat;
  display: grid;
}
.loader:before,
.loader:after{
  content: "";
  grid-area: 1/1;
  background: radial-gradient(circle closest-side, var(--c,#fff) 92%,#0000 ) 0 0/calc(100%/4) 100%;
  clip-path: inset(0 50% 0 0);
  animation: l3 1s infinite linear;
}
.loader:after{
  --c: red; 
  clip-path: inset(0 0 0 50%);
}
@keyframes l3 {
    100% {background-position: calc(100%/3) 0}
}

.rescardwidth {
  width: 100%; /* default for mobile */
}

@media (min-width: 992px) { /* lg breakpoint in Bootstrap */
  .rescardwidth {
    width: 20%;
  }
}