* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  line-height: 1.5;
  transition: background 0.4s, color 0.4s;
  padding-bottom: 1.5rem;
}

body::after {
  content: "Developed by Louie F. Agustin";
  display: block;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(203, 213, 225, 0.75);
  letter-spacing: 0.02em;
  margin: 1rem 0 0.4rem;
}

.bg-effect {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

header.brand { text-align: center; margin-bottom: 1rem; }
header.brand h1 { font-size: 1.75rem; letter-spacing: 0.15em; font-weight: 700; }
.theme-subtitle { font-size: 0.9rem; opacity: 0.85; margin-top: 0.25rem; }
.student-info { font-size: 0.8rem; opacity: 0.75; margin-top: 0.35rem; }
.register-notice {
  text-align: center;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  background: rgba(0, 212, 170, 0.12);
  border: 1px solid rgba(0, 212, 170, 0.4);
}

.level-instructions {
  margin-top: 1.25rem;
  font-size: 0.8rem;
  opacity: 0.9;
  text-align: left;
}

.level-instructions ul {
  margin: 0.5rem 0 0 1.1rem;
  padding: 0;
}

.level-instructions li {
  margin-bottom: 0.35rem;
}

.logout-link {
  color: inherit;
  opacity: 0.6;
  font-size: 0.8rem;
  text-decoration: none;
}

.logout-link:hover {
  opacity: 1;
}

.student-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.25rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.student-nav a {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: #94a3b8;
  text-decoration: none;
  border-radius: 6px;
  border: 1px solid transparent;
}

.student-nav a:hover {
  color: #00d4aa;
}

.student-nav a.active {
  color: #00d4aa;
  border-color: rgba(0, 212, 170, 0.4);
  background: rgba(0, 212, 170, 0.1);
}

.student-nav-logout {
  margin-left: auto;
}

@media (max-width: 520px) {
  .student-nav-logout {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }
}

.rotate-timer {
  text-align: center;
  font-size: 0.85rem;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  border: 1px solid;
}

.level-badge {
  display: inline-block;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.35rem 1rem;
  border-radius: 4px;
  margin-bottom: 1.25rem;
}

.card {
  border-radius: 12px;
  padding: 1.75rem;
  border: 1px solid;
}

.card h2 { font-size: 1rem; margin-bottom: 1.25rem; font-weight: 500; opacity: 0.9; }

.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: 0.75rem;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid;
  font-size: 1rem;
}

.btn {
  width: 100%;
  padding: 0.85rem;
  margin-top: 0.5rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}

.result {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 700;
  display: none;
}
.result.show { display: block; }

.hint { margin-top: 1.25rem; font-size: 0.8rem; text-align: center; opacity: 0.85; }

.level-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.level-nav a {
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
  text-decoration: none;
  border-radius: 6px;
  border: 1px solid;
  transition: all 0.2s;
}

/* Layout variants per level */
.layout-1 .card { border-radius: 4px; }
.layout-2 .card { border-radius: 0; transform: skewY(-0.5deg); }
.layout-3 .card { border-radius: 24px; }
.layout-4 .card { border-radius: 2px; border-width: 3px; }
.layout-5 .card { font-family: 'Courier New', monospace; }
.layout-6 .card { box-shadow: 0 4px 24px rgba(0,0,0,0.08); }
.layout-7 .card { border-radius: 0; border: 4px solid; }
.layout-8 .card { border-radius: 16px; backdrop-filter: blur(8px); }
.layout-9 .card { border-radius: 8px; border-left: 6px solid; }
.layout-10 .card { border-radius: 12px; border: 2px solid; box-shadow: 0 0 40px rgba(255,200,50,0.15); }

.layout-5 header.brand h1 { letter-spacing: 0.3em; }

/* Readability boost for Level 1–10 pages */
body[class*="level-theme"] .theme-subtitle {
  font-size: 0.96rem;
  font-weight: 600;
  opacity: 0.98;
}

body[class*="level-theme"] .student-info {
  font-size: 0.88rem;
  font-weight: 500;
  opacity: 0.95;
}

body[class*="level-theme"] .rotate-timer {
  font-size: 0.9rem;
  font-weight: 600;
}

body[class*="level-theme"] .card h2 {
  font-size: 1.08rem;
  font-weight: 700;
  opacity: 1;
}

body[class*="level-theme"] .form-group label {
  font-size: 0.8rem;
  font-weight: 700;
}

body[class*="level-theme"] .form-group input {
  font-weight: 600;
}

body[class*="level-theme"] .level-instructions {
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 1;
}

body[class*="level-theme"] .level-instructions li {
  margin-bottom: 0.42rem;
}
