/* Base Page Design */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;

    /* Updated premium gradient */
    background: linear-gradient(135deg, #090979, #4facfe, #00f2fe, #6a11cb);
    background-size: 300% 300%;
    animation: bgShift 18s infinite alternate ease-in-out;

    overflow: hidden;
    position: relative;
}

/* Smooth animated background movement */
@keyframes bgShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}


/* ---------------------- Animated Glow Dots ---------------------- */
body::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.25) 2px, transparent 2px);
    background-size: 40px 40px;
    opacity: 0.12;
    animation: glowDots 10s linear infinite;
    pointer-events: none;
}

@keyframes glowDots {
    0% {background-position: 0 0;}
    100% {background-position: 120px 120px;}
}


/* ---------------------- Blurred Color Blobs ---------------------- */
.blob {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(130px);
    opacity: 0.45;
    animation: blobMove 14s infinite alternate ease-in-out;
    pointer-events: none;
}

.blob1 {
    background: #ff0066;
    top: 5%;
    left: 5%;
}

.blob2 {
    background: #00ccff;
    bottom: 5%;
    right: 8%;
}

@keyframes blobMove {
    from { transform: translate(0, 0); }
    to { transform: translate(80px, -80px); }
}


/* ---------------------- Multiple Floating Puzzle 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; }
}



/* ---------------------- Main UI Content ---------------------- */
.container {
    text-align: center;
    z-index: 10;
    position: relative;
}

.main-heading {
    font-size: 6rem;
    color: #fff;
    margin-top: -50px;
    text-shadow: 
        0 0 10px #fff,
        0 0 25px #4facfe,
        0 0 45px #0077be;
}

.button-container {
    margin-top: 50px;
}

.button {
    display: inline-block;
    padding: 20px 40px;
    margin: 0 20px;
    font-size: 1.5rem;
    color: #fff;
    text-decoration: none;
    border: 2px solid #fff;
    border-radius: 50px;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.button:hover {
    background: #fff;
    color: #0077be;
    box-shadow: 0 12px 25px rgba(0,0,0,0.5);
    transform: translateY(-4px);
}


/*------------------------------------------------------------------------------*/
/*Admin Login style */
/* ===================== Admin Login: styles to append ===================== */

/* auth page layout */
/* ===================================================================== */
/*                         ADMIN LOGIN PAGE CSS                           */
/* ===================================================================== */

/* Back Button */
.back-link {
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 20;
    color: rgba(255,255,255,0.95);
    text-decoration: none;
    font-weight: 600;
    background: rgba(0,0,0,0.25);
    padding: 8px 12px;
    border-radius: 10px;
    backdrop-filter: blur(6px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
    transition: 0.2s ease;
}
.back-link:hover { transform: translateY(-2px); }

/* Center Layout */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    position: relative;
    z-index: 10;
}

.login-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* LOGIN CARD */
.login-card {
    width: 500px;
    padding: 60px 90px !important;  /* More inner spacing */
    border-radius: 20px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 18px 60px rgba(3,8,18,0.6);
    backdrop-filter: blur(12px) saturate(140%);
    position: relative;
}

/* Animated Glow Border */
.login-card::before {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 22px;
    background: linear-gradient(
        130deg,
        rgba(0,255,255,0.8),
        rgba(0,119,255,0.9),
        rgba(255,0,200,0.8),
        rgba(255,255,255,0.9)
    );
    filter: blur(8px);
    background-size: 300% 300%;
    animation: glowBorder 6s infinite ease;
    z-index: -1;
}

@keyframes glowBorder {
    0% { background-position: 0% 40%; }
    50% { background-position: 80% 60%; }
    100% { background-position: 0% 40%; }
}

/* LOGO + TITLE */
.center-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-mini-large {
    font-size: 3.5rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 12px rgba(255,255,255,0.6));
}

.admin-title {
    font-size: 3rem;
    color: #fff;
    margin: 0;
    text-shadow:
        0 0 10px #fff,
        0 0 25px rgba(90,160,255,0.8);
        margin-bottom: 15px;
}

/* INPUT FIELDS */
.field {
    margin: 18px 0;
}

.field-label {
    display: block;
    margin-bottom: 6px;
    color: rgba(255,255,255,0.9);
    font-weight: 600;
}

.password-wrapper {
    position: relative;
}

.login-card input {
    width: 100%;
    padding: 15px 45px 15px 16px !important;
    font-size: 1.1rem;
    border-radius: 12px;
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.06);
    color: #fff;
}

.login-card input:focus {
    border-color: rgba(120,180,255,0.8);
    box-shadow: 0 0 10px rgba(120,180,255,0.5);
    transform: translateY(-2px);
}

/* EYE ICON */
.eye-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    cursor: pointer;
    color: rgba(255,255,255,0.8);
    transition: 0.2s ease;
}
.eye-toggle:hover {
    transform: translateY(-50%) scale(1.1);
    color: #fff;
}

/* BUTTON */
.actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.btn.primary {
    padding: 12px 32px;
    font-size: 1.2rem;
    border-radius: 30px;
    background: linear-gradient(90deg,#3db2ff,#4facfe); /* normal color */
    color: #021a30;
    font-weight: 700;
    cursor: pointer;
    transition: 0.25s ease;
    box-shadow: 0 10px 25px rgba(77,160,255,0.25);
}

/* 🔵 Hover Effect — NEW COLOR & GLOW */
.btn.primary:hover {
    background: linear-gradient(90deg, #0ef, #3be0ff); 
    color: #001a2b;
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(0,255,255,0.35);
}

/* 🔴 Click Effect — NEW COLOR & SCALE DOWN */
.btn.primary:active {
    background: linear-gradient(90deg, #ff7eb3, #ff5070);
    transform: scale(0.95);
    box-shadow: 0 6px 18px rgba(255,100,150,0.5);
}


/* ERROR MESSAGE */
.login-msg {
    text-align: center;
    margin-top: 14px;
    font-size: rem;
    color: #ffb3b3;
}

.login-msg.err {
    animation: shake .4s ease;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
    75% { transform: translateX(-6px); }
    100% { transform: translateX(0); }
}

/* RESPONSIVE */
@media (max-width: 520px) {
    .login-card {
        width: 92%;
        padding: 30px 20px !important;
    }
    .admin-title {
        font-size: 2rem;
    }
    .logo-mini-large {
        font-size: 2.8rem;
    }
}







/* ===================================================================== */
/* ===================== Admin page CSS ===================== */

/* ================= ADMIN PANEL STYLES (append to style.css) ================= */

.admin-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
  z-index: 10;
}

/* Sidebar */
.admin-sidebar {
  width: 260px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-right: 1px solid rgba(255,255,255,0.04);
  padding: 22px;
  box-shadow: inset -6px 0 18px rgba(0,0,0,0.25);
  position: relative;
}

.admin-profile {
  display:flex;
  gap:12px;
  margin-bottom: 18px;
  align-items:center;
}
.profile-avatar {
  width:56px;height:56px;border-radius:12px;
  display:flex;align-items:center;justify-content:center;
  background: rgba(255,255,255,0.03);
  font-size:1.6rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}
.profile-name { font-weight:700; color:#fff; }
.profile-role { color: rgba(255,255,255,0.65); font-size:0.9rem; }

/* Nav */
.admin-nav { display:flex; flex-direction:column; gap:8px; margin-top:10px; }
.nav-item {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.88);
  padding: 12px 10px;
  text-align: left;
  font-weight:600;
  cursor:pointer;
  border-radius:8px;
  transition: .18s ease;
}
.nav-item:hover { transform: translateX(6px); background: rgba(255,255,255,0.02); }
.nav-item.active { background: linear-gradient(90deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)); box-shadow: inset 0 0 18px rgba(0,0,0,0.3); }

/* Sidebar footer */
.sidebar-footer { position:absolute; bottom:16px; left:22px; right:22px; }

/* Main content */
.admin-main {
  flex:1;
  padding: 40px;
  overflow:auto;
}

/* Panels */
.panel { display:block; }
.panel-header {
  text-align: center;
  margin-bottom: 20px;
}

.panel-header h2 {
  color: #fff;
  font-size: 3rem;
  font-weight: 700;
  text-align: center;
  margin: 0;
  letter-spacing: 1px;
}

.create-form { background: rgba(255,255,255,0.02); padding:18px; border-radius:12px; border:1px solid rgba(255,255,255,0.03); }

/* Grid rows */
.row { display:flex; gap:16px; margin-bottom:14px; flex-wrap:wrap; }
.col { 
    flex:1; 
    min-width:160px;
    margin-bottom: 25px;
 }
.col.half { flex: 0 0 calc(50% - 8px); }
.col.full { flex:1 1 100%; }
.col, .center {
  display: flex;
  flex-direction: column; /* stack children vertically */
  align-items: center;
}
.center { display:flex; justify-content:center; align-items:center; flex-direction:column; }
.label {
  order: 2;                  /* Keep label below input */
  margin-top: 10px;
  margin-bottom: 0;
  text-align: center;
  width: 60%;
  font-size: 1.2rem;         /* 🔥 Increase label text size */
  font-weight: 700;          /* Make labels bold */
  letter-spacing: 0.5px;     /* Slight spacing for premium look */
  color: rgba(255,255,255,0.9);
}

.input {
  width:60%;
  padding:12px 14px;
  font-size: 2rem;
  border-radius:10px;
  border:1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.25);
  color:#fff;
  outline:none;
}
.input:focus { box-shadow: 0 8px 24px rgba(0,0,0,0.5); transform: translateY(-2px); border-color: rgba(80,180,255,0.35); }

/* buttons in create form */
.actions-row {
  width: 100%;
  display: flex;
  justify-content: center;   /* Center the buttons */
  gap: 20px;                 /* space between Enter & Reset */
  margin-top: 20px !important;
}
.btn { padding:10px 18px; border-radius:10px; border: none; cursor:pointer; font-weight:700; }
.btn.primary { background: linear-gradient(90deg,#3db2ff,#4facfe); color:#021a30; }
.btn.ghost { background: transparent; color:#fff; border:1px solid rgba(255,255,255,0.06); }

/* Divider */
.divider { border: none; height:1px; background: rgba(255,255,255,0.03); margin:18px 0; }

/* Questions area */
.questions-area { max-height: 50vh; overflow:auto; padding:12px; border-radius:8px; border:1px dashed rgba(255,255,255,0.03); background: rgba(0,0,0,0.15); }
.q-row { display:flex; gap:12px; margin-bottom:12px; align-items:flex-start; flex-wrap:wrap; }
.q-col { flex:1; min-width:200px; }
.q-label { color: rgba(255,255,255,0.85); margin-bottom:6px; display:block; font-weight:600; }
.q-input, .a-input { padding:10px 12px; border-radius:8px; border:1px solid rgba(255,255,255,0.06); background: rgba(0,0,0,0.28); color:#fff; width:100%; }

/* muted & success text */
.muted { color: rgba(255,255,255,0.7); font-size:0.95rem; }
.success { color: #b8ffb8; font-weight:700; }


/* =========================
   Admin: main-only scrolling
   ========================= */

/* Ensure page doesn't scroll; admin area will handle scrolling */
html, body {
  height: 100%;
  overflow: hidden; /* prevent page-level scroll */
}

/* Make shell occupy full viewport */
.admin-shell {
  height: 100vh;
  display: flex;
  overflow: hidden; /* hide outer scroll, inner scroll only */
}

/* Sidebar fixed on the left and scrollable if its content overflows */
.admin-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 260px; /* keep same width as before */
  overflow-y: auto;           /* sidebar can scroll if needed */
  -webkit-overflow-scrolling: touch;
  z-index: 30;
}

/* Main content sits to the right of the fixed sidebar */
.admin-main {
  margin-left: 260px;         /* make room for the fixed sidebar */
  height: 100vh;              /* full viewport height */
  overflow-y: auto;           /* THIS is the only scrolling area */
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  padding: 40px;              /* keep your existing padding */
}

/* Make sure background layers don't block pointer events */
.icon-layer,
.blob {
  pointer-events: none;
}

/* Keep the old responsive behavior: on narrow screens, sidebar becomes normal flow */
@media (max-width: 920px) {
  html, body { overflow-y: auto; }  /* allow page-level scroll on mobile */
  .admin-shell { height: auto; flex-direction: column; overflow: visible; }
  .admin-sidebar {
    position: relative;
    width: 100%;
    bottom: auto;
    z-index: 10;
    overflow: visible;
  }
  .admin-main {
    margin-left: 0;
    height: auto;
    overflow: visible;
    padding: 18px;
  }
}


/* Responsive */
@media (max-width: 920px) {
  .admin-sidebar { display:none; }
  .admin-shell { flex-direction:column; }
  .admin-main { padding:18px; }
  .col.half { flex:1 1 100%; }
}









/* ===================================================================== */
/* ===================== dashboard ===================== */
/* ================== DASHBOARD ================== */

.dash-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.dash-card {
  background: rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 18px rgba(0, 150, 255, 0.2);
  transition: 0.3s;
}
.dash-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 25px rgba(0, 150, 255, 0.4);
}

.dash-card h3 {
  color: #fff;
  font-weight: 600;
}

.dash-number {
  font-size: 2.4rem;
  font-weight: 800;
  color: #4facfe;
}


/* =============== ROOMS TABLE =============== */

.room-table-wrapper {
  background: rgba(255,255,255,0.03);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
  backdrop-filter: blur(8px);
}

.room-table {
  width: 100%;
  border-collapse: collapse;
}

.room-table th {
  text-align: left;
  padding: 10px;
  color: #4facfe;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.room-table td {
  padding: 10px;
  color: #fff;
}

.room-table tr:hover {
  background: rgba(255,255,255,0.06);
}

.action-btn {
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  margin-right: 6px;
}
.action-view { background: #3db2ff; }
.action-delete { background: #ff4d4d; }
.action-track {
  background: #00e676;
  color: #003300;
}



/* =============== POPUP =============== */

.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
}

.hidden { display: none; }

.popup-content {
  width: 420px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255,255,255,0.15);
  color: white;
}

.close-btn {
  float: right;
  font-size: 22px;
  cursor: pointer;
  color: #fff;
}

/* ------------------ QUESTION NAVIGATION BUTTONS ------------------ */

#prevQBtn, 
#nextQBtn {
  width: 48%;
  padding: 12px;
  margin-top: 10px;

  background: rgba(255,255,255,0.08);
  color: white;
  
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;

  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;

  transition: 0.2s ease-in-out;
}

#prevQBtn:hover,
#nextQBtn:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

#prevQBtn:active,
#nextQBtn:active {
  transform: scale(0.97);
}

/* Layout inside popup */
.popup-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}


.action-track {
  background: #00e676;
  color: #003300;
}

#trackRoomSection ul {
  margin-left: 20px;
}

#trackRoomSection hr {
  margin: 18px 0;
}

