/* Base page styling */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
  background: linear-gradient(135deg, #090979, #4facfe, #00f2fe, #6a11cb);
  background-size: 300% 300%;
  animation: bgMove 15s ease-in-out infinite alternate;
}

@keyframes bgMove {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* Puzzle floating icons */
/* ===================== Floating Puzzle Icons ===================== */
.icon-layer {
    position: fixed;
    width: 100%;
    height: 100%;
    pointer-events: none;
    top: 0;
    left: 0;
    overflow: hidden;
}

.icon {
    position: absolute;
    font-size: 3.5rem;
    opacity: 0.50; /* Increased visibility to 50% */
    animation: floatPuzzle 14s infinite linear;
}

/* Positions for 20 icons */
.icon:nth-child(1)  { left: 5%;  animation-duration: 12s; }
.icon:nth-child(2)  { left: 12%; animation-duration: 15s; }
.icon:nth-child(3)  { left: 18%; animation-duration: 11s; }
.icon:nth-child(4)  { left: 25%; animation-duration: 17s; }
.icon:nth-child(5)  { left: 32%; animation-duration: 13s; }
.icon:nth-child(6)  { left: 40%; animation-duration: 20s; }
.icon:nth-child(7)  { left: 47%; animation-duration: 14s; }
.icon:nth-child(8)  { left: 55%; animation-duration: 19s; }
.icon:nth-child(9)  { left: 62%; animation-duration: 16s; }
.icon:nth-child(10) { left: 70%; animation-duration: 21s; }

.icon:nth-child(11) { left: 77%; animation-duration: 18s; }
.icon:nth-child(12) { left: 84%; animation-duration: 12s; }
.icon:nth-child(13) { left: 90%; animation-duration: 23s; }
.icon:nth-child(14) { left: 3%;  animation-duration: 24s; }
.icon:nth-child(15) { left: 15%; animation-duration: 17s; }
.icon:nth-child(16) { left: 28%; animation-duration: 22s; }
.icon:nth-child(17) { left: 45%; animation-duration: 13s; }
.icon:nth-child(18) { left: 58%; animation-duration: 25s; }
.icon:nth-child(19) { left: 73%; animation-duration: 15s; }
.icon:nth-child(20) { left: 88%; animation-duration: 19s; }

/* Smooth upward floating effect */
@keyframes floatPuzzle {
    0%   { transform: translateY(120vh) rotate(0deg); opacity: 0; }
    15%  { opacity: 0.5; }
    50%  { opacity: 0.5; }
    100% { transform: translateY(-120vh) rotate(360deg); opacity: 0; }
}

@keyframes float {
  0% { transform: translateY(110vh) rotate(0deg); }
  100% { transform: translateY(-120vh) rotate(360deg); }
}

/* Blur blobs */
.blob {
  position: fixed;
  width: 350px;
  height: 350px;
  filter: blur(120px);
  opacity: 0.4;
  border-radius: 50%;
  pointer-events: none;
}

.blob1 { background: #ff0066; top: 10%; left: 10%; }
.blob2 { background: #00ccff; bottom: 10%; right: 10%; }

.login-container {
  z-index: 10;
}

.login-card {
  width: 380px;
  padding: 40px;
  border-radius: 20px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 0 25px rgba(0,0,0,0.4);
  text-align: center;
}

.logo-top {
  font-size: 3rem;
  margin-bottom: 10px;
}

.login-title {
  font-size: 2.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 25px;
}

/* Input fields */
.field {
  margin-bottom: 25px;
}

.input {
  width: 100%;
  padding: 14px 17px;
  font-size: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(0,0,0,0.3);
  color: #fff;
}

.label {
  margin-top: 8px;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.9);
  display: block;
  font-weight: 600;
}

/* Button */
.btn {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(90deg,#3db2ff,#4facfe);
  color: #021a30;
  border: none;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
}

.btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.msg {
  margin-top: 12px;
  color: #ffb3b3;
  font-weight: 600;
}


/* ==========================================================
   EXAM PAGE STYLING
   ========================================================== */

.exam-container {
  width: 100%;
  max-width: 700px;
  margin: auto;
  text-align: center;
  z-index: 10;
  color: white;
}

.exam-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 5px;
  font-size: 1.4rem;
  font-weight: bold;
}

.question-text {
  margin: 20px 0;
  padding: 10px;
  font-size: 1.6rem;
  font-weight: 600;
}

/* ======== GRID ======== */

.puzzle-grid {
  display: grid;
  grid-gap: 8px;
  justify-content: center;
  margin-top: 25px;
}

.puzzle-cell {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.4rem;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
  color: #fff;
}

.puzzle-cell:hover {
  background: rgba(255,255,255,0.30);
}

.puzzle-cell.selected {
  background: #00ff99;
  color: #000;
}

.puzzle-cell.wrong {
  background: #ff4d4d !important;
  color: white;
}

/* ======== FEEDBACK ======== */

.feedback {
  margin-top: 15px;
  font-size: 1.6rem;
  font-weight: bold;
}

.feedback.correct {
  color: #00ff99;
}

.feedback.wrong {
  color: #ff4d4d;
}

/* ======== NEXT BUTTON ======== */

#nextBtn {
  width: 200px;
  padding: 12px;
  margin-top: 25px;
  font-size: 1.2rem;
  border-radius: 12px;
  cursor: pointer;
  border: none;
  background: #fff;
  color: #000;
  font-weight: bold;
}

#nextBtn:hover {
  background: #00ffdd;
}
