﻿* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Arial, sans-serif;
}

body {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(2, 12, 22, .45), rgba(3, 32, 24, .55)),
    url("background.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.bg-filters {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.bg-aura {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("background.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  mix-blend-mode: screen;
  opacity: .55;
  -webkit-mask-image: radial-gradient(ellipse 42% 55% at 68% 60%, #000 0%, rgba(0, 0, 0, .8) 35%, transparent 78%);
  mask-image: radial-gradient(ellipse 42% 55% at 68% 60%, #000 0%, rgba(0, 0, 0, .8) 35%, transparent 78%);
  filter: url(#aura-flow);
  animation: auraPulse 7s ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes auraPulse {
  0%, 100% { opacity: .48; transform: scale(1); }
  50% { opacity: .76; transform: scale(1.018); }
}

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

.bg-embers .ember {
  position: absolute;
  left: var(--x);
  bottom: 6%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #6ee7a8;
  box-shadow: 0 0 6px 2px rgba(74, 222, 128, .75);
  opacity: 0;
  animation: emberRise var(--dur) linear var(--delay) infinite;
}

@keyframes emberRise {
  0% { transform: translate(0, 0); opacity: 0; }
  8% { opacity: .85; }
  55% { transform: translate(8px, -160px); }
  90% { opacity: .25; }
  100% { transform: translate(-6px, -280px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .bg-aura, .bg-embers .ember {
    animation: none;
  }
}

.app {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  display: flex;
}

.sidebar {
  width: 310px;
  min-height: 100vh;
  padding: 48px 32px;
  color: white;
  background:
    linear-gradient(180deg, rgba(18, 6, 70, .58), rgba(0, 64, 42, .58)),
    url("background-left.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    column-gap: 0;
    row-gap: 18px;
    margin-bottom: 70px;
    flex-wrap: wrap;
}

.brand-logo {
    width: 100%;
    max-width: 260px;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 18px rgba(34, 197, 94, .38)) drop-shadow(0 0 26px rgba(168, 85, 247, .28));
    transition: transform .25s ease, filter .25s ease;
}

.brand-logo:hover {
    transform: translateY(-2px) scale(1.03);
    filter: drop-shadow(0 0 24px rgba(34, 197, 94, .58)) drop-shadow(0 0 32px rgba(168, 85, 247, .42));
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.menu-item {
  border: none;
  background: transparent;
  color: #f3e8ff;
  padding: 18px 20px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  font-size: 18px;
  cursor: pointer;
  transition: .25s;
}


.menu-icon {
  width: 45px;
  height: 45px;
  border-radius: 70%;
  object-fit: cover;
  flex: 0 0 45px;
}

.menu-item span {
  line-height: 1;
}
.menu-item:hover,
.menu-item.active {
  background: white;
  color: #15803d;
  font-weight: 800;
  box-shadow: 0 15px 30px rgba(0,0,0,.15);
}

.support {
  margin-top: auto;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 32px;
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(16, 8, 48, .62), rgba(4, 48, 38, .5)),
    rgba(255,255,255,.08);
  border: 1px solid rgba(168, 85, 247, .32);
  box-shadow:
    inset 0 0 24px rgba(34, 211, 238, .08),
    0 18px 44px rgba(0, 0, 0, .22);
  backdrop-filter: blur(14px);
  transform: translateZ(0);
  transition:
    transform .34s cubic-bezier(.2, .8, .2, 1),
    border-color .34s ease,
    box-shadow .34s ease;
}

.support::before {
  content: "";
  position: absolute;
  inset: -40%;
  z-index: -2;
  background:
    radial-gradient(circle at 18% 20%, rgba(168, 85, 247, .34), transparent 30%),
    radial-gradient(circle at 84% 78%, rgba(34, 197, 94, .32), transparent 34%);
  opacity: .72;
  animation: supportAura 5.6s ease-in-out infinite alternate;
}

.support::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(115deg, transparent 0 36%, rgba(216, 180, 254, .18) 48%, transparent 60%);
  opacity: 0;
  transform: translateX(-120%);
  transition: transform .62s cubic-bezier(.2, .8, .2, 1), opacity .25s ease;
}

.support:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 197, 94, .62);
  box-shadow:
    inset 0 0 28px rgba(34, 211, 238, .1),
    0 24px 58px rgba(0, 0, 0, .3),
    0 0 28px rgba(34, 197, 94, .22),
    0 0 36px rgba(124, 58, 237, .16);
}

.support:hover::after {
  opacity: 1;
  transform: translateX(120%);
}

.support h3 {
  position: relative;
  z-index: 1;
  font-size: 22px;
  margin-bottom: 12px;
  color: #f8fafc;
  text-shadow:
    0 0 14px rgba(34, 197, 94, .35),
    0 0 22px rgba(124, 58, 237, .22);
}

.support p {
  position: relative;
  z-index: 1;
  color: #dcfce7;
  margin-bottom: 24px;
  line-height: 1.45;
}

.support button {
  position: relative;
  z-index: 1;
  border: none;
  background: linear-gradient(135deg, #6d28d9, #16a34a);
  color: white;
  padding: 15px 28px;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 22px rgba(34, 197, 94, .24);
  transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
}

.support button:hover {
  transform: translateY(-3px);
  filter: saturate(1.12);
  box-shadow:
    0 0 26px rgba(34, 197, 94, .42),
    0 0 30px rgba(124, 58, 237, .2);
}

@keyframes supportAura {
  from {
    transform: translate3d(-4%, -3%, 0) rotate(0deg);
  }
  to {
    transform: translate3d(4%, 3%, 0) rotate(8deg);
  }
}

.main {
  flex: 1;
  padding: 56px 70px;
  overflow-x: hidden;
  background: rgba(3, 14, 18, .18);
  backdrop-filter: none;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 70px;
  gap: 25px;
  position: relative;
}

.search {
  max-width: 680px;
  width: 100%;
  min-height: 66px;
  padding: 0 24px;
  border-radius: 24px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(135deg, rgba(17, 9, 45, .78), rgba(2, 39, 31, .72)),
    rgba(255,255,255,.08);
  border: 1px solid rgba(167, 139, 250, .45);
  box-shadow:
    inset 0 0 24px rgba(34, 211, 238, .08),
    0 18px 42px rgba(12, 6, 38, .34),
    0 0 34px rgba(124, 58, 237, .24);
  backdrop-filter: blur(18px);
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.search::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(168, 85, 247, .38), transparent 30%),
    radial-gradient(circle at 85% 80%, rgba(34, 197, 94, .3), transparent 32%);
  opacity: .75;
  z-index: -2;
}

.search::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 23px;
  border: 1px solid rgba(34, 211, 238, .12);
  pointer-events: none;
  z-index: -1;
}

.search:focus-within {
  transform: translateY(-2px);
  border-color: rgba(34, 197, 94, .9);
  box-shadow:
    inset 0 0 24px rgba(34, 211, 238, .14),
    0 20px 48px rgba(12, 6, 38, .42),
    0 0 0 4px rgba(34, 197, 94, .12),
    0 0 36px rgba(34, 197, 94, .32),
    0 0 54px rgba(124, 58, 237, .34);
}

.search-icon {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  font-size: 18px;
  background: linear-gradient(135deg, rgba(237, 233, 254, .22), rgba(220, 252, 231, .2));
  box-shadow: 0 0 20px rgba(124, 58, 237, .22);
}

.search-glow {
  position: absolute;
  right: -70px;
  top: 50%;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 197, 94, .22), transparent 65%);
  transform: translateY(-50%);
  pointer-events: none;
  opacity: .75;
}

.search input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 18px;
  color: #ecfeff;
  background: transparent;
  position: relative;
  z-index: 1;
}

.search input::placeholder {
  color: rgba(209, 250, 229, .72);
}

.search-status {
  position: absolute;
  left: 8px;
  bottom: -30px;
  min-height: 20px;
  color: #bbf7d0;
  font-size: 14px;
  text-shadow: 0 0 12px rgba(34, 197, 94, .35);
}

.search-hidden {
  display: none !important;
  opacity: 0;
  transform: translateY(10px) scale(.98);
  pointer-events: none;
  max-height: 0;
  min-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
  border-width: 0 !important;
  overflow: hidden;
}

.card,
.course,
.lesson-section {
  transition:
    opacity .24s ease,
    transform .24s ease,
    max-height .24s ease,
    padding .24s ease,
    margin .24s ease,
    border-color .25s ease,
    box-shadow .25s ease;
}

.search-match {
  animation: searchMatchIn .24s ease both;
}

@keyframes searchMatchIn {
  from {
    opacity: .45;
    transform: translateY(8px) scale(.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.icons {
  font-size: 28px;
  color: #4c1d95;
  white-space: nowrap;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.page h1 {
  color: #ecfeff;
  text-shadow:
    0 0 14px rgba(34, 211, 238, .35),
    0 0 24px rgba(34, 197, 94, .22);
}

.page > p {
  color: #d1fae5;
  text-shadow: 0 0 12px rgba(34, 197, 94, .24);
}

h1 {
  font-size: 34px;
  margin-bottom: 34px;
  color: #111827;
}

.courses {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 35px;
  margin-bottom: 65px;
  perspective: 1100px;
}

.course {
  min-height: 260px;
  color: white;
  padding: 45px;
  border-radius: 36px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  box-shadow: 0 25px 50px rgba(76,29,149,.22);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transform: translateZ(0);
  transform-style: preserve-3d;
  transition:
    transform .48s cubic-bezier(.16, 1, .3, 1),
    border-color .42s ease,
    box-shadow .42s ease,
    filter .42s ease;
}

.course::before {
  content: "";
  position: absolute;
  inset: -1px;
  background:
    linear-gradient(90deg, rgba(34, 197, 94, .55), transparent 24%, transparent 76%, rgba(168, 85, 247, .55)),
    linear-gradient(180deg, rgba(34, 211, 238, .22), transparent 30%, transparent 70%, rgba(34, 197, 94, .22));
  opacity: 0;
  border-radius: inherit;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  padding: 1px;
  transition: opacity .38s ease, filter .38s ease;
  z-index: 1;
}

.course::after {
  content: "";
  position: absolute;
  inset: -30% 0;
  z-index: 1;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      180deg,
      transparent 0 18px,
      rgba(34, 197, 94, .12) 19px,
      transparent 20px
    ),
    radial-gradient(circle at 50% 50%, rgba(34, 211, 238, .18), transparent 42%);
  opacity: 0;
  transform: translateY(-18%) scale(1.06);
  transition: opacity .34s ease, transform .62s cubic-bezier(.16, 1, .3, 1);
}

.course:hover {
  transform: translateY(-14px) rotateX(3deg) rotateY(-2deg) scale(1.018);
  filter: saturate(1.12) contrast(1.06);
  box-shadow:
    0 34px 84px rgba(0, 0, 0, .42),
    0 0 0 1px rgba(34, 197, 94, .28),
    0 0 38px rgba(34, 197, 94, .28),
    0 0 58px rgba(124, 58, 237, .22);
}

.course:hover::before {
  opacity: 1;
  filter: drop-shadow(0 0 18px rgba(34, 197, 94, .36));
}

.course:hover::after {
  opacity: .9;
  transform: translateY(16%) scale(1.06);
  animation: courseHologramScan 1.35s ease-in-out infinite alternate;
}

.course:hover .course-icon {
  transform: translate3d(0, -8px, 34px) scale(1.1);
  box-shadow:
    0 0 26px rgba(34, 197, 94, .42),
    0 0 42px rgba(124, 58, 237, .28);
  animation: courseIconPulse 1.4s ease-in-out infinite alternate;
}

.course:hover h2 {
  transform: translate3d(0, -3px, 28px);
  text-shadow:
    0 0 16px rgba(34, 211, 238, .55),
    0 0 28px rgba(34, 197, 94, .28);
}

.course:hover p {
  transform: translate3d(0, -2px, 22px);
}

.course-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 34px;
  margin-bottom: 28px;
  background: rgba(255,255,255,.16);
  position: relative;
  z-index: 2;
  transition: transform .34s cubic-bezier(.2, .8, .2, 1), box-shadow .34s ease;
}

.course span {
  position: absolute;
  top: 32px;
  right: 32px;
  padding: 14px 22px;
  border-radius: 15px;
  font-weight: 800;
  background: rgba(255,255,255,.18);
}

.course-icon,
.course h2,
.course p {
  position: relative;
  z-index: 2;
}

.course h2 {
  font-size: 29px;
  margin-bottom: 14px;
  transition: transform .34s ease, text-shadow .34s ease;
}

.course p {
  font-size: 18px;
  line-height: 1.5;
  color: #f5f3ff;
  transition: transform .34s ease;
}

@keyframes courseHologramScan {
  from {
    background-position: 0 0, 50% 42%;
  }
  to {
    background-position: 0 26px, 50% 58%;
  }
}

@keyframes courseIconPulse {
  from {
    filter: drop-shadow(0 0 0 rgba(34, 197, 94, 0));
  }
  to {
    filter: drop-shadow(0 0 12px rgba(34, 197, 94, .58));
  }
}

.purple {
  background:
    linear-gradient(90deg, rgba(4, 7, 24, .72), rgba(22, 8, 58, .22)),
    url("cloud-basics.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid rgba(124, 58, 237, .45);
}

.green {
  background:
    linear-gradient(90deg, rgba(2, 18, 13, .72), rgba(6, 78, 59, .18)),
    url("mikroticbasics.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid rgba(34, 197, 94, .42);
}

.title {
  margin-bottom: 35px;

  color: #ecfeff;
  text-shadow: 0 0 14px rgba(34, 211, 238, .35);
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 30px;
}

.card {
  min-height: 260px;
  padding: 34px;
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  color: #ecfeff;
  background:
    linear-gradient(145deg, rgba(3, 7, 18, .86), rgba(3, 34, 27, .72)),
    var(--card-mini-bg, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid rgba(168, 85, 247, .28);
  box-shadow:
    inset 0 0 30px rgba(34, 211, 238, .06),
    0 20px 50px rgba(0, 0, 0, .28);
  cursor: pointer;
  transform: translateZ(0);
  transition:
    transform .34s cubic-bezier(.2, .8, .2, 1),
    border-color .34s ease,
    box-shadow .34s ease,
    filter .34s ease;
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--card-mini-bg, none);
  background-size: cover;
  background-position: center;
  opacity: .62;
  transform: scale(1.03);
  transition: transform .35s ease, opacity .35s ease, filter .35s ease;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(115deg, transparent 0 32%, rgba(216, 180, 254, .18) 44%, transparent 56%),
    linear-gradient(180deg, rgba(2, 6, 16, .36), rgba(2, 8, 18, .76)),
    radial-gradient(circle at 18% 18%, rgba(124, 58, 237, .28), transparent 34%),
    radial-gradient(circle at 88% 90%, rgba(34, 197, 94, .24), transparent 36%);
  background-size: 220% 100%, 100% 100%, 100% 100%, 100% 100%;
  background-position: -130% 0, 0 0, 0 0, 0 0;
  transition: background-position .62s cubic-bezier(.2, .8, .2, 1), opacity .34s ease;
}

.card[data-topic="security"] {
  --card-mini-bg: url("securitymini.jpg");
}

.card[data-topic="domain"] {
  --card-mini-bg: url("cloudmini.jpg");
}

.card[data-topic="docker"] {
  --card-mini-bg: url("dockermini.jpg");
}

.card[data-topic="linux"] {
  --card-mini-bg: url("linuxmini.jpg");
}

.card[data-topic="devops"] {
  --card-mini-bg: url("devopsmini.jpg");
}

.card[data-topic="networking"] {
  --card-mini-bg: url("networkingmini.jpg");
}

.card[data-topic="mikrotik"] {
  --card-mini-bg: url("microticmini.jpg");
}

.card[data-topic="server"] {
  --card-mini-bg: url("windowsservermini.jpg");
}

.card:hover {
  transform: translateY(-12px) scale(1.018);
  filter: saturate(1.08) contrast(1.04);
  border-color: rgba(34, 197, 94, .72);
  box-shadow:
    inset 0 0 34px rgba(34, 211, 238, .08),
    0 30px 76px rgba(0, 0, 0, .38),
    0 0 32px rgba(34, 197, 94, .28),
    0 0 44px rgba(124, 58, 237, .2);
}

.card:hover::before {
  opacity: .78;
  filter: saturate(1.12) contrast(1.06);
  transform: scale(1.08);
}

.card:hover::after {
  background-position: 130% 0, 0 0, 0 0, 0 0;
}

.card-icon {
  width: 74px;
  height: 74px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-size: 34px;
  color: #f8fafc;
  background: linear-gradient(135deg, rgba(237, 233, 254, .22), rgba(220, 252, 231, .2));
  border: 1px solid rgba(216, 180, 254, .24);
  box-shadow: 0 0 22px rgba(124, 58, 237, .2);
  margin-bottom: 30px;
  position: relative;
  z-index: 1;
  transition:
    transform .34s cubic-bezier(.2, .8, .2, 1),
    box-shadow .34s ease,
    border-color .34s ease,
    background .34s ease;
}

.card:hover .card-icon {
  transform: translateY(-5px) scale(1.08) rotate(-4deg);
  border-color: rgba(34, 197, 94, .45);
  background: linear-gradient(135deg, rgba(168, 85, 247, .36), rgba(34, 197, 94, .28));
  box-shadow:
    0 0 24px rgba(34, 197, 94, .3),
    0 0 34px rgba(124, 58, 237, .24);
}

.card h3 {
  font-size: 21px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
  color: #f8fafc;
  text-shadow: 0 0 14px rgba(34, 197, 94, .26);
  transition: transform .34s ease, text-shadow .34s ease;
}

.card:hover h3 {
  transform: translateX(4px);
  text-shadow:
    0 0 16px rgba(34, 211, 238, .58),
    0 0 30px rgba(34, 197, 94, .32);
}

.card p {
  position: relative;
  z-index: 1;
  color: #d1fae5;
  line-height: 1.5;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .42);
  transition: transform .34s ease, color .34s ease;
}

.card:hover p {
  color: #ecfeff;
  transform: translateX(4px);
}

.card b {
  position: absolute;
  z-index: 1;
  right: 28px;
  bottom: 24px;
  font-size: 32px;
  color: #4ade80;
  text-shadow: 0 0 18px rgba(34, 197, 94, .64);
  transition: transform .34s ease, color .34s ease, text-shadow .34s ease;
}

.card:hover b {
  color: #86efac;
  transform: translateX(6px);
  text-shadow:
    0 0 18px rgba(34, 197, 94, .8),
    0 0 28px rgba(124, 58, 237, .34);
}

.back {
  padding: 15px 26px;
  border: none;
  border-radius: 15px;
  background: #4c1d95;
  color: white;
  font-weight: 800;
  cursor: pointer;
  margin-bottom: 35px;
}

#lessonText {
  max-width: 900px;
  font-size: 22px;
  line-height: 1.8;
  color: #374151;
}

#lesson.active {
  min-height: calc(100vh - 190px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

#lesson .back {
  align-self: flex-start;
}

#lessonTitle,
#lessonText {
  width: min(1120px, 100%);
}

#lessonTitle {
  margin-top: 80px;
  margin-bottom: 0;
  padding: 42px 52px 14px;
  border-radius: 28px 28px 0 0;
  background: rgba(5, 12, 28, .62);
  border: 1px solid rgba(34, 211, 238, .22);
  border-bottom: 0;
  color: #ecfeff;
  text-align: center;
  font-size: 46px;
  font-weight: 900;
  text-shadow:
    0 0 16px rgba(34,211,238,.55),
    0 0 28px rgba(34,197,94,.32);
  backdrop-filter: blur(10px);
}

#lessonText {
  max-width: none;
  padding: 8px 52px 46px;
  border-radius: 0 0 28px 28px;
  background: rgba(5, 12, 28, .62);
  border: 1px solid rgba(34, 211, 238, .22);
  border-top: 0;
  color: #d1fae5;
  text-align: center;
  font-size: 24px;
  line-height: 1.65;
  box-shadow:
    0 24px 70px rgba(0,0,0,.32),
    inset 0 0 34px rgba(34,197,94,.08);
  backdrop-filter: blur(10px);
}

.lesson-content {
  display: grid;
  gap: 22px;
  text-align: left;
}

.lesson-intro {
  text-align: center;
  font-size: 27px;
  line-height: 1.65;
  color: #d1fae5;
  margin-bottom: 4px;
}

.lesson-section {
  padding: 30px 34px;
  border-radius: 22px;
  background: rgba(2, 18, 28, .48);
  border: 1px solid rgba(34, 211, 238, .2);
  box-shadow: inset 0 0 24px rgba(34,197,94,.06);
}

.lesson-section h2 {
  color: #ecfeff;
  font-size: 32px;
  margin-bottom: 16px;
  text-shadow: 0 0 14px rgba(34,211,238,.42);
}

.lesson-section h3 {
  color: #86efac;
  font-size: 21px;
  margin: 16px 0 8px;
}

.lesson-section p {
  color: #d1fae5;
  font-size: 20px;
  line-height: 1.65;
}

.lesson-section ul,
.lesson-section ol {
  color: #d1fae5;
  font-size: 19px;
  line-height: 1.65;
  padding-left: 24px;
  margin: 8px 0;
}

.lesson-section li {
  margin-bottom: 6px;
}

.lesson-section strong {
  color: #ecfeff;
}

.lesson-section a {
  color: #67e8f9;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lesson-section a:hover {
  color: #a5f3fc;
}

.lesson-section code {
  background: rgba(34, 197, 94, .12);
  color: #86efac;
  padding: 2px 7px;
  border-radius: 6px;
  font-family: "Courier New", monospace;
  font-size: .92em;
}

.lesson-section pre {
  background: rgba(2, 10, 16, .65);
  border: 1px solid rgba(34, 211, 238, .18);
  border-radius: 14px;
  padding: 18px 20px;
  overflow-x: auto;
  margin: 10px 0;
}

.lesson-section pre code {
  background: none;
  padding: 0;
  color: #a7f3d0;
}

.lesson-section blockquote,
.lesson-content > blockquote {
  border-left: 3px solid #facc15;
  background: rgba(250, 204, 21, .08);
  padding: 12px 18px;
  border-radius: 0 12px 12px 0;
  margin: 10px 0;
  color: #fef9c3;
  font-size: 19px;
  line-height: 1.6;
}

.lesson-content > blockquote p {
  color: #fef9c3;
}

.lesson-table-scroll {
  overflow-x: auto;
  margin: 10px 0;
}

.lesson-section table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

.lesson-section th {
  color: #67e8f9;
  font-size: 17px;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 2px solid rgba(34, 211, 238, .28);
}

.lesson-section td {
  color: #d1fae5;
  font-size: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(34, 197, 94, .16);
  vertical-align: top;
}

.course-module-list {
  list-style: none;
  display: grid;
  gap: 10px;
  margin: 8px 0 0;
  padding: 0;
}

.course-module-link {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border: 1px solid rgba(34, 211, 238, .18);
  border-radius: 14px;
  background: rgba(2, 18, 28, .4);
  color: #d1fae5;
  font-size: 18px;
  font-weight: 600;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.course-module-link:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, .5);
  background: rgba(2, 18, 28, .62);
}

.course-module-arrow {
  color: #67e8f9;
  font-size: 20px;
  flex-shrink: 0;
}

.module-quiz-form {
  display: grid;
  gap: 16px;
  margin-top: 10px;
}

.quiz-question {
  padding: 18px 20px;
  border-radius: 14px;
  background: rgba(2, 10, 16, .5);
  border: 1px solid rgba(34, 211, 238, .16);
  transition: border-color .2s ease, background .2s ease;
}

.quiz-question-text {
  color: #ecfeff;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.quiz-option {
  display: block;
  color: #d1fae5;
  font-size: 17px;
  margin: 8px 0;
  cursor: pointer;
}

.quiz-option input {
  margin-right: 8px;
}

.quiz-open-input {
  width: 100%;
  min-height: 80px;
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(34, 211, 238, .18);
  background: rgba(2, 10, 16, .6);
  color: #d1fae5;
  font-family: inherit;
  font-size: 16px;
  resize: vertical;
}

.quiz-answer-feedback {
  margin-top: 10px;
  font-weight: 700;
  font-size: 15px;
}

.quiz-question.is-correct {
  border-color: rgba(34, 197, 94, .48);
  background: rgba(2, 30, 18, .55);
}

.quiz-question.is-correct .quiz-answer-feedback {
  color: #86efac;
}

.quiz-question.is-wrong {
  border-color: rgba(248, 113, 113, .48);
  background: rgba(40, 8, 8, .4);
}

.quiz-question.is-wrong .quiz-answer-feedback {
  color: #fca5a5;
}

.quiz-score {
  margin-top: 16px;
  font-size: 19px;
  font-weight: 800;
  color: #86efac;
}

.chatgpt-check-btn {
  margin-top: 10px;
  padding: 10px 18px;
  border: 1px solid rgba(103, 232, 249, .35);
  border-radius: 12px;
  background: rgba(103, 232, 249, .1);
  color: #67e8f9;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;
}

.chatgpt-check-btn:hover {
  transform: translateY(-1px);
  background: rgba(103, 232, 249, .18);
}

.chatgpt-check-status {
  margin-top: 8px;
  font-size: 14px;
  color: #a5f3fc;
}

.quiz-self-score {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(34, 211, 238, .14);
  color: #d1fae5;
  font-size: 15px;
}

.quiz-self-score-option {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(34, 211, 238, .18);
  cursor: pointer;
}

.lesson-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px 18px;
  margin-top: 12px;
  padding-left: 20px;
  color: #d1fae5;
  font-size: 20px;
  line-height: 1.45;
}

@media (max-width: 1200px) {
  .main {
    padding: 45px;
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
/*контейнер для текста*/
@media (max-width: 900px) {
  .app {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    min-height: auto;
  }

  .support {
    display: none;
  }

  .menu {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .courses {
    grid-template-columns: 1fr;
  }

  .top {
    align-items: stretch;
    flex-direction: column;
    margin-bottom: 58px;
  }

  .search {
    max-width: none;
  }

  .search-status {
    left: 4px;
    bottom: -24px;
  }
}

/* Телефон */
@media (max-width: 600px) {
  .main {
    padding: 24px 10px;
  }

  .brand {
    margin-bottom: 35px;
  }

  .brand-logo {
    max-width: 200px;
  }

  .menu {
    grid-template-columns: 1fr 1fr;
  }

  .top {
    flex-direction: column;
    align-items: stretch;
  }

  .search {
    min-height: 58px;
    padding: 0 16px;
    border-radius: 20px;
    gap: 10px;
  }

  .search::after {
    border-radius: 19px;
  }

  #lessonTitle,
  #lessonText {
    width: 100%;
  }

  #lessonTitle {
    margin-top: 34px;
    padding: 28px 14px 12px;
    border-radius: 20px 20px 0 0;
    font-size: 34px;
  }

  #lessonText {
    padding: 6px 10px 28px;
    border-radius: 0 0 20px 20px;
    font-size: 18px;
  }

  .lesson-content {
    gap: 14px;
  }

  .lesson-intro {
    font-size: 20px;
  }

  .lesson-section {
    padding: 22px 14px;
    border-radius: 16px;
  }

  .lesson-section h2 {
    font-size: 27px;
  }

  .lesson-section h3 {
    font-size: 19px;
  }

  .lesson-section p {
    font-size: 17px;
    line-height: 1.58;
  }

  .search-icon {
    width: 36px;
    height: 36px;
    border-radius: 13px;
    font-size: 16px;
  }

  .search input {
    font-size: 16px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 27px;
  }

  .course {
    padding: 30px;
  }

  .course h2 {
    font-size: 24px;
  }
}
.register-form {
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: white;
  padding: 32px;
  border-radius: 26px;
  box-shadow: 0 20px 50px rgba(22,101,52,.08);
}

.register-form input {
  width: 100%;
  padding: 17px 20px;
  border: 2px solid #e9d5ff;
  border-radius: 15px;
  font-size: 17px;
  outline: none;
}

.register-form input:focus {
  border-color: #22c55e;
}

.register-form button {
  border: none;
  background: linear-gradient(135deg, #4c1d95, #22c55e);
  color: white;
  padding: 17px;
  border-radius: 15px;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

#registerMessage {
  margin-top: 20px;
  font-size: 18px;
  font-weight: 700;
  color: #15803d;
}

.users-table {
  width: 100%;
  overflow-x: auto;
  background: white;
  padding: 25px;
  border-radius: 26px;
  box-shadow: 0 20px 50px rgba(22,101,52,.08);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 18px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

th {
  color: #4c1d95;
  font-size: 18px;
}

td {
  font-size: 17px;
}

@media (max-width: 600px) {
  .register-form {
    padding: 22px;
  }

  th,
  td {
    padding: 13px;
    font-size: 14px;
  }
}
.page-subtitle {
  font-size: 18px;
  color: #4b5563;
  margin-bottom: 28px;
}

.chat-shell {
  max-width: 1040px;
  min-height: 620px;
  border: 1px solid rgba(34, 211, 238, .14);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(2, 8, 18, .9), rgba(3, 18, 24, .76)),
    rgba(255,255,255,.03);
  box-shadow:
    inset 0 0 30px rgba(34, 211, 238, .04),
    0 22px 55px rgba(0,0,0,.35);
  overflow: hidden;
  backdrop-filter: blur(14px);
}

.chat-header {
  padding: 34px 36px 26px;
  display: grid;
  grid-template-columns: 58px 1fr 36px;
  gap: 22px;
  align-items: center;
  border-bottom: 1px solid rgba(148, 163, 184, .1);
}

.chat-header-icon {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #4ade80;
  font-size: 24px;
  font-weight: 900;
  background: rgba(34, 197, 94, .08);
  border: 1px solid rgba(34, 197, 94, .2);
  box-shadow: 0 0 22px rgba(34, 197, 94, .18);
}

.chat-header h1 {
  margin: 0 0 8px;
  color: #f8fafc;
  font-size: 28px;
}

.chat-header p {
  color: #94a3b8;
  font-size: 15px;
}

.chat-more {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 28px;
  cursor: pointer;
}

.discussion-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin: 0;
  padding: 22px 34px 0;
  border-bottom: 1px solid rgba(148, 163, 184, .1);
}

.discussion-tab {
  border: none;
  padding: 14px 0 18px;
  border-radius: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: none;
  transition: 0.25s;
  position: relative;
}

.discussion-tab.active,
.discussion-tab:hover {
  background: transparent;
  color: #4ade80;
}

.discussion-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: #22c55e;
  box-shadow: 0 0 16px rgba(34, 197, 94, .78);
}

.comment-box {
  padding: 14px 22px;
  min-height: 82px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 14px;
  background: rgba(2, 8, 18, .72);
  border-top: 1px solid rgba(148, 163, 184, .12);
}

.comment-box textarea {
  width: 100%;
  border: none;
  border-radius: 0;
  padding: 12px 4px;
  font-size: 16px;
  outline: none;
  margin-bottom: 0;
  background: transparent;
  color: #e2e8f0;
}

.comment-box textarea {
  min-height: 44px;
  max-height: 120px;
  resize: none;
}

.comment-box textarea::placeholder {
  color: #94a3b8;
}

.chat-current-user {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #bbf7d0;
  font-size: 13px;
  font-weight: 800;
  min-width: 108px;
}

.chat-current-user img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 18px rgba(34, 197, 94, .42);
}

.emoji-bar {
  display: flex;
  gap: 4px;
}

.emoji-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  transition: background .2s ease, transform .2s ease;
}

.emoji-btn:hover {
  background: rgba(168, 85, 247, .18);
  transform: translateY(-2px);
}

.comment-box button {
  border: none;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: white;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(34, 197, 94, .34);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 330px;
  padding: 34px;
  max-width: none;
}

.comment-card {
  max-width: 72%;
  background: rgba(15, 23, 42, .76);
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, .12);
  box-shadow: 0 15px 35px rgba(0, 0, 0, .18);
}

.comment-card.own-message {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(76, 29, 149, .62), rgba(22, 163, 74, .46));
  border-color: rgba(34, 197, 94, .32);
}

.comment-author {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.comment-author span {
  color: #86efac;
  font-weight: 900;
}

.comment-card p {
  color: #e2e8f0;
  line-height: 1.5;
}

.comment-card small {
  color: #94a3b8;
  white-space: nowrap;
}

.chat-empty {
  min-height: 300px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  color: #94a3b8;
}

.chat-empty-icon {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 28px;
  color: #22c55e;
  font-size: 42px;
  border: 1px solid rgba(168, 85, 247, .38);
  box-shadow:
    inset 0 0 22px rgba(34, 197, 94, .08),
    0 0 34px rgba(124, 58, 237, .28);
}

.chat-empty h3 {
  color: #e2e8f0;
  font-size: 24px;
  margin-bottom: 8px;
}

@media (max-width: 600px) {
  .chat-header {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .discussion-tabs {
    flex-direction: column;
    padding: 18px 24px 0;
  }

  .discussion-tab {
    width: 100%;
    text-align: left;
  }

  .comment-box {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .emoji-bar {
    justify-content: center;
    flex-wrap: wrap;
  }

  .comment-box button {
    width: 100%;
  }

  .comments-list {
    padding: 24px;
  }

  .comment-card {
    max-width: 100%;
  }
}
.topic-box {
  max-width: 800px;
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
}

.topic-box input {
  flex: 1;
  padding: 16px 18px;
  border: 2px solid #e9d5ff;
  border-radius: 16px;
  font-size: 16px;
  outline: none;
}

.topic-box input:focus {
  border-color: #22c55e;
}

.topic-box button {
  border: none;
  background: linear-gradient(135deg, #4c1d95, #22c55e);
  color: white;
  padding: 0 24px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 600px) {
  .topic-box {
    flex-direction: column;
  }

  .topic-box button {
    padding: 16px;
  }
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.language-select {
  min-width: 76px;
  padding: 13px 36px 13px 16px;
  border-radius: 14px;
  border: 1px solid rgba(168, 85, 247, .6);
  font-weight: 800;
  color: #ecfeff;
  cursor: pointer;
  outline: none;
  appearance: none;
  background:
    linear-gradient(135deg, rgba(20, 13, 46, .9), rgba(3, 45, 32, .72)),
    linear-gradient(45deg, transparent 50%, #86efac 50%) right 15px center / 8px 8px no-repeat,
    linear-gradient(135deg, #d8b4fe, #22c55e);
  box-shadow:
    inset 0 0 16px rgba(168, 85, 247, .14),
    0 0 18px rgba(124, 58, 237, .25),
    0 10px 28px rgba(0, 0, 0, .22);
  backdrop-filter: blur(12px);
  transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

.language-select:hover,
.language-select:focus {
  transform: translateY(-2px);
  border-color: rgba(34, 197, 94, .85);
  box-shadow:
    inset 0 0 18px rgba(34, 197, 94, .12),
    0 0 22px rgba(34, 197, 94, .3),
    0 0 30px rgba(124, 58, 237, .26);
}

.language-select option {
  color: #ecfeff;
  background: #070b18;
  font-weight: 800;
}

.bell-btn,
.profile-btn,
.burger-btn {
  position: relative;
  border: none;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
}

.bell-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  transition: transform .22s ease, filter .22s ease;
}

.bell-btn:hover {
  transform: translateY(-2px) scale(1.04);
  filter: drop-shadow(0 0 14px rgba(250, 204, 21, .55));
}

.bell-btn img {
  width: 38px;
  height: 38px;
  display: block;
  object-fit: cover;
  border-radius: 12px;
}

.profile-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: transform .22s ease, filter .22s ease;
}

.profile-btn:hover {
  transform: translateY(-2px) scale(1.04);
  filter: drop-shadow(0 0 16px rgba(168, 85, 247, .58));
}

.profile-btn img {
  width: 38px;
  height: 38px;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

.burger-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  transition: transform .22s ease, filter .22s ease;
}

.burger-btn:hover {
  transform: translateY(-2px) scale(1.04);
  filter:
    drop-shadow(0 0 12px rgba(34, 197, 94, .52))
    drop-shadow(0 0 10px rgba(250, 204, 21, .26));
}

.burger-btn img {
  width: 38px;
  height: 38px;
  display: block;
  object-fit: cover;
  border-radius: 12px;
}

#notificationCount {
  position: absolute;
  top: -8px;
  right: -10px;
  background: #ef4444;
  color: white;
  font-size: 12px;
  padding: 3px 7px;
  border-radius: 50%;
  display: none;
}

.burger-wrapper {
  position: relative;
}

.burger-menu {
  position: absolute;
  right: 0;
  top: 56px;
  width: 230px;
  background:
    linear-gradient(145deg, rgba(18, 14, 34, .92), rgba(8, 10, 24, .88)),
    rgba(255,255,255,.06);
  border: 1px solid rgba(168, 85, 247, .66);
  border-radius: 26px;
  box-shadow:
    inset 0 0 20px rgba(168, 85, 247, .12),
    0 0 0 1px rgba(216, 180, 254, .08),
    0 0 34px rgba(168, 85, 247, .48),
    0 22px 55px rgba(0, 0, 0, .42);
  padding: 18px;
  display: none;
  z-index: 99;
  overflow: hidden;
  backdrop-filter: blur(18px);
}

.burger-menu::before {
  content: "";
  position: absolute;
  inset: -45%;
  background:
    radial-gradient(circle at 20% 15%, rgba(168, 85, 247, .28), transparent 34%),
    radial-gradient(circle at 90% 90%, rgba(34, 197, 94, .18), transparent 32%);
  pointer-events: none;
}

.burger-menu.active {
  display: grid;
  gap: 4px;
  animation: menuPop .2s ease both;
}

.burger-menu button {
  width: 100%;
  border: none;
  background: transparent;
  padding: 18px 14px;
  text-align: left;
  border-radius: 16px;
  cursor: pointer;
  color: #f5f3ff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  transition: background .22s ease, color .22s ease, transform .22s ease, box-shadow .22s ease;
}

.burger-menu button + button {
  border-top: 1px solid rgba(216, 180, 254, .12);
}

.burger-menu button::before {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  color: #c084fc;
  font-size: 24px;
  text-shadow: 0 0 16px rgba(192, 132, 252, .65);
  background: rgba(168, 85, 247, .12);
}

#menuSearch::before {
  content: "⌕";
}

#menuHome::before {
  content: "⌂";
}

#menuLogout::before {
  content: "↪";
}

.burger-menu button:hover {
  color: #ecfeff;
  background: linear-gradient(135deg, rgba(124, 58, 237, .32), rgba(34, 197, 94, .14));
  box-shadow: inset 0 0 18px rgba(168, 85, 247, .18);
  transform: translateX(4px);
}

@keyframes menuPop {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.admin-message-box,
.profile-card {
  max-width: 700px;
  background: white;
  padding: 30px;
  border-radius: 26px;
  box-shadow: 0 20px 50px rgba(22,101,52,.08);
  margin-bottom: 30px;
}

.profile-heading {
  margin-bottom: 24px;
}

.profile-heading h1 {
  margin-bottom: 6px;
  color: #ecfeff;
  text-shadow: 0 0 18px rgba(34, 197, 94, .38);
}

.profile-heading p {
  color: #bbf7d0;
  font-size: 16px;
}

.profile-dashboard {
  max-width: 1180px;
  display: grid;
  grid-template-columns: minmax(360px, 1.35fr) minmax(320px, 1fr);
  gap: 18px;
}

.profile-main-card,
.profile-progress-card,
.profile-stat-card {
  border: 1px solid rgba(34, 211, 238, .18);
  background:
    linear-gradient(145deg, rgba(2, 8, 18, .82), rgba(3, 29, 24, .64)),
    rgba(255,255,255,.04);
  border-radius: 8px;
  box-shadow:
    inset 0 0 22px rgba(34, 211, 238, .06),
    0 18px 45px rgba(0, 0, 0, .28);
  backdrop-filter: blur(14px);
}

.profile-main-card {
  min-height: 250px;
  padding: 28px;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 28px;
  align-items: center;
  grid-row: span 2;
}

.profile-avatar-wrap {
  width: 128px;
  height: 128px;
  position: relative;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow:
    0 0 0 3px rgba(34, 197, 94, .82),
    0 0 28px rgba(34, 197, 94, .64);
}

.profile-avatar {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.profile-status-dot {
  position: absolute;
  right: 2px;
  bottom: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #22c55e;
  border: 4px solid #04110d;
  box-shadow: 0 0 14px rgba(34, 197, 94, .9);
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.profile-name-row h2 {
  color: #f0fdf4;
  font-size: 32px;
  line-height: 1;
  margin: 0;
  text-shadow: 0 0 16px rgba(34, 197, 94, .22);
}

.profile-role-select {
  padding: 7px 12px;
  border-radius: 8px;
  color: #f5d0fe;
  background: linear-gradient(135deg, rgba(124, 58, 237, .52), rgba(34, 197, 94, .18));
  border: 1px solid rgba(216, 180, 254, .28);
  font-size: 13px;
  font-weight: 800;
  outline: none;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(124, 58, 237, .18);
}

.profile-role-select:focus {
  border-color: rgba(34, 197, 94, .72);
  box-shadow:
    0 0 0 3px rgba(34, 197, 94, .12),
    0 0 18px rgba(124, 58, 237, .34);
}

.profile-role-select option:disabled {
  color: #94a3b8;
}

.profile-quote {
  color: #4ade80;
  margin-bottom: 20px;
  font-size: 16px;
}

.profile-info-grid {
  display: grid;
  gap: 12px;
}

.profile-info-grid p {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  margin: 0;
  color: #cbd5e1;
}

.profile-info-grid b,
.profile-progress-card span,
.profile-stat-card span,
.profile-progress-card small,
.profile-stat-card small {
  color: #94a3b8;
  font-weight: 600;
}

.profile-info-grid span {
  color: #f8fafc;
  font-weight: 800;
}

.profile-progress-card {
  min-height: 132px;
  padding: 24px;
  display: grid;
  grid-template-columns: 76px 92px 1fr;
  align-items: center;
  gap: 20px;
}

.level-badge {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  color: #bbf7d0;
  font-size: 36px;
  background: radial-gradient(circle, rgba(34, 197, 94, .24), rgba(4, 12, 20, .9));
  clip-path: polygon(50% 0, 92% 25%, 92% 75%, 50% 100%, 8% 75%, 8% 25%);
  box-shadow: 0 0 24px rgba(34, 197, 94, .45);
}

.profile-progress-card strong,
.profile-stat-card strong {
  display: block;
  color: #f8fafc;
  font-size: 34px;
  line-height: 1.05;
}

.xp-panel {
  position: relative;
}

.xp-track {
  height: 7px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, .22);
}

.xp-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #7cff00);
  box-shadow: 0 0 14px rgba(34, 197, 94, .72);
}

.xp-panel small {
  position: absolute;
  right: 0;
  top: 22px;
  color: #86efac;
}

.profile-stat-card {
  min-height: 130px;
  padding: 24px;
}

.admin-message-box textarea {
  width: 100%;
  height: 120px;
  padding: 16px;
  border: 2px solid #e9d5ff;
  border-radius: 16px;
  margin: 18px 0;
  resize: vertical;
}

.admin-message-box button {
  border: none;
  background: linear-gradient(135deg, #4c1d95, #22c55e);
  color: white;
  padding: 15px 25px;
  border-radius: 15px;
  font-weight: 800;
  cursor: pointer;
}

.notification-card {
  max-width: 700px;
  background: white;
  padding: 22px;
  border-radius: 20px;
  margin-bottom: 15px;
  border-left: 6px solid #22c55e;
}

.logic-review-panel {
  display: none;
  max-width: 1050px;
  margin-top: 26px;
  padding: 26px;
  border-radius: 8px;
  color: #ecfeff;
  background:
    linear-gradient(145deg, rgba(2, 8, 23, .86), rgba(3, 45, 36, .7)),
    rgba(255,255,255,.04);
  border: 1px solid rgba(34, 211, 238, .2);
  box-shadow:
    inset 0 0 24px rgba(34, 211, 238, .06),
    0 22px 54px rgba(0, 0, 0, .32);
  backdrop-filter: blur(16px);
}

.logic-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.logic-review-head span {
  color: #86efac;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.logic-review-head h2 {
  margin: 6px 0;
  color: #f8fafc;
  text-shadow: 0 0 18px rgba(34, 197, 94, .24);
}

.logic-review-head p,
.logic-review-empty {
  color: #94a3b8;
}

.logic-review-head button {
  border: none;
  border-radius: 14px;
  padding: 13px 20px;
  color: white;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, #7c3aed, #22c55e);
  box-shadow: 0 0 18px rgba(34, 197, 94, .22);
}

.logic-answers-list {
  display: grid;
  gap: 18px;
}

.logic-answer-group {
  padding: 20px;
  border-radius: 8px;
  border: 1px solid rgba(168, 85, 247, .25);
  background: rgba(2, 8, 23, .52);
}

.logic-answer-group header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, .16);
}

.logic-answer-group h3 {
  margin: 0 0 4px;
  color: #86efac;
}

.logic-answer-group header p,
.logic-answer-group time {
  color: #cbd5e1;
}

.logic-review-answer {
  padding: 14px 0;
  border-bottom: 1px solid rgba(148, 163, 184, .1);
}

.logic-review-answer:last-child {
  border-bottom: none;
}

.logic-review-answer strong {
  color: #f5d0fe;
}

.logic-review-question {
  margin: 8px 0;
  color: #dbeafe;
}

.logic-review-text {
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  color: #ecfeff;
  background: rgba(34, 197, 94, .08);
  border: 1px solid rgba(34, 197, 94, .16);
}

.profile-card p {
  font-size: 18px;
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(135deg, rgba(124, 58, 237, .08), rgba(34, 197, 94, .1));
  color: #111827;
}

.profile-card h2 {
  margin-bottom: 18px;
  color: #4c1d95;
  font-size: 32px;
}

.profile-card span {
  color: #15803d;
  font-weight: 800;
  text-align: right;
}

@media (max-width: 700px) {
  .top-actions {
    flex-wrap: wrap;
  }

  .profile-dashboard {
    grid-template-columns: 1fr;
  }

  .profile-main-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .profile-name-row {
    justify-content: center;
  }

  .profile-info-grid p {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .profile-progress-card {
    grid-template-columns: 1fr;
  }
}
.test-card-open {
  max-width: 520px;
  background: white;
  padding: 35px;
  border-radius: 28px;
  box-shadow: 0 20px 50px rgba(22,101,52,.08);
  border: 2px solid #dcfce7;
}

.test-card-open button,
.submit-test-btn {
  border: none;
  background: linear-gradient(135deg, #4c1d95, #22c55e);
  color: white;
  padding: 15px 28px;
  border-radius: 15px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 20px;
}

.test-user-box input {
  width: 100%;
  max-width: 500px;
  padding: 16px;
  border: 2px solid #e9d5ff;
  border-radius: 16px;
  margin-bottom: 25px;
}

.question {
  background: white;
  padding: 24px;
  border-radius: 22px;
  margin-bottom: 22px;
  box-shadow: 0 15px 35px rgba(76,29,149,.08);
}

.question h3 {
  margin-bottom: 16px;
}

.question label {
  display: block;
  margin: 10px 0;
}

.logic-answer {
  width: 100%;
  min-height: 100px;
  padding: 15px;
  border: 2px solid #e9d5ff;
  border-radius: 16px;
  resize: vertical;
}

.test-result {
  margin-top: 30px;
  max-width: 600px;
  background: white;
  padding: 25px;
  border-radius: 22px;
  box-shadow: 0 15px 35px rgba(22,101,52,.08);
  font-size: 18px;
}
.test-card-open {
  max-width: 620px;
  background: white;
  padding: 35px;
  border-radius: 28px;
  box-shadow: 0 20px 50px rgba(22,101,52,.08);
  border: 2px solid #dcfce7;
}

.test-card-open h2 {
  margin-bottom: 12px;
  color: #4c1d95;
}

.test-card-open p {
  color: #4b5563;
  line-height: 1.5;
}

.test-card-open button,
.submit-test-btn {
  border: none;
  background: linear-gradient(135deg, #4c1d95, #22c55e);
  color: white;
  padding: 15px 28px;
  border-radius: 15px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 20px;
}

.test-user-box input {
  width: 100%;
  max-width: 520px;
  padding: 16px;
  border: 2px solid #e9d5ff;
  border-radius: 16px;
  margin-bottom: 25px;
  font-size: 16px;
}

.question {
  background: white;
  padding: 24px;
  border-radius: 22px;
  margin-bottom: 22px;
  box-shadow: 0 15px 35px rgba(76,29,149,.08);
}

.question h3 {
  margin-bottom: 16px;
  color: #111827;
}

.question label {
  display: block;
  margin: 12px 0;
  cursor: pointer;
  line-height: 1.4;
}

.logic-answer {
  width: 100%;
  min-height: 110px;
  padding: 15px;
  border: 2px solid #e9d5ff;
  border-radius: 16px;
  resize: vertical;
  font-size: 16px;
}

.test-result {
  margin-top: 30px;
  max-width: 650px;
  background: white;
  padding: 25px;
  border-radius: 22px;
  box-shadow: 0 15px 35px rgba(22,101,52,.08);
  font-size: 18px;
}

.test-result p {
  margin: 10px 0;
}

.classes-page {
  max-width: 980px;
}

.classes-hero {
  margin-bottom: 28px;
  animation: fadeLift .45s ease both;
}

.classes-hero span {
  color: #86efac;
  font-weight: 900;
  letter-spacing: .4px;
}

.classes-hero h1 {
  margin: 10px 0 12px;
  color: #ecfeff;
  font-size: 46px;
  text-shadow:
    0 0 18px rgba(34, 197, 94, .28),
    0 0 28px rgba(124, 58, 237, .24);
}

.classes-hero p {
  max-width: 700px;
  color: #bbf7d0;
  font-size: 18px;
  line-height: 1.55;
}

.courses-hero {
  text-align: center;
  margin-bottom: 40px;
  animation: fadeLift .45s ease both;
}

.courses-hero-icon {
  font-size: 58px;
  line-height: 1;
  margin-bottom: 14px;
  filter: drop-shadow(0 0 20px rgba(34, 197, 94, .5)) drop-shadow(0 0 30px rgba(124, 58, 237, .3));
}

.courses-hero h1 {
  margin: 0;
  font-size: 52px;
  font-weight: 900;
  letter-spacing: .5px;
  color: #ecfeff;
  text-shadow:
    0 0 18px rgba(34, 197, 94, .34),
    0 0 32px rgba(124, 58, 237, .28);
}

.test-admin-panel {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 760px;
  margin-bottom: 22px;
  padding: 20px 22px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(76, 29, 149, .42), rgba(2, 44, 34, .7)),
    rgba(255,255,255,.06);
  border: 1px solid rgba(168, 85, 247, .42);
  box-shadow:
    inset 0 0 18px rgba(34, 197, 94, .08),
    0 0 26px rgba(124, 58, 237, .2);
  backdrop-filter: blur(14px);
  animation: fadeLift .38s ease both;
}

.test-admin-panel.active {
  display: flex;
}

.test-admin-panel span,
.test-admin-panel small {
  display: block;
  color: #94a3b8;
}

.test-admin-panel strong {
  display: block;
  color: #f8fafc;
  font-size: 22px;
  margin: 5px 0;
}

.test-admin-panel button {
  border: none;
  min-width: 150px;
  padding: 14px 20px;
  border-radius: 14px;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, #7c3aed, #22c55e);
  box-shadow: 0 0 18px rgba(34, 197, 94, .26);
}

.test-card-open {
  max-width: 760px;
  min-height: 300px;
  position: relative;
  overflow: hidden;
  padding: 42px;
  border-radius: 28px;
  color: #ecfeff;
  background:
    linear-gradient(135deg, rgba(3, 7, 18, .86), rgba(3, 35, 28, .72)),
    rgba(255,255,255,.05);
  border: 1px solid rgba(34, 211, 238, .22);
  box-shadow:
    inset 0 0 28px rgba(34, 211, 238, .08),
    0 24px 64px rgba(0, 0, 0, .34),
    0 0 28px rgba(34, 197, 94, .13);
  backdrop-filter: blur(16px);
  animation: fadeLift .5s ease both;
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease, opacity .28s ease;
}

.test-card-open:hover {
  transform: translateY(-8px);
  border-color: rgba(34, 197, 94, .58);
  box-shadow:
    inset 0 0 32px rgba(34, 211, 238, .1),
    0 30px 70px rgba(0, 0, 0, .38),
    0 0 34px rgba(34, 197, 94, .26);
}

.test-card-open.test-closed {
  opacity: .76;
  border-color: rgba(248, 113, 113, .48);
}

.test-card-orbit {
  position: absolute;
  right: -80px;
  top: -90px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  border: 1px solid rgba(34, 197, 94, .3);
  box-shadow:
    inset 0 0 34px rgba(34, 197, 94, .1),
    0 0 38px rgba(124, 58, 237, .18);
}

.test-card-orbit::after {
  content: "";
  position: absolute;
  inset: 42px;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(34, 197, 94, .32), transparent 62%);
}

.test-card-badge,
.test-meta span {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  color: #bbf7d0;
  background: rgba(34, 197, 94, .1);
  border: 1px solid rgba(34, 197, 94, .2);
  font-size: 13px;
  font-weight: 900;
}

.test-card-open h2 {
  margin: 22px 0 14px;
  color: #f8fafc;
  font-size: 34px;
}

.test-card-open p {
  max-width: 520px;
  color: #cbd5e1;
  font-size: 18px;
}

.test-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

#testAccessPill.closed {
  color: #fecaca;
  background: rgba(239, 68, 68, .14);
  border-color: rgba(248, 113, 113, .35);
}

.test-card-open button,
.submit-test-btn {
  border: none;
  background: linear-gradient(135deg, #4c1d95, #22c55e);
  color: white;
  padding: 15px 28px;
  border-radius: 15px;
  font-weight: 900;
  cursor: pointer;
  margin-top: 26px;
  box-shadow: 0 0 24px rgba(34, 197, 94, .22);
  transition: transform .22s ease, opacity .22s ease, box-shadow .22s ease;
}

.test-card-open button:hover,
.submit-test-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(34, 197, 94, .36);
}

.submit-test-btn:disabled {
  cursor: wait;
  opacity: .68;
  transform: none;
}

.test-card-open button:disabled {
  cursor: not-allowed;
  opacity: .58;
  background: linear-gradient(135deg, #64748b, #334155);
}

#firstTest {
  max-width: 1050px;
}

#firstTest h1,
#firstTest .test-form h2 {
  color: #ecfeff;
  text-shadow: 0 0 18px rgba(34, 197, 94, .24);
}

#firstTest .back {
  border: 1px solid rgba(168, 85, 247, .45);
  background:
    linear-gradient(135deg, rgba(76, 29, 149, .85), rgba(3, 111, 72, .72));
  box-shadow: 0 0 22px rgba(124, 58, 237, .22);
  transition: transform .22s ease, box-shadow .22s ease;
}

#firstTest .back:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(34, 197, 94, .28);
}

.test-user-box,
.test-form,
.test-result {
  max-width: 920px;
  border-radius: 24px;
  border: 1px solid rgba(34, 211, 238, .2);
  background:
    linear-gradient(145deg, rgba(2, 8, 23, .84), rgba(3, 45, 36, .72)),
    rgba(255,255,255,.04);
  box-shadow:
    inset 0 0 24px rgba(34, 211, 238, .06),
    0 22px 54px rgba(0, 0, 0, .34);
  backdrop-filter: blur(16px);
  animation: fadeLift .45s ease both;
}

.test-user-box {
  padding: 22px;
}

.test-user-box input,
.logic-answer {
  color: #ecfeff;
  border: 1px solid rgba(168, 85, 247, .4);
  background: rgba(2, 8, 23, .68);
  box-shadow: inset 0 0 14px rgba(124, 58, 237, .08);
}

.test-user-box input:focus,
.logic-answer:focus {
  border-color: rgba(34, 197, 94, .72);
  box-shadow:
    inset 0 0 14px rgba(34, 197, 94, .08),
    0 0 18px rgba(34, 197, 94, .2);
}

.test-form {
  padding: 28px;
}

.question {
  color: #f8fafc;
  border: 1px solid rgba(34, 197, 94, .16);
  background:
    linear-gradient(145deg, rgba(15, 23, 42, .72), rgba(2, 44, 34, .46));
  box-shadow: inset 0 0 18px rgba(34, 197, 94, .05);
  transition: transform .22s ease, border-color .22s ease;
}

.question:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 197, 94, .34);
}

.question label {
  color: #f1f5f9;
}

.question h3,
.question p {
  color: #f8fafc;
}

.submit-test-btn {
  min-width: 190px;
}

.test-result {
  color: #ecfeff;
  padding: 26px;
}

body.results-open {
  overflow: hidden;
}

.test-results-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 12%, rgba(34, 197, 94, .18), transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(168, 85, 247, .22), transparent 32%),
    rgba(2, 6, 23, .82);
  backdrop-filter: blur(18px);
  transition: opacity .28s ease;
}

.test-results-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.test-results-modal {
  position: relative;
  width: min(1180px, 100%);
  max-height: min(92vh, 980px);
  overflow: auto;
  border: 1px solid rgba(34, 197, 94, .34);
  border-radius: 8px;
  padding: 28px;
  color: #ecfeff;
  background:
    linear-gradient(145deg, rgba(2, 8, 23, .94), rgba(3, 45, 36, .84)),
    rgba(255, 255, 255, .04);
  box-shadow:
    0 0 0 1px rgba(168, 85, 247, .18),
    0 32px 90px rgba(0, 0, 0, .58),
    inset 0 0 44px rgba(34, 197, 94, .07);
  animation: resultsModalIn .38s ease both;
}

.test-results-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(168, 85, 247, .48);
  border-radius: 50%;
  color: #ecfeff;
  background: rgba(2, 8, 23, .78);
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.test-results-close:hover {
  transform: rotate(90deg);
  border-color: rgba(34, 197, 94, .72);
  box-shadow: 0 0 18px rgba(34, 197, 94, .22);
}

.test-results-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 20px 52px 22px 22px;
  border: 1px solid rgba(34, 211, 238, .18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(34, 197, 94, .09), rgba(168, 85, 247, .1)),
    rgba(2, 8, 23, .52);
}

.results-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: #86efac;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.test-results-hero h2 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(34px, 6vw, 64px);
  line-height: .96;
  text-shadow: 0 0 28px rgba(34, 197, 94, .28);
}

.test-results-hero p {
  margin: 12px 0 0;
  color: #c4b5fd;
  font-size: 20px;
  font-weight: 900;
}

.results-ring {
  --score-percent: 0;
  width: 154px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    conic-gradient(#22c55e calc(var(--score-percent) * 1%), rgba(168, 85, 247, .28) 0),
    radial-gradient(circle, rgba(2, 8, 23, .95) 58%, transparent 60%);
  box-shadow:
    0 0 34px rgba(34, 197, 94, .26),
    inset 0 0 24px rgba(168, 85, 247, .2);
  transition: background .45s ease;
}

.results-ring > div {
  width: 112px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background: rgba(2, 8, 23, .88);
}

.results-ring strong,
.results-ring span {
  display: block;
}

.results-ring strong {
  color: #f8fafc;
  font-size: 30px;
}

.results-ring span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.results-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.result-metric {
  min-height: 118px;
  padding: 18px;
  border: 1px solid rgba(34, 197, 94, .2);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(15, 23, 42, .78), rgba(4, 48, 37, .48)),
    rgba(255, 255, 255, .035);
  box-shadow: inset 0 0 18px rgba(34, 197, 94, .05);
  transition: transform .22s ease, border-color .22s ease;
}

.result-metric:hover {
  transform: translateY(-3px);
  border-color: rgba(168, 85, 247, .46);
}

.result-metric span,
.result-metric small {
  display: block;
  color: #94a3b8;
  font-weight: 800;
}

.result-metric strong {
  display: block;
  margin: 8px 0;
  color: #f8fafc;
  font-size: 26px;
}

.results-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.results-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.results-tabs button,
.review-mistakes-btn,
.results-actions button {
  min-height: 44px;
  border: 1px solid rgba(168, 85, 247, .38);
  border-radius: 8px;
  padding: 0 16px;
  color: #ecfeff;
  font-weight: 900;
  background: rgba(2, 8, 23, .7);
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.results-tabs button.active,
.results-tabs button:hover,
.review-mistakes-btn:hover,
.results-actions button:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 197, 94, .68);
  background: linear-gradient(135deg, rgba(76, 29, 149, .85), rgba(3, 111, 72, .75));
  box-shadow: 0 0 18px rgba(34, 197, 94, .18);
}

.results-questions {
  display: grid;
  gap: 12px;
}

.result-question-card {
  border: 1px solid rgba(34, 197, 94, .18);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(2, 8, 23, .9), rgba(3, 45, 36, .68)),
    rgba(255, 255, 255, .035);
  animation: fadeLift .28s ease both;
}

.result-question-card.is-correct {
  border-color: rgba(34, 197, 94, .32);
}

.result-question-card.is-wrong {
  border-color: rgba(248, 113, 113, .34);
}

.result-question-toggle {
  width: 100%;
  min-height: 58px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: none;
  padding: 0 18px;
  color: #f8fafc;
  background: rgba(15, 23, 42, .38);
  cursor: pointer;
  text-align: left;
}

.result-question-toggle span {
  color: #86efac;
  font-weight: 900;
}

.result-question-toggle strong {
  color: #f8fafc;
}

.result-question-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.result-question-card.collapsed .result-question-body {
  display: none;
}

.result-question-body h3 {
  margin: 0;
  color: #f8fafc;
  font-size: 18px;
}

.result-question-body ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.result-option {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 8px;
  background: rgba(2, 8, 23, .58);
}

.result-option span {
  display: grid;
  place-items: center;
  width: 30px;
  aspect-ratio: 1;
  border-radius: 50%;
  color: #f8fafc;
  font-weight: 900;
  background: rgba(168, 85, 247, .28);
}

.result-option p {
  margin: 0;
  color: #dbeafe;
}

.result-option.correct-option {
  border-color: rgba(34, 197, 94, .62);
  background: rgba(34, 197, 94, .12);
}

.result-option.correct-option span {
  background: rgba(34, 197, 94, .82);
}

.result-option.wrong-option {
  border-color: rgba(248, 113, 113, .68);
  background: rgba(127, 29, 29, .24);
}

.result-option.wrong-option span {
  background: rgba(239, 68, 68, .82);
}

.answer-compare,
.answer-explanation,
.results-empty-state {
  padding: 14px;
  border: 1px solid rgba(168, 85, 247, .22);
  border-radius: 8px;
  background: rgba(2, 8, 23, .52);
}

.answer-compare p,
.answer-explanation p {
  margin: 4px 0;
  color: #cbd5e1;
}

.answer-explanation span {
  color: #86efac;
  font-weight: 900;
}

.results-empty-state {
  display: grid;
  gap: 6px;
  color: #94a3b8;
}

.results-empty-state strong {
  color: #f8fafc;
}

.results-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.result-confetti {
  position: fixed;
  inset: 0;
  z-index: 2001;
  pointer-events: none;
  overflow: hidden;
}

.result-confetti i {
  position: absolute;
  left: var(--x);
  top: -18px;
  width: 9px;
  height: 18px;
  border-radius: 2px;
  background: linear-gradient(180deg, #22c55e, #a855f7);
  transform: rotate(var(--spin));
  animation: resultConfettiFall 2.3s ease-in forwards;
  animation-delay: var(--delay);
}

@keyframes resultsModalIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes resultConfettiFall {
  0% {
    transform: translateY(-30px) rotate(var(--spin));
    opacity: 1;
  }
  100% {
    transform: translateY(105vh) rotate(calc(var(--spin) + 420deg));
    opacity: 0;
  }
}

@media (max-width: 860px) {
  .test-results-overlay {
    padding: 10px;
  }

  .test-results-modal {
    max-height: 94vh;
    padding: 16px;
  }

  .test-results-hero,
  .results-toolbar,
  .results-actions {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .test-results-hero {
    padding: 18px;
  }

  .results-ring {
    width: 128px;
    justify-self: center;
  }

  .results-ring > div {
    width: 94px;
  }

  .results-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .results-tabs,
  .results-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .result-question-toggle {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
  }

  .result-option {
    grid-template-columns: 30px 1fr;
  }
}

@media (max-width: 520px) {
  .results-metrics {
    grid-template-columns: 1fr;
  }

  .test-results-hero h2 {
    font-size: 34px;
  }
}

.profile-admin-card {
  grid-column: 1 / -1;
  padding: 22px;
  border-radius: 8px;
  border: 1px solid rgba(168, 85, 247, .3);
  background:
    linear-gradient(145deg, rgba(17, 9, 45, .72), rgba(3, 29, 24, .58)),
    rgba(255,255,255,.04);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
}

.profile-admin-card span,
.profile-admin-card small {
  display: block;
  color: #94a3b8;
}

.profile-admin-card strong {
  display: block;
  color: #ecfeff;
  font-size: 24px;
  margin: 4px 0;
}

.admin-code-row {
  display: flex;
  gap: 10px;
}

.admin-code-row input {
  width: 180px;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid rgba(168, 85, 247, .38);
  color: #ecfeff;
  background: rgba(2, 8, 18, .58);
  outline: none;
}

.admin-code-row button {
  border: none;
  border-radius: 12px;
  padding: 0 18px;
  color: white;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, #7c3aed, #22c55e);
  transition: transform .2s ease, box-shadow .2s ease;
}

.admin-code-row button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(34, 197, 94, .28);
}

.admin-points-panel {
  display: none;
  grid-column: 1 / -1;
  padding: 24px;
  border-radius: 8px;
  border: 1px solid rgba(34, 197, 94, .24);
  color: #ecfeff;
  background:
    linear-gradient(145deg, rgba(2, 8, 23, .82), rgba(4, 48, 37, .62)),
    rgba(255,255,255,.035);
  box-shadow:
    inset 0 0 22px rgba(34, 197, 94, .06),
    0 18px 45px rgba(2, 8, 23, .28);
}

.admin-points-panel.active {
  display: grid;
  gap: 18px;
}

.admin-points-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.admin-points-head span,
.admin-points-head small,
.admin-points-grid label,
.admin-reason-field {
  color: #94a3b8;
}

.admin-points-head strong {
  display: block;
  margin: 4px 0;
  color: #f8fafc;
  font-size: 24px;
}

.admin-points-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(160px, .45fr);
  gap: 14px;
}

.admin-points-grid label,
.admin-reason-field {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.admin-points-grid select,
.admin-points-grid input,
.admin-reason-field textarea {
  width: 100%;
  border: 1px solid rgba(168, 85, 247, .4);
  border-radius: 8px;
  color: #ecfeff;
  background: rgba(2, 8, 23, .7);
  outline: none;
}

.admin-points-grid select,
.admin-points-grid input {
  min-height: 46px;
  padding: 0 14px;
}

.admin-reason-field textarea {
  min-height: 90px;
  padding: 14px;
  resize: vertical;
}

.admin-points-grid select:focus,
.admin-points-grid input:focus,
.admin-reason-field textarea:focus {
  border-color: rgba(34, 197, 94, .72);
  box-shadow: 0 0 18px rgba(34, 197, 94, .16);
}

.admin-points-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
}

.admin-points-actions button {
  min-height: 46px;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, #4c1d95, #047857);
  transition: transform .2s ease, box-shadow .2s ease;
}

.admin-points-actions button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(34, 197, 94, .24);
}

.admin-retake-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(168, 85, 247, .3);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(76, 29, 149, .2), rgba(3, 111, 72, .18)),
    rgba(2, 8, 23, .42);
}

.admin-retake-panel span,
.admin-retake-panel small {
  display: block;
  color: #94a3b8;
  font-weight: 800;
}

.admin-retake-panel strong {
  display: block;
  margin: 4px 0;
  color: #f8fafc;
  font-size: 20px;
}

.admin-retake-panel button {
  min-height: 46px;
  border: 1px solid rgba(34, 197, 94, .36);
  border-radius: 8px;
  padding: 0 18px;
  color: #ecfeff;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(76, 29, 149, .88), rgba(22, 101, 52, .86));
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.admin-retake-panel button:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 197, 94, .68);
  box-shadow: 0 0 20px rgba(168, 85, 247, .22);
}

.ai-checking-box,
.ai-review-result,
.ai-review-error {
  margin-top: 18px;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid rgba(34, 197, 94, .24);
  background: rgba(2, 8, 23, .55);
  color: #ecfeff;
}

.ai-checking-box strong,
.ai-review-error strong {
  display: block;
  color: #86efac;
  margin-bottom: 6px;
}

.ai-review-error {
  border-color: rgba(248, 113, 113, .45);
}

.ai-review-summary {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
}

.ai-review-summary span,
.ai-review-summary small {
  color: #94a3b8;
}

.ai-review-summary strong {
  color: #f8fafc;
  font-size: 24px;
}

.ai-review-items {
  display: grid;
  gap: 10px;
}

.ai-review-item,
.logic-ai-admin-review,
.logic-ai-pending {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(168, 85, 247, .25);
  background: rgba(15, 23, 42, .52);
}

.ai-review-item b,
.logic-ai-admin-review b {
  color: #86efac;
}

.ai-review-item p,
.logic-ai-admin-review p {
  margin: 6px 0 0;
  color: #dbeafe;
}

.logic-ai-admin-review span,
.logic-ai-admin-review small,
.logic-ai-pending {
  display: block;
  color: #94a3b8;
}

.logic-ai-override {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 8px;
  margin-top: 12px;
}

.logic-ai-override input {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(168, 85, 247, .4);
  color: #ecfeff;
  background: rgba(2, 8, 23, .7);
}

.logic-ai-override button {
  border: none;
  border-radius: 8px;
  padding: 0 14px;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, #4c1d95, #047857);
}

@keyframes fadeLift {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  .question {
    padding: 18px;
  }

  .test-card-open {
    padding: 24px;
  }

  .test-admin-panel,
  .profile-admin-card,
  .admin-points-head,
  .admin-points-grid,
  .admin-points-actions,
  .admin-retake-panel,
  .logic-ai-override,
  .admin-code-row {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .admin-code-row input,
  .admin-code-row button,
  .admin-points-actions button,
  .admin-retake-panel button,
  .logic-ai-override button,
  .test-admin-panel button {
    width: 100%;
    min-height: 46px;
  }
}
.rating-page.active {
  display: block;
}
.rating-page {
  background:
    linear-gradient(90deg, rgba(3, 7, 18, .42), rgba(3, 30, 24, .32)),
    url("rating.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
  padding: 30px;
  color: white;
}

.rating-hero {
  display: none;
}

.rating-hero h1 {
  font-size: 46px;
  margin-bottom: 8px;
  color: white;
}

.rating-hero p {
  color: #9ca3af;
}

.trophy-box {
  display: none;
}

.rating-board {
  background: rgba(5,10,25,.75);
  width: min(1120px, 100%);
  margin: 220px auto 0;
  min-height: 340px;

  border: 1px solid rgba(124,58,237,.4);

  border-radius: 18px;

  overflow: hidden;

  box-shadow:
    0 0 30px rgba(124,58,237,.2),
    inset 0 0 20px rgba(34,197,94,.05);
}

.rating-board table {
  width: 100%;
  border-collapse: collapse;
}

.rating-board th {
  background: rgba(0,0,0,.35);

  color: #22c55e;

  text-align: left;

  padding: 15px 22px;

  font-size: 16px;

  border-bottom: 2px solid rgba(124,58,237,.6);
}

.rating-board td {
  padding: 15px 22px;

  border-bottom: 1px solid rgba(255,255,255,.05);

  color: #f3f4f6;
}

.rating-board tr:nth-child(even) {
  background: rgba(255,255,255,.03);
}

.rating-board tr:hover {
  background: rgba(124,58,237,.15);
}

.rating-position {
  font-weight: 800;
  color: white;
}

.talent-name {
  font-weight: 700;
}

.rating-score {
  color: #22c55e;
  font-size: 17px;
  font-weight: 900;
}

.region-select {
  background: #111827;

  color: white;

  border: 1px solid #8b5cf6;

  border-radius: 10px;

  padding: 8px 14px;

  outline: none;

  text-transform: uppercase;
}

.region-select option {
  text-transform: uppercase;
}

.region-select:focus {
  border-color: #22c55e;

  box-shadow: 0 0 10px rgba(34,197,94,.4);
}
.auth-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.auth-box {
  width: 360px;
  background: #14001f;
  border: 2px solid #7cff00;
  border-radius: 18px;
  padding: 25px;
  text-align: center;
  color: white;
  box-shadow: 0 0 25px #7cff00;
}

.auth-box h2 {
  margin-bottom: 20px;
  color: #7cff00;
}

.auth-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.auth-tabs button {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: #35104a;
  color: white;
  cursor: pointer;
}

.auth-tabs button.active {
  background: #7cff00;
  color: black;
}

.auth-box input {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 10px;
  border: none;
  outline: none;
}

.auth-box button {
  width: 100%;
  padding: 12px;
  background: #7cff00;
  color: black;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
}

#authMessage {
  margin-top: 12px;
  color: #ff5cff;
}
.password-box {
  position: relative;
  width: 100%;
  margin-bottom: 12px;
}

.password-box input {
  width: 100%;
  padding: 12px;
  padding-right: 50px;
  border-radius: 10px;
  border: none;
  outline: none;
}

.show-pass {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px !important;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: #7cff00;
  cursor: pointer;
}

.tech-support-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.tech-support-modal.active {
  display: flex;
  animation: supportFade .22s ease both;
}

.tech-support-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 35%, rgba(34, 197, 94, .12), transparent 34%),
    rgba(1, 6, 14, .72);
  backdrop-filter: blur(8px);
}

.tech-support-dialog {
  position: relative;
  width: min(560px, 100%);
  overflow: hidden;
  padding: 34px;
  border-radius: 18px;
  color: #ecfeff;
  background:
    linear-gradient(145deg, rgba(8, 9, 30, .88), rgba(3, 42, 33, .78)),
    rgba(255,255,255,.06);
  border: 1px solid rgba(168, 85, 247, .42);
  box-shadow:
    inset 0 0 28px rgba(34, 211, 238, .08),
    0 0 34px rgba(124, 58, 237, .26),
    0 28px 90px rgba(0, 0, 0, .55);
  backdrop-filter: blur(18px);
  animation: supportPop .28s cubic-bezier(.2, .9, .2, 1) both;
}

.tech-support-orb {
  position: absolute;
  right: -90px;
  top: -90px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(34, 197, 94, .32), transparent 62%);
  border: 1px solid rgba(34, 197, 94, .18);
  box-shadow: 0 0 50px rgba(124, 58, 237, .22);
  pointer-events: none;
}

.tech-support-close {
  position: absolute;
  z-index: 5;
  right: 18px;
  top: 16px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(216, 180, 254, .35);
  border-radius: 12px;
  color: #f5d0fe;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  background: rgba(15, 23, 42, .68);
  box-shadow: inset 0 0 12px rgba(124, 58, 237, .15);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.tech-support-close:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 197, 94, .65);
  box-shadow: 0 0 18px rgba(34, 197, 94, .22);
}

.tech-support-kicker {
  display: flex;
  justify-content: center;
  margin: 0 auto 16px;
  color: #86efac;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: center;
  text-shadow:
    0 0 14px rgba(34, 197, 94, .55),
    0 0 22px rgba(124, 58, 237, .3);
}

.tech-support-dialog h2 {
  margin: 0 0 16px;
  text-align: center;
  color: #f8fafc;
  font-size: 38px;
  line-height: 1;
  text-shadow:
    0 0 18px rgba(34, 197, 94, .32),
    0 0 28px rgba(124, 58, 237, .26);
}

.tech-support-dialog p {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 460px;
  color: #d1fae5;
  font-size: 18px;
  line-height: 1.65;
}

.tech-support-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 14px;
  color: white;
  font-weight: 900;
  text-decoration: none;
  background: linear-gradient(135deg, #6d28d9, #16a34a);
  box-shadow: 0 0 24px rgba(34, 197, 94, .28);
  transition: transform .22s ease, box-shadow .22s ease;
}

.tech-support-link:hover {
  transform: translateY(-3px);
  box-shadow:
    0 0 28px rgba(34, 197, 94, .42),
    0 0 34px rgba(124, 58, 237, .25);
}

body.support-modal-open {
  overflow: hidden;
}

@keyframes supportFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes supportPop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 600px) {
  .tech-support-modal {
    padding: 16px;
  }

  .tech-support-dialog {
    padding: 28px 22px;
    border-radius: 16px;
  }

  .tech-support-dialog h2 {
    font-size: 30px;
  }

  .tech-support-dialog p {
    font-size: 16px;
  }

  .tech-support-link {
    width: 100%;
  }
}

/* Responsive stability layer
   Keeps the cyberpunk Green-Y layout inside mobile/tablet viewports without changing desktop styling. */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

button,
input,
textarea,
select {
  max-width: 100%;
}

.app,
.main,
.page,
.top,
.search,
.courses,
.cards,
.course,
.card,
.lesson-content,
.lesson-section,
.chat-shell,
.topic-box,
.comment-box,
.profile-dashboard,
.profile-main-card,
.profile-progress-card,
.profile-stat-card,
.profile-admin-card,
.logic-review-panel,
.logic-answer-group,
.test-admin-panel,
.test-card-open,
.test-user-box,
.test-form,
.test-result,
.question,
.rating-page,
.rating-board {
  min-width: 0;
  max-width: 100%;
}

#lessonTitle,
#lessonText,
.lesson-intro,
.lesson-section h2,
.lesson-section h3,
.lesson-section p,
.lesson-list,
.card h3,
.card p,
.course h2,
.course p,
.question h3,
.question label,
.comment-card p,
.profile-name-row h2,
.profile-info-grid p,
.logic-review-question,
.logic-review-text {
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Tablet layout: sidebar becomes a compact top block and grids lose fixed desktop pressure. */
@media (max-width: 1024px) {
  body {
    background-attachment: scroll;
  }

  .app {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    min-height: auto;
    padding: 30px 20px 24px;
  }

  .brand {
    max-width: 430px;
    margin: 0 auto 30px;
  }

  .brand-logo {
    max-width: 230px;
    margin: 0 auto;
  }

  .menu {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .menu-item {
    width: 100%;
    min-height: 68px;
    padding: 14px 16px;
    font-size: 16px;
  }

  .support {
    display: none;
  }

  .main {
    width: 100%;
    padding: 34px 20px 52px;
  }

  .top {
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 46px;
  }

  .search {
    width: 100%;
    max-width: none;
  }

  .top-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .courses,
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }

  #lessonTitle,
  #lessonText {
    width: 100%;
  }

  #lessonTitle {
    margin-top: 44px;
  }

  .profile-dashboard {
    grid-template-columns: 1fr;
  }

  .rating-page {
    padding: 24px;
  }

  .rating-board {
    margin-top: 120px;
  }
}

/* Phone layout: one-column content, smaller typography, tighter readable lesson containers. */
@media (max-width: 640px) {
  .sidebar {
    padding: 22px 12px 18px;
  }

  .brand {
    row-gap: 12px;
    margin-bottom: 22px;
  }

  .brand-logo {
    max-width: 190px;
  }

  .menu {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .menu-item {
    min-height: 62px;
    border-radius: 18px;
  }

  .main {
    padding: 18px 8px 36px;
  }

  h1,
  .title {
    font-size: clamp(26px, 7.5vw, 34px);
    margin-bottom: 24px;
  }

  .top {
    margin-bottom: 34px;
  }

  .search {
    min-height: 58px;
    padding: 0 14px;
    gap: 10px;
    border-radius: 20px;
  }

  .search::after {
    border-radius: 19px;
  }

  .search input {
    font-size: 16px;
  }

  .search-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .top-actions {
    justify-content: center;
    gap: 10px;
  }

  .courses,
  .cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .course,
  .card {
    width: 100%;
    min-height: auto;
    padding: 24px 20px;
    border-radius: 22px;
  }

  .course h2,
  .card h3 {
    font-size: clamp(22px, 6.4vw, 28px);
  }

  .course p,
  .card p {
    font-size: 16px;
  }

  #lesson.active {
    align-items: stretch;
    min-height: auto;
  }

  #lesson .back {
    align-self: flex-start;
  }

  #lessonTitle {
    margin-top: 24px;
    padding: 24px 10px 10px;
    border-radius: 18px 18px 0 0;
    font-size: clamp(27px, 8vw, 36px);
    line-height: 1.08;
  }

  #lessonText {
    padding: 4px 6px 24px;
    border-radius: 0 0 18px 18px;
    font-size: 16px;
    line-height: 1.55;
  }

  .lesson-content {
    gap: 14px;
  }

  .lesson-intro {
    font-size: clamp(18px, 5.4vw, 22px);
    line-height: 1.45;
    text-align: center;
  }

  .lesson-section {
    width: 100%;
    padding: 18px 10px;
    border-radius: 14px;
  }

  .lesson-section h2 {
    font-size: clamp(23px, 7vw, 30px);
    line-height: 1.15;
    margin-bottom: 14px;
  }

  .lesson-section h3 {
    font-size: clamp(18px, 5vw, 21px);
    line-height: 1.25;
  }

  .lesson-section p,
  .lesson-list {
    font-size: clamp(16px, 4.6vw, 18px);
    line-height: 1.55;
  }

  .lesson-list {
    grid-template-columns: 1fr;
    padding-left: 18px;
  }

  .topic-box,
  .comment-box,
  .test-admin-panel,
  .profile-admin-card,
  .admin-points-head,
  .admin-points-grid,
  .admin-points-actions,
  .admin-retake-panel,
  .logic-ai-override,
  .admin-code-row,
  .logic-review-head {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .chat-shell {
    min-height: 560px;
    border-radius: 10px;
  }

  .chat-header {
    grid-template-columns: 1fr;
    padding: 22px 18px;
  }

  .discussion-tabs {
    padding: 16px 18px 0;
  }

  .comments-list {
    min-height: 260px;
    padding: 20px 16px;
  }

  .comment-card {
    max-width: 100%;
  }

  .comment-author {
    flex-direction: column;
    gap: 4px;
  }

  .comment-card small {
    white-space: normal;
  }

  .profile-main-card,
  .profile-progress-card,
  .profile-stat-card,
  .profile-admin-card,
  .logic-review-panel,
  .test-card-open,
  .test-user-box,
  .test-form,
  .test-result,
  .question {
    width: 100%;
    padding: 20px 16px;
  }

  .profile-main-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .profile-name-row {
    justify-content: center;
  }

  .profile-info-grid p,
  .profile-progress-card {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .profile-progress-card,
  .profile-stat-card {
    text-align: center;
  }

  .xp-panel small {
    position: static;
    display: block;
    margin-top: 8px;
  }

  .question h3 {
    font-size: 18px;
    line-height: 1.35;
  }

  .question label {
    font-size: 16px;
  }

  .rating-page {
    padding: 18px 8px 34px;
  }

  .rating-board {
    margin-top: 42px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .rating-board table {
    min-width: 560px;
  }

  .tech-support-dialog {
    padding: 28px 18px;
  }
}

/* Very small phones: reduce side pressure even more for long Russian/English technical text. */
@media (max-width: 380px) {
  .main {
    padding-left: 6px;
    padding-right: 6px;
  }

  #lessonTitle {
    font-size: 26px;
  }

  .lesson-section {
    padding-left: 8px;
    padding-right: 8px;
  }

  .lesson-section p,
  .lesson-list {
    font-size: 15.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .card::before,
  .card::after,
  .card-icon,
  .card h3,
  .card p,
  .card b,
  .course,
  .course::before,
  .course::after,
  .course-icon,
  .course h2,
  .course p {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}











