@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&family=Orbitron:wght@500;700&display=swap');

:root {
  color-scheme: dark;
  --ink: #08070b;
  --panel: #100b17;
  --panel-light: #1b1026;
  --text: #f0eaf5;
  --muted: #a99bb5;
  --violet: #bd78f1;
  --violet-bright: #dda6ff;
  --violet-dim: #71438f;
  --good: #c6a5e5;
  --bad: #9d789f;
}

* { box-sizing: border-box; font-family: 'Kanit', 'Segoe UI', sans-serif; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  line-height: 1.65;
  background: #120b1b;
}
#page-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #100b17;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
#page-background::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,5,13,.12), rgba(8,5,13,.04) 48%, rgba(8,5,13,.16));
}

/* Keep the page itself quiet; the raised glass panels carry the visual weight. */
.JxmeTP {
  position: relative;
  z-index: 1;
  width: min(1480px, calc(100% - 52px));
  margin: 34px auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

header {
  position: relative;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border: 1px solid rgba(190, 131, 235, .44);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.065), transparent 20%),
    linear-gradient(150deg, #241333 0%, #160e20 43%, #0d0a12 100%);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.2),
    inset 0 -1px 1px rgba(93,46,132,.46),
    0 0 0 1px rgba(75,44,98,.48),
    0 10px 28px rgba(0,0,0,.63),
    0 0 15px rgba(156,83,205,.12);
}
header h3 {
  margin: 0;
  color: #f1e5ff;
  font-family: 'Orbitron', 'Kanit', sans-serif;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: .02em;
  text-shadow: 0 1px 0 #5d3c75, 0 0 13px rgba(204,148,244,.26);
}
.brand-typewriter {
  white-space: nowrap;
}
.brand-typewriter.is-typing::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: .9em;
  margin-left: 5px;
  vertical-align: -.08em;
  background: currentColor;
  animation: brand-caret .8s step-end infinite;
}
@keyframes brand-caret {
  50% { opacity: 0; }
}
@media (max-width: 480px) {
  header h3 { font-size: clamp(1.4rem, 6vw, 1.9rem); }
  .brand-typewriter { white-space: normal; }
}
nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 15px 0 20px;
  padding: 4px 0;
}
nav a {
  display: inline-block;
  padding: 7px 18px;
  color: #c6b6d1;
  text-decoration: none;
  border: 1px solid rgba(162,111,198,.34);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(39,22,53,.9), rgba(13,10,18,.94));
  box-shadow: inset 0 1px rgba(255,255,255,.13), 0 4px 12px rgba(0,0,0,.4);
  transition: color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
nav a:hover, nav a:focus-visible {
  color: #fff;
  border-color: rgba(221,166,255,.78);
  box-shadow: inset 0 1px rgba(255,255,255,.22), 0 0 12px rgba(177,104,224,.25), 0 5px 14px rgba(0,0,0,.5);
  transform: translateY(-1px);
  outline: none;
}

.container {
  display: grid;
  grid-template-columns: minmax(205px, 245px) minmax(220px, 265px) minmax(0, 1fr);
  align-items: stretch;
  gap: 17px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.primary, .second, .third {
  min-width: 0;
  padding: 20px;
  border: 1px solid transparent;
  border-radius: 21px;
  background:
    linear-gradient(155deg, rgba(35,19,49,.98) 0%, rgba(20,13,28,.99) 38%, rgba(10,9,14,.99) 100%) padding-box,
    linear-gradient(145deg, rgba(229,186,255,.87) 0%, rgba(161,103,207,.75) 13%, rgba(85,55,111,.62) 42%, rgba(49,35,62,.45) 72%, rgba(190,125,228,.73) 100%) border-box;
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.21),
    inset 1px 0 1px rgba(214,175,241,.09),
    inset 0 -2px 3px rgba(91,45,127,.34),
    0 0 0 1px rgba(35,22,46,.8),
    0 13px 26px rgba(0,0,0,.65),
    0 2px 5px rgba(171,108,216,.08);
  backdrop-filter: blur(12px) saturate(112%);
  -webkit-backdrop-filter: blur(12px) saturate(112%);
}
.primary, .second { align-self: start; }
.primary strong, .second strong, .third strong {
  display: block;
  margin: 0 0 15px;
  color: #f1e7f7;
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: .01em;
}
.primary strong::after, .second strong::after, .third strong::after {
  content: '';
  display: block;
  width: 34px;
  height: 2px;
  margin-top: 8px;
  border-radius: 2px;
  background: linear-gradient(90deg, #d7a4fb, rgba(150,87,190,.35));
  box-shadow: 0 0 6px rgba(196,130,235,.34);
}
.primary img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  border: 1px solid rgba(214,174,240,.36);
  border-radius: 15px;
  box-shadow: 0 7px 17px rgba(0,0,0,.46), inset 0 1px rgba(255,255,255,.12);
}
menu { margin: 0; padding: 0; list-style: none; }
menu li { margin: 8px 0; }
menu li a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 41px;
  padding: 7px 12px;
  color: #d1c3dc;
  text-decoration: none;
  border: 1px solid rgba(166,113,201,.43);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.055), transparent 42%),
    linear-gradient(155deg, rgba(42,23,58,.96), rgba(13,10,18,.99));
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.16),
    inset 0 -1px 1px rgba(75,41,99,.5),
    0 5px 11px rgba(0,0,0,.45);
  transition: color .17s ease, border-color .17s ease, box-shadow .17s ease, transform .17s ease;
}
menu li a::before {
  content: '';
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: #a477bf;
  box-shadow: 0 0 5px rgba(195,135,231,.36);
}
menu li a:hover, menu li a:focus-visible {
  color: #fff;
  border-color: rgba(227,179,255,.9);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.23), 0 0 11px rgba(173,102,215,.3), 0 7px 14px rgba(0,0,0,.54);
  transform: translateY(-1px);
  outline: none;
}
menu li a.completed { color: #dbc8eb !important; }
menu li a.completed::before { background: #b68bd2; box-shadow: 0 0 6px rgba(190,139,224,.56); }
menu li a.no-com { color: #b7a5bd !important; }
menu li a.no-com::before { background: #806b8a; box-shadow: 0 0 5px rgba(150,125,160,.36); }
.second menu li a { border-radius: 999px; }

.third { min-height: 490px; padding: clamp(20px, 2.6vw, 32px); overflow: hidden; }
.third h3, .third h4, .task-form h3 { margin: 0 0 15px; color: #f2eaf8; font-size: 1.22rem; font-weight: 600; }
.third p { color: #c9bdcf; }
.third b { color: #f0e8f5; }
.week-content-group > p:first-child a {
  display: inline-block;
  margin: 0 0 17px;
  padding: 7px 13px;
  color: #e1c4f4;
  text-decoration: none;
  border: 1px solid rgba(186,132,218,.47);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(48,28,63,.94), rgba(15,11,20,.96));
  box-shadow: inset 0 1px rgba(255,255,255,.14), 0 4px 10px rgba(0,0,0,.34);
}
.week-content-group > p:first-child a:hover { border-color: rgba(225,174,255,.88); box-shadow: 0 0 10px rgba(168,98,208,.22); }
.task-form {
  padding: 18px;
  border: 1px solid rgba(148,103,176,.35);
  border-radius: 17px;
  background: linear-gradient(155deg, rgba(29,18,39,.88), rgba(13,10,17,.82));
  box-shadow: inset 0 1px rgba(255,255,255,.075), 0 7px 18px rgba(0,0,0,.27);
}
.task-form + .task-form { margin-top: 15px; }
.task-form h3 { padding-bottom: 10px; border-bottom: 1px solid rgba(169,121,196,.23); }
input[type="text"], input[type="number"], input[type="email"], textarea, select {
  width: 100%;
  min-height: 41px;
  padding: 8px 12px !important;
  color: #f1eaf5 !important;
  border: 1px solid rgba(163,119,188,.47) !important;
  border-radius: 11px !important;
  background: linear-gradient(145deg, rgba(29,18,40,.96), rgba(8,7,12,.98)) !important;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.52), inset 0 1px rgba(255,255,255,.075);
  transition: border-color .18s ease, box-shadow .18s ease;
}
input::placeholder, textarea::placeholder { color: #95869e; }
input:focus, textarea:focus, select:focus {
  border-color: rgba(219,167,255,.92) !important;
  box-shadow: 0 0 0 2px rgba(167,100,204,.16), 0 0 10px rgba(177,110,215,.22), inset 0 1px 2px rgba(0,0,0,.48) !important;
}
label { display: inline-block; margin: 9px 0 5px; color: #c5b7ce; font-weight: 400; }
button, input[type="submit"], input[type="reset"] {
  min-height: 39px;
  padding: 8px 17px !important;
  color: #f3e8fb !important;
  font-weight: 500 !important;
  border: 1px solid rgba(218,166,255,.75) !important;
  border-radius: 999px !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), transparent 48%),
    linear-gradient(145deg, #472762, #21122f 72%, #130c1b) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.24), inset 0 -1px rgba(68,35,91,.7), 0 5px 13px rgba(0,0,0,.46), 0 0 8px rgba(170,105,206,.16) !important;
  cursor: pointer !important;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, filter .18s ease !important;
}
button:hover, input[type="submit"]:hover, input[type="reset"]:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow: inset 0 1px rgba(255,255,255,.29), 0 0 14px rgba(178,107,216,.3), 0 7px 15px rgba(0,0,0,.52) !important;
}
button:active, input[type="submit"]:active { transform: translateY(0); }
hr { height: 1px; margin: 17px 0; border: 0; background: linear-gradient(90deg, transparent, rgba(177,135,199,.36), transparent); }
#third-content [id^="result"] { color: #d9cde1; line-height: 1.8; }
.flowchart-img-container {
  width: 100%;
  max-width: 100%;
  margin-top: 13px;
  padding: 10px;
  overflow: auto;
  border: 1px solid rgba(170,120,200,.32);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(22,14,30,.94), rgba(7,6,10,.97));
  box-shadow: inset 0 1px rgba(255,255,255,.08), 0 8px 19px rgba(0,0,0,.38);
}
.flow-img, .third img { display: block; max-width: 100% !important; height: auto !important; margin: 0 auto; object-fit: contain; border-radius: 9px; }
.student-card {
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 15px 18px;
  border: 1px solid rgba(174,122,204,.4);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(35,21,48,.96), rgba(12,9,16,.96));
  box-shadow: inset 0 1px rgba(255,255,255,.13), 0 8px 19px rgba(0,0,0,.42);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.student-card:hover { transform: translateY(-1px); border-color: rgba(220,170,255,.68); box-shadow: 0 0 12px rgba(170,104,207,.19), 0 10px 21px rgba(0,0,0,.47); }
.profile-img { width: 66px; height: 66px; flex: 0 0 66px; object-fit: cover; border: 1px solid rgba(224,187,246,.7); border-radius: 50%; box-shadow: 0 0 0 3px rgba(145,91,175,.16), 0 5px 12px rgba(0,0,0,.4); }
.info-box { display: flex; flex-direction: column; gap: 4px; }
.info-name { color: #f0e7f6; font-size: 1.04rem; font-weight: 600; }
.info-details { color: var(--muted); font-size: .92rem; }
.btn-lang { min-height: 36px; padding: 6px 17px !important; color: #e5d2f1 !important; border: 1px solid rgba(176,125,204,.53) !important; border-radius: 999px !important; background: linear-gradient(145deg, rgba(52,31,70,.9), rgba(17,12,23,.96)) !important; }
.btn-lang:hover { border-color: rgba(221,166,255,.86) !important; }
table { width: 100%; border: 1px solid rgba(157,111,184,.34); border-collapse: collapse; border-radius: 12px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid rgba(157,111,184,.22); }
th { color: #e1c4f4; background: rgba(105,62,133,.24); }
td { color: #cabbcf; }
progress { width: 100%; height: 9px; accent-color: #bd78f1; }
footer { position: relative; z-index: 1; width: 100%; margin-top: 18px; padding: 14px; text-align: center; border: 1px solid rgba(161,112,190,.35); border-radius: 15px; background: linear-gradient(145deg, rgba(26,16,35,.92), rgba(9,8,13,.96)); box-shadow: inset 0 1px rgba(255,255,255,.1), 0 8px 18px rgba(0,0,0,.39); }
footer p { margin: 0; color: #a99bb5; font-size: .9rem; }
:focus-visible { outline: 2px solid rgba(218,166,255,.84); outline-offset: 3px; }
::selection { color: #fff; background: rgba(138,78,175,.72); }

@media (max-width: 1050px) {
  .container { grid-template-columns: minmax(185px, 225px) minmax(200px, 245px) minmax(0, 1fr); gap: 12px; }
  .primary, .second { padding: 16px; }
}
@media (max-width: 820px) {
  .JxmeTP { width: min(calc(100% - 28px), 720px); margin: 18px auto; }
  .container { grid-template-columns: 1fr 1fr; }
  .primary, .second { align-self: stretch; }
  .third { grid-column: 1 / -1; min-height: 0; }
}
@media (max-width: 560px) {
  .JxmeTP { width: calc(100% - 18px); margin: 10px auto; }
  header { min-height: 58px; border-radius: 15px; }
  nav { gap: 6px; margin: 11px 0 14px; }
  nav a { flex: 1 1 auto; padding: 6px 12px; text-align: center; }
  .container { grid-template-columns: 1fr; gap: 11px; }
  .primary, .second, .third { padding: 16px; border-radius: 18px; }
  .third { grid-column: auto; }
  .task-form { padding: 14px; }
  table { font-size: .87rem; }
  th, td { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Floating background selector */
.background-toggle {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 5;
  min-height: 44px;
  padding: 9px 17px;
  color: #f4e8ff;
  font-size: .92rem;
  border: 1px solid rgba(221,166,255,.66);
  border-radius: 999px;
  background: linear-gradient(155deg, rgba(70,40,91,.94), rgba(15,10,21,.96));
  box-shadow: inset 0 1px 1px rgba(255,255,255,.25), 0 7px 20px rgba(0,0,0,.55), 0 0 14px rgba(171,104,216,.24);
  cursor: pointer;
}
.background-toggle:hover,
.background-toggle:active { transform: none; }
@media (max-width: 560px) {
  .background-toggle { right: 12px; bottom: 12px; min-height: 40px; padding: 7px 13px; }
}

/* Toggle between the original opaque panels and a clearer glass finish. */
.glass-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  z-index: 1;
  min-height: 34px;
  padding: 5px 13px;
  color: #f2e5ff;
  font-size: .86rem;
  border: 1px solid rgba(221,166,255,.48);
  border-radius: 999px;
  cursor: pointer;
  transform: translateY(-50%);
}
.glass-toggle:hover { color: #fff; transform: translateY(-50%); }
@media (max-width: 600px) {
  header { padding-right: 112px; }
  .glass-toggle { right: 9px; padding-inline: 9px; font-size: .78rem; }
}

body.glass-transparent .primary,
body.glass-transparent .second,
body.glass-transparent .third {
  background:
    radial-gradient(ellipse 85% 34% at 13% 0%, rgba(255,255,255,.24), transparent 76%) padding-box,
    radial-gradient(ellipse 65% 25% at 92% 100%, rgba(207,159,255,.1), transparent 78%) padding-box,
    linear-gradient(155deg, rgba(48,31,64,.16) 0%, rgba(27,17,37,.12) 40%, rgba(12,9,18,.18) 100%) padding-box,
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(222,184,255,.82) 18%, rgba(180,132,214,.64) 55%, rgba(255,255,255,.88)) border-box;
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.48),
    inset 1px 0 1px rgba(255,255,255,.18),
    inset 0 -2px 5px rgba(180,132,214,.2),
    0 0 0 1px rgba(255,255,255,.1),
    0 14px 30px rgba(9,4,16,.3),
    0 3px 14px rgba(210,157,255,.15);
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
}
body.glass-transparent .task-form,
body.glass-transparent .student-card,
body.glass-transparent .flowchart-img-container,
body.glass-transparent header,
body.glass-transparent footer {
  background-image:
    radial-gradient(ellipse 85% 38% at 10% 0%, rgba(255,255,255,.2), transparent 76%),
    radial-gradient(ellipse 60% 24% at 92% 100%, rgba(204,157,255,.08), transparent 78%),
    linear-gradient(155deg, rgba(38,23,49,.14), rgba(12,9,17,.16));
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
}
body.glass-transparent nav a,
body.glass-transparent menu li a,
body.glass-transparent .week-content-group > p:first-child a,
body.glass-transparent button,
body.glass-transparent input[type="submit"],
body.glass-transparent input[type="reset"],
body.glass-transparent .btn-lang {
  background-image: linear-gradient(155deg, rgba(255,255,255,.18), rgba(31,17,43,.22));
  backdrop-filter: blur(16px) saturate(155%);
  -webkit-backdrop-filter: blur(16px) saturate(155%);
}
body.glass-transparent .glass-toggle {
  background: linear-gradient(155deg, rgba(97,58,120,.72), rgba(29,17,42,.78));
}

/* The assignment workspace and each task card use the clear glass mode too. */
body.glass-transparent .primary,
body.glass-transparent .second,
body.glass-transparent .third {
  background:
    linear-gradient(180deg, rgba(255,255,255,.065), transparent 20%) padding-box,
    linear-gradient(150deg, rgba(36,19,51,.76) 0%, rgba(22,14,32,.72) 43%, rgba(13,10,18,.76) 100%) padding-box,
    linear-gradient(145deg, rgba(229,186,255,.78) 0%, rgba(161,103,207,.56) 18%, rgba(85,55,111,.44) 54%, rgba(190,125,228,.68) 100%) border-box !important;
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.2),
    inset 0 -1px 1px rgba(93,46,132,.42),
    0 0 0 1px rgba(75,44,98,.38),
    0 10px 24px rgba(0,0,0,.44),
    0 0 15px rgba(156,83,205,.1);
  backdrop-filter: blur(22px) saturate(165%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(165%) !important;
}
body.glass-transparent .third .task-form,
body.glass-transparent .third .flowchart-img-container,
body.glass-transparent .third .student-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.065), transparent 20%),
    linear-gradient(150deg, rgba(36,19,51,.76) 0%, rgba(22,14,32,.72) 43%, rgba(13,10,18,.76) 100%) !important;
  border-color: rgba(190,131,235,.42);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.2),
    inset 0 -1px 1px rgba(93,46,132,.42),
    0 8px 20px rgba(0,0,0,.4),
    0 0 12px rgba(156,83,205,.09);
  backdrop-filter: blur(22px) saturate(165%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(165%) !important;
}

/* Layered glass: soft environmental bounce, specular edge and lifted shadow */
body {
  background: #100b17;
}
.primary, .second, .third {
  background:
    radial-gradient(ellipse 85% 34% at 13% 0%, rgba(255,238,255,.16), transparent 76%) padding-box,
    radial-gradient(ellipse 65% 25% at 92% 100%, rgba(181,107,226,.17), transparent 78%) padding-box,
    linear-gradient(155deg, rgba(44,25,59,.88) 0%, rgba(24,15,33,.88) 40%, rgba(11,9,16,.9) 100%) padding-box,
    linear-gradient(145deg, rgba(244,215,255,.94) 0%, rgba(183,125,222,.82) 10%, rgba(100,65,126,.6) 38%, rgba(59,40,74,.48) 72%, rgba(222,165,250,.8) 100%) border-box;
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.31),
    inset 1px 0 1px rgba(234,201,255,.12),
    inset 0 -2px 5px rgba(101,55,135,.45),
    0 0 0 1px rgba(31,20,41,.92),
    0 2px 2px rgba(243,210,255,.08),
    0 17px 32px rgba(0,0,0,.72),
    0 5px 13px rgba(97,47,125,.12);
  backdrop-filter: blur(16px) saturate(122%);
  -webkit-backdrop-filter: blur(16px) saturate(122%);
}
.task-form, .student-card, .flowchart-img-container, footer, header {
  background-image:
    radial-gradient(ellipse 85% 38% at 10% 0%, rgba(250,232,255,.11), transparent 76%),
    radial-gradient(ellipse 60% 24% at 92% 100%, rgba(165,92,214,.11), transparent 78%),
    linear-gradient(155deg, rgba(38,23,49,.88), rgba(12,9,17,.9));
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.2),
    inset 0 -2px 4px rgba(95,50,126,.32),
    0 1px 1px rgba(238,208,255,.06),
    0 11px 22px rgba(0,0,0,.54),
    0 3px 9px rgba(112,57,144,.1);
}
/* A narrow specular streak gives the small glass controls a polished top bevel. */
menu li a, nav a, .week-content-group > p:first-child a, button, input[type="submit"], input[type="reset"], .btn-lang {
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.26),
    inset 0 -2px 3px rgba(67,36,91,.48),
    0 2px 1px rgba(245,218,255,.07),
    0 7px 14px rgba(0,0,0,.5),
    0 2px 8px rgba(135,74,171,.12) !important;
}
menu li a::after, nav a::after, .week-content-group > p:first-child a::after, button::after, input[type="submit"]::after, input[type="reset"]::after, .btn-lang::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 12%;
  width: 65%;
  height: 1px;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, rgba(255,244,255,.72), rgba(220,182,255,.48), transparent);
  opacity: .7;
  pointer-events: none;
}
menu li a, nav a, .week-content-group > p:first-child a, button, input[type="submit"], input[type="reset"], .btn-lang {
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.095), transparent 37%),
    linear-gradient(155deg, rgba(53,30,70,.95), rgba(13,10,18,.98));
}
menu li a:hover, nav a:hover, button:hover, input[type="submit"]:hover, input[type="reset"]:hover {
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.34),
    inset 0 -2px 3px rgba(78,39,108,.52),
    0 0 13px rgba(193,130,232,.29),
    0 9px 17px rgba(0,0,0,.58) !important;
}

/* Week progress labels in the existing week list */
.primary > menu li a.completed,
.primary > menu li a.no-com {
  min-height: 43px;
  justify-content: flex-start;
  padding-right: 10px;
  border-radius: 14px;
}
.primary > menu li a.completed::before {
  content: '✓';
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: #09140f;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(145deg, #baf8d6, #63dba8);
  box-shadow: 0 0 8px rgba(99,219,168,.35), inset 0 1px rgba(255,255,255,.75);
}
.primary > menu li a.completed::after {
  content: 'เสร็จแล้ว';
  position: static;
  display: inline-block;
  width: auto;
  height: auto;
  margin-left: auto;
  padding: 2px 8px;
  color: #b8f0d4;
  font-size: .7rem;
  line-height: 1.5;
  white-space: nowrap;
  border: 1px solid rgba(112,212,163,.26);
  border-radius: 999px;
  background: rgba(73,156,116,.13);
  opacity: 1;
}
.primary > menu li a.no-com::before {
  content: '!';
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: #211405;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(145deg, #ffe0a1, #e8a956);
  box-shadow: 0 0 8px rgba(232,169,86,.3), inset 0 1px rgba(255,255,255,.75);
}
.primary > menu li a.no-com::after {
  content: 'ยังไม่เสร็จ';
  position: static;
  display: inline-block;
  width: auto;
  height: auto;
  margin-left: auto;
  padding: 2px 8px;
  color: #f0c78f;
  font-size: .7rem;
  line-height: 1.5;
  white-space: nowrap;
  border: 1px solid rgba(231,174,99,.27);
  border-radius: 999px;
  background: rgba(156,103,40,.15);
  opacity: 1;
}
.primary > menu li a.completed:hover::after { background: rgba(73,156,116,.22); }
.primary > menu li a.no-com:hover::after { background: rgba(156,103,40,.24); }

/* Week 8 incomplete status: red warning accent */
.primary > menu li a.no-com::before {
  color: #26070d;
  background: linear-gradient(145deg, #ffc0cb, #ef536d);
  box-shadow: 0 0 9px rgba(239,83,109,.42), inset 0 1px rgba(255,255,255,.78);
}
.primary > menu li a.no-com::after {
  color: #ffadbb;
  border-color: rgba(239,83,109,.34);
  background: rgba(150,38,57,.2);
}
.primary > menu li a.no-com:hover::after { background: rgba(177,39,64,.3); }

/* Clear reflective glass with no tinted fill. */
.JxmeTP > header,
.primary,
.second,
.third,
.task-form,
.flowchart-img-container,
.student-card,
footer {
  background:
    linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.012) 24%, rgba(255,255,255,.025)) padding-box,
    linear-gradient(145deg, rgba(151,137,163,.32), rgba(108,98,118,.1) 20%, rgba(82,76,91,.06) 68%, rgba(132,117,147,.22)) border-box !important;
  border-color: transparent;
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.24),
    inset 0 -1px 1px rgba(255,255,255,.06),
    0 0 0 1px rgba(105,96,115,.08),
    0 12px 28px rgba(0,0,0,.3),
    0 2px 12px rgba(105,96,115,.06);
  backdrop-filter: blur(10px) saturate(115%);
  -webkit-backdrop-filter: blur(10px) saturate(115%);
}
.primary,
.second,
.third { border: 1px solid transparent; }
.task-form,
.flowchart-img-container,
.student-card { border: 1px solid rgba(137,125,150,.2); }
.JxmeTP > header {
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
nav a,
menu li a,
.week-content-group > p:first-child a,
.btn-lang,
button,
input[type="submit"],
input[type="reset"] {
  color: #f4f4f6 !important;
  border-color: rgba(139,128,151,.3) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.015)) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.2), 0 5px 14px rgba(0,0,0,.28) !important;
  backdrop-filter: blur(8px) saturate(110%);
  -webkit-backdrop-filter: blur(8px) saturate(110%);
}
input[type="text"],
input[type="number"],
input[type="email"],
textarea,
select {
  border-color: rgba(139,128,151,.26) !important;
  background: rgba(10,9,12,.28) !important;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.glass-toggle { display: none !important; }

/* Keep content neutral so purple remains a glass and edge-reflection color. */
body.glass-transparent header h3,
body.glass-transparent nav a,
body.glass-transparent .primary,
body.glass-transparent .second,
body.glass-transparent .third {
  color: #f3f4f6;
}
body.glass-transparent header h3 { text-shadow: 0 1px 0 rgba(255,255,255,.14); }
body.glass-transparent nav a,
body.glass-transparent .primary strong,
body.glass-transparent .second strong,
body.glass-transparent .primary menu li a,
body.glass-transparent .second menu li a,
body.glass-transparent .week-content-group > p:first-child a,
body.glass-transparent .third h3,
body.glass-transparent .third h4,
body.glass-transparent .task-form h3,
body.glass-transparent .third b,
body.glass-transparent .info-name {
  color: #f3f4f6 !important;
}
body.glass-transparent .third p,
body.glass-transparent .third label,
body.glass-transparent .info-details,
body.glass-transparent #third-content [id^="result"],
body.glass-transparent td,
body.glass-transparent footer p {
  color: #d4d5da !important;
}
body.glass-transparent th { color: #f3f4f6; }
body.glass-transparent .third input[type="text"],
body.glass-transparent .third input[type="number"],
body.glass-transparent .third input[type="email"],
body.glass-transparent .third textarea,
body.glass-transparent .third select {
  border-color: rgba(210,211,218,.48) !important;
}
body.glass-transparent .third input:focus,
body.glass-transparent .third textarea:focus,
body.glass-transparent .third select:focus {
  border-color: rgba(240,241,245,.85) !important;
  box-shadow: 0 0 0 2px rgba(238,239,244,.12), 0 0 10px rgba(238,239,244,.12), inset 0 1px 2px rgba(0,0,0,.48) !important;
}
body.glass-transparent .third button,
body.glass-transparent .third input[type="submit"],
body.glass-transparent .third input[type="reset"] {
  color: #f3f4f6 !important;
  border-color: rgba(220,221,227,.6) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.12), transparent 48%), linear-gradient(145deg, #38363d, #1e1d22 72%, #131216) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.2), 0 5px 13px rgba(0,0,0,.4) !important;
}
body.glass-transparent .third button:hover,
body.glass-transparent .third input[type="submit"]:hover,
body.glass-transparent .third input[type="reset"]:hover {
  box-shadow: inset 0 1px rgba(255,255,255,.28), 0 0 12px rgba(255,255,255,.12), 0 7px 15px rgba(0,0,0,.46) !important;
}

/* Neutral content colors remain readable against the clear glass surfaces. */
header h3,
nav a,
.primary strong,
.second strong,
.primary menu li a,
.second menu li a,
.week-content-group > p:first-child a,
.third h3,
.third h4,
.task-form h3,
.third b,
.info-name { color: #f3f4f6 !important; }
.third p,
.third label,
.info-details,
#third-content [id^="result"],
td,
footer p { color: #d4d5da !important; }
th { color: #f3f4f6; }
