/* ====================================== */
/* GLOBAL RESET & SAFE AREA */
/* ====================================== */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
           env(safe-area-inset-bottom) env(safe-area-inset-left);

  background: linear-gradient(
      135deg,
      #ff8acb,
      #6bb4ff,
      #ffd36a,
      #ffa3a3
  );

  background-image: url('/public/images/logo.png');
  background-repeat: repeat;
  background-size: 120px;
  background-position: center;

  opacity: 1;
}

/* Wave-like animation */
@keyframes waveFlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ====================================== */
/* MAIN CONTAINER */
/* ====================================== */

.container {
  max-width: 1000px;
  margin: 20px auto;
  padding: 20px;
  background: rgba(255,255,255,0.85);
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.10);
  backdrop-filter: blur(6px);
  animation: fadeIn .5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ====================================== */
/* HEADER */
/* ====================================== */

.header {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.header img {
  width: 65px;
  height: auto;
}

.header h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #005f8f;
}

/* ====================================== */
/* DASHBOARD TILES (IMPROVED UI) */
/* ====================================== */

.tiles {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.tile {
  flex: 1 1 200px;
  background: linear-gradient(135deg,#0077b6,#0096c7);
  color: white;
  padding: 18px;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
}

.tile.disabled {
  background: #c0c7d6;
  cursor: not-allowed;
}

.small {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 6px;
  display: block;
}

/* ====================================== */
/* FORMS */
/* ====================================== */

form {
  margin-top: 12px;
}

input, select, button {
  padding: 12px;
  margin: 6px 0;
  width: 100%;
  font-size: 15px;
  border-radius: 8px;
  border: 1px solid #ccc;
  transition: 0.25s;
}

input:focus, select:focus {
  border-color: #0077b6;
  box-shadow: 0 0 0 2px rgba(0,119,182,0.25);
}

/* Buttons */
button.primary {
  background: linear-gradient(135deg,#0077b6,#005f8f);
  color: #fff;
  border: none;
  font-weight: 600;
  transition: 0.25s;
}

button.primary:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 16px rgba(0,0,0,0.20);
}

button.primary:active {
  transform: scale(0.97);
}

/* ====================================== */
/* LIST ITEMS */
/* ====================================== */

.list-item {
  padding: 10px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background:#fafafa;
  border-radius: 6px;
  margin: 5px 0;
  transition: 0.25s;
}

.list-item:hover {
  background: #f0f9ff;
}

/* ====================================== */
/* MOBILE */
/* ====================================== */

@media (max-width: 600px) {
  .container {
    margin: 10px;
    padding: 16px;
  }

  .header h1 {
    font-size: 18px;
  }

  .header img {
    width: 55px;
  }

  .tile {
    font-size: 14px;
    padding: 14px;
  }

  input, select, button {
    font-size: 14px;
    padding: 10px;
  }

  .list-item {
    font-size: 14px;
  }
}

/* ====================================== */
/* FOOTER */
/* ====================================== */

.footer {
  text-align: center;
  padding: 12px 0;
  font-size: 0.9rem;
  color: #004080;
  background: #eef4ff;
  border-top: 1px solid #d4e0f4;
  border-radius: 0 0 14px 14px;
  margin-top: 1rem;
}

/* Animation Keyframes */
@keyframes dropMove {
  0% {
    transform: translateY(-100px) translateX(0px);
    opacity: 0;
  }
  25% {
    opacity: 1;
  }
  50% {
    transform: translateY(300px) translateX(30px);
    opacity: 1;
  }
  75% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(500px) translateX(60px);
    opacity: 0;
  }
}

/* ====================================== */
/* EXAM SPECIFIC STYLES */
/* ====================================== */

#questionArea {
  margin-top: 1rem;
  width: 100%;
}

/* Question container */
.question-block {
  padding: 1rem;
  background: #f8fbff;
  border-radius: 12px;
  margin-bottom: 1.2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
  border-left: 4px solid #0077cc;
  transition: 0.3s;
}

.question-block:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,.09);
  transform: translateY(-1px);
}

.question-text {
  font-weight: 650;
  margin-bottom: 0.7rem;
  font-size: 1.05rem;
  color: #003f66;
}

.question-img {
  width: 100%;
  max-width: 300px;
  margin: 0.7rem 0;
  border-radius: 8px;
  border: 1px solid #cdd7e5;
  box-shadow: 0 4px 10px rgba(0,0,0,.12);
}

/* Options */
label.option {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  padding: 0.7rem 0.75rem;
  margin: 0.45rem 0;
  border-radius: 10px;
  border: 1px solid #cfd9e8;
  cursor: pointer;
  touch-action: manipulation;
  font-size: 0.98rem;
  transition: 0.22s;
}

label.option:hover {
  background: #eef6ff;
  border-color: #0080d6;
  transform: translateX(2px);
}

/* Ensure radio input is aligned nicely */
label.option input[type="radio"] {
  flex-shrink: 0;
}

/* Progress tracker */
#questionArea > div:first-child {
  font-weight: 600;
  margin-bottom: 1rem;
}
/* 🫧 Floating Blobs Container */
.bg-blobs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

/* Individual Blob */
.blob {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  animation: floatBlob 30s linear infinite;
}

/* Light Mode Colors */
.blob.one {
  background: #c7d2fe;
  top: -10%;
  left: -10%;
}

.blob.two {
  background: #bae6fd;
  bottom: -15%;
  right: -10%;
  animation-duration: 38s;
}

/* Dark Mode Colors */
body.dark .blob.one {
  background: #1e40af;
}

body.dark .blob.two {
  background: #0ea5e9;
}

/* Floating Animation */
@keyframes floatBlob {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, -40px) scale(1.1); }
  100% { transform: translate(0, 0) scale(1); }
}
/* 🌫️ Noise Overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;

  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}
@media (prefers-reduced-motion: reduce) {
  body {
    animation: none !important;
  }

  .blob {
    animation: none !important;
  }
}
