
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #09111f;
  --bg2: #101a2b;
  --card: #172236;
  --card2: #1e2b40;
  --line: #30415a;
  --text: #eef4ff;
  --muted: #9aa9bd;
  --accent: #38bdf8;
  --danger: #f43f5e;
  --shadow: 0 24px 60px rgba(0,0,0,.35);
}


/* =========================
   LIGHT MODE
========================= */

body.light {
  --bg: #ffffff;
  --bg2: #ffffff;
  --card: #ffffff;
  --card2: #f3f3f3;
  --line: #d6d6d6;
  --text: #111111;
  --muted: #555555;
  --accent: #1687c7;
  --danger: #e11d48;
  --shadow: 0 20px 50px rgba(0,0,0,.10);

  background: #ffffff;
  color: #111111;
}


html,
body {
  min-height: 100%;
}

body {
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.page {
  min-height: 100vh;
}


/* TOAST */

.toast {
  position: fixed;
  right: 20px;
  top: 20px;
  z-index: 10000;

  transform: translateY(-15px);
  opacity: 0;

  pointer-events: none;

  background: #101827;
  border: 1px solid var(--line);

  padding: 12px 16px;

  border-radius: 12px;

  transition: .25s;

  box-shadow: var(--shadow);
}

.toast.show {
  transform: none;
  opacity: 1;
}


/* LOGIN */

#loginPage {
  display: flex;
  align-items: center;
  justify-content: center;

  position: relative;

  overflow: hidden;

  background: #0c1628;
}

.login-bg {
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      180deg,
      rgba(5,12,25,.38),
      rgba(5,12,25,.80)
    ),

    url("https://images.unsplash.com/photo-1562774053-701939374585?auto=format&fit=crop&w=1800&q=85")
    center / cover no-repeat;

  transform: scale(1.03);
}

.login-overlay {
  position: absolute;
  inset: 0;

  background:
    radial-gradient(
      circle at 50% 50%,
      transparent 5%,
      rgba(4,11,24,.65) 90%
    );
}

.auth-card {
  position: relative;

  width: 500px;

  max-width:
    calc(100% - 28px);

  padding: 22px;

  border:
    1px solid
    rgba(255,255,255,.14);

  border-radius: 24px;

  background:
    rgba(26,39,58,.91);

  box-shadow:
    0 35px 90px
    rgba(0,0,0,.46);

  backdrop-filter:
    blur(18px);

  animation:
    floatIn .6s ease both;
}

.auth-switch {
  display: grid;

  grid-template-columns:
    1fr 1fr;

  background: #0f1a2b;

  border-radius: 13px;

  padding: 4px;

  gap: 4px;
}

.tab {
  height: 50px;

  border-radius: 10px;

  background: transparent;

  color: #ecf5ff;

  font-weight: 700;
}

.tab.active {
  background: var(--accent);

  color: #fff;

  box-shadow:
    0 7px 22px
    rgba(56,189,248,.28);
}

.auth-content {
  padding: 29px 4px 4px;

  text-align: center;
}

.brand-mark {
  font-size: 31px;

  animation:
    pulse 2.3s infinite;
}

.auth-content h1 {
  font-size: 28px;

  margin:
    6px 0
    9px;
}

.admin-title {
  color: #fb4764;
}

.auth-content p {
  color: #aab6c6;

  margin-bottom: 20px;
}

.field {
  display: block;

  margin: 14px 0;
}

.field input,
.search-input,
.admin-form input,
.admin-form textarea,
.admin-form select,
.modal-input,
.modal-card > textarea {
  width: 100%;

  height: 55px;

  border:
    1px solid
    var(--line);

  background:
    #121c2d;

  color:
    var(--text);

  border-radius: 13px;

  padding: 0 15px;

  outline: none;

  transition: .2s;
}

.modal-card > textarea {
  height: 120px;

  padding: 13px;

  resize: vertical;
}

.field input:focus,
.search-input:focus,
.admin-form input:focus,
.admin-form textarea:focus,
.modal-input:focus,
.modal-card > textarea:focus {
  border-color: var(--accent);

  box-shadow:
    0 0 0 3px
    rgba(56,189,248,.11);
}

.primary-btn,
.danger-btn,
.secondary-btn {
  height: 53px;

  padding:
    0 18px;

  border-radius: 13px;

  color: #fff;

  font-weight: 800;

  transition: .2s;
}

.full {
  width: 100%;
}

.primary-btn {
  background:
    linear-gradient(
      135deg,
      #38bdf8,
      #269fe0
    );

  box-shadow:
    0 10px 28px
    rgba(56,189,248,.22);
}

.danger-btn {
  background:
    linear-gradient(
      135deg,
      #fb4163,
      #f22e53
    );
}

.secondary-btn {
  background: var(--card2);

  color:
    var(--text);

  border:
    1px solid
    var(--line);
}

.primary-btn:hover,
.danger-btn:hover {
  transform:
    translateY(-2px);

  filter:
    brightness(1.04);
}

.login-hint {
  display: block;

  margin-top: 13px;

  color: #8190a6;
}


/* TOPBAR */

.topbar {
  height: 76px;

  position: sticky;

  top: 0;

  z-index: 50;

  border-bottom:
    1px solid
    var(--line);

  background:
    rgba(8,16,29,.84);

  backdrop-filter:
    blur(15px);

  display: flex;

  align-items: center;

  padding:
    0 22px;

  gap: 18px;
}

.topbar-brand {
  display: flex;

  align-items: center;

  gap: 10px;
}

.mini-logo {
  font-size: 27px;
}

.topbar-brand strong {
  display: block;

  letter-spacing: .5px;
}

.topbar-brand small {
  color: var(--muted);

  font-size: 11px;
}

.top-actions {
  margin-left: auto;

  display: flex;

  gap: 9px;

  align-items: center;
}

.icon-btn,
.profile-chip {
  background: var(--card2);

  color: var(--text);

  border:
    1px solid
    var(--line);

  height: 42px;

  border-radius: 12px;

  padding:
    0 12px;
}

.profile-chip {
  display: flex;

  gap: 7px;

  align-items: center;

  font-weight: 700;
}

.profile-chip span:first-child {
  display: flex;

  width: 25px;
  height: 25px;

  align-items: center;
  justify-content: center;

  overflow: hidden;

  border-radius: 8px;
}

.profile-chip img {
  width: 100%;
  height: 100%;

  object-fit: cover;
}

#mobileMenuBtn {
  display: none;
}


/* LAYOUT */

.layout {
  display: grid;

  grid-template-columns:
    235px minmax(0,1fr);

  min-height:
    calc(100vh - 76px);
}

.sidebar {
  border-right:
    1px solid
    var(--line);

  padding:
    18px 12px;

  display: flex;

  flex-direction: column;

  background:
    rgba(11,20,34,.92);
}

.sidebar nav {
  display: flex;

  flex-direction: column;

  gap: 6px;
}

.nav-item {
  background: transparent;

  color: var(--muted);

  text-align: left;

  padding:
    13px 14px;

  border-radius: 12px;

  font-weight: 700;

  transition: .2s;
}

.nav-item:hover {
  background:
    var(--card2);

  color:
    var(--text);

  transform:
    translateX(2px);
}

.nav-item.active {
  background:
    rgba(56,189,248,.15);

  color:
    var(--accent);

  border:
    1px solid
    rgba(56,189,248,.18);
}

.logout-btn {
  margin-top: auto;

  background:
    transparent;

  border:
    1px solid
    var(--line);

  color:
    #ff7288;

  border-radius: 12px;

  padding: 12px;

  font-weight: 700;
}

.content {
  padding: 28px;

  max-width: 1500px;

  width: 100%;

  margin: auto;
}


/* VIEWS */

.view {
  display: none;

  animation:
    viewIn .35s ease both;
}

.active-view {
  display: block;
}


/* HERO */

.hero-panel {
  min-height: 220px;

  border:
    1px solid
    var(--line);

  border-radius: 23px;

  padding: 30px;

  display: flex;

  align-items: center;

  justify-content: space-between;

  background:
    linear-gradient(
      135deg,
      rgba(25,45,71,.96),
      rgba(15,27,45,.93)
    );

  overflow: hidden;

  position: relative;
}

.hero-panel:after {
  content: "";

  position: absolute;

  width: 230px;
  height: 230px;

  border-radius: 50%;

  right: -60px;
  top: -70px;

  background:
    rgba(56,189,248,.16);
}

.eyebrow {
  font-size: 11px;

  letter-spacing: 2px;

  color:
    var(--accent);

  font-weight: 800;
}

.hero-panel h2 {
  font-size: 34px;

  margin:
    9px 0;
}

.hero-panel p {
  color: #9eafc4;

  max-width: 700px;

  line-height: 1.6;
}

.hero-badge {
  font-size: 74px;

  position: relative;

  z-index: 1;

  animation:
    float 3s ease-in-out infinite;
}


/* STATS */

.stats-grid {
  display: grid;

  grid-template-columns:
    repeat(4,1fr);

  gap: 13px;

  margin:
    16px 0
    28px;
}

.stat-card {
  background:
    var(--card);

  border:
    1px solid
    var(--line);

  border-radius: 16px;

  padding: 18px;

  display: flex;

  gap: 13px;

  align-items: center;
}

.stat-card > span {
  font-size: 25px;
}

.stat-card strong {
  display: block;

  font-size: 23px;
}

.stat-card small {
  color:
    var(--muted);
}


/* TITLES */

.section-head,
.page-title {
  display: flex;

  align-items: flex-end;

  justify-content: space-between;

  gap: 15px;

  margin:
    10px 0
    15px;
}

.section-head h3,
.page-title h2 {
  font-size: 21px;

  margin-top: 4px;
}

.page-title p {
  color:
    var(--muted);

  margin-top: 5px;

  max-width: 920px;
}

.text-btn {
  background: none;

  color:
    var(--accent);

  font-weight: 700;
}


/* NEWS */

.cards-grid {
  display: grid;

  grid-template-columns:
    repeat(3,1fr);

  gap: 14px;
}

.news-card {
  background:
    var(--card);

  border:
    1px solid
    var(--line);

  border-radius: 17px;

  padding: 18px;

  transition: .2s;
}

.news-card:hover {
  transform:
    translateY(-3px);

  border-color:
    #4c637f;
}

.news-card .date {
  color:
    var(--accent);

  font-size: 11px;

  font-weight: 800;
}

.news-card h4 {
  margin:
    9px 0;
}

.news-card p {
  color:
    var(--muted);

  line-height: 1.5;
}


/* GAMES */

.games-grid {
  display: grid;

  grid-template-columns:
    repeat(3,1fr);

  gap: 18px;
}

.game-card {
  overflow: hidden;

  border:
    1px solid
    var(--line);

  background:
    var(--card);

  border-radius: 21px;

  box-shadow:
    var(--shadow);

  transition: .25s;
}

.game-card:hover {
  transform:
    translateY(-5px);
}

.game-cover {
  height: 170px;

  display: grid;

  place-items: center;

  font-size: 64px;

  background:
    radial-gradient(
      circle at 50% 40%,
      rgba(56,189,248,.18),
      rgba(15,25,42,.2)
    );
}

.game-body {
  padding: 20px;
}

.game-tag {
  font-size: 10px;

  font-weight: 800;

  color:
    var(--accent);

  letter-spacing: 1.5px;
}

.game-body h3 {
  font-size: 25px;

  margin:
    7px 0;
}

.game-body p {
  color:
    var(--muted);

  min-height: 52px;

  line-height: 1.45;

  margin-bottom: 17px;
}

.game-body .primary-btn {
  width: 100%;
}


/* STUDENTS */

.students-grid {
  display: grid;

  grid-template-columns:
    repeat(4,1fr);

  gap: 14px;
}


/* STUDENT CARDS */

.student-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: .2s;
  overflow: hidden;
  user-select: none;
}

.student-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.student-cover {
  width: 100%;
  height: 175px;
  border-radius: 13px;
  overflow: hidden;
  position: relative;
  background: var(--card2);
  pointer-events: none;
}

.student-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.student-avatar {
  width: 100%;
  height: 100%;
  position: relative;
  background: var(--card2);
  display: grid;
  place-items: center;
  font-size: 60px;
  pointer-events: none;
}

.student-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.student-body {
  padding-top: 13px;
  pointer-events: none;
}

.student-card strong {
  display: block;
  font-size: 17px;
}

.student-card small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.search-input {
  max-width: 280px;
  height: 43px;
}


/* LISTS */

.news-list,
.reminders-list {
  display: grid;

  gap: 12px;
}

.news-row,
.reminder-row {
  background:
    var(--card);

  border:
    1px solid
    var(--line);

  border-radius: 17px;

  padding: 18px;

  display: flex;

  gap: 15px;

  align-items: flex-start;
}

.news-icon,
.rem-icon {
  font-size: 25px;

  background:
    var(--card2);

  min-width: 45px;

  height: 45px;

  display: grid;

  place-items: center;

  border-radius: 13px;
}

.news-row h4,
.reminder-row h4 {
  margin-bottom: 5px;
}

.news-row p,
.reminder-row p {
  color:
    var(--muted);

  line-height: 1.5;
}

.time {
  color:
    var(--accent);

  font-size: 11px;

  font-weight: 800;
}

.empty {
  padding: 28px;

  border:
    1px dashed
    var(--line);

  border-radius: 16px;

  text-align: center;

  color:
    var(--muted);
}


/* CHAT */

.chat-shell,
.private-chat {
  border:
    1px solid
    var(--line);

  background:
    var(--card);

  border-radius: 20px;

  overflow: hidden;

  min-height: 620px;

  display: flex;

  flex-direction: column;
}

.chat-head,
.private-head {
  padding:
    17px 18px;

  border-bottom:
    1px solid
    var(--line);

  display: flex;

  justify-content:
    space-between;

  align-items: center;
}

.chat-head small {
  display: block;

  color:
    var(--muted);

  margin-top: 3px;

  font-size: 11px;
}

.chat-head span {
  color:
    #4ade80;

  font-size: 11px;
}

.messages {
  flex: 1;

  overflow: auto;

  padding: 20px;

  display: flex;

  flex-direction: column;

  gap: 12px;

  min-height: 0;
}

.message {
  max-width: 78%;

  padding:
    10px 13px;

  border-radius: 15px;

  background:
    var(--card2);

  align-self:
    flex-start;
}

.message.mine {
  align-self:
    flex-end;

  background:
    rgba(37,99,235,.36);
}

.message strong {
  font-size: 12px;
}

.message p {
  margin-top: 3px;

  line-height: 1.4;

  word-break: break-word;
}

.message time {
  font-size: 9px;

  color:
    var(--muted);

  display: block;

  margin-top: 5px;
}

.message-image {
  display: block;

  max-width: 260px;

  max-height: 260px;

  object-fit: cover;

  border-radius: 10px;

  margin-top: 7px;
}

.message-gif {
  display: block;

  max-width: 230px;

  border-radius: 10px;

  margin-top: 7px;
}

.composer {
  border-top:
    1px solid
    var(--line);

  padding: 11px;

  display: flex;

  gap: 8px;

  position: relative;
}

.composer input {
  flex: 1;

  min-width: 0;

  background:
    var(--bg2);

  border:
    1px solid
    var(--line);

  border-radius: 12px;

  color:
    var(--text);

  outline: none;

  padding:
    0 13px;

  height: 44px;
}

.round-btn,
.send-btn {
  height: 44px;

  min-width: 44px;

  border-radius: 12px;

  background:
    var(--card2);

  color:
    var(--text);

  border:
    1px solid
    var(--line);

  font-weight: 800;
}

.send-btn {
  background:
    var(--accent);

  color:
    white;

  border: 0;
}

.emoji-panel,
.gif-panel {
  position: absolute;

  bottom: 62px;

  left: 10px;

  background:
    var(--bg2);

  border:
    1px solid
    var(--line);

  border-radius: 15px;

  padding: 10px;

  box-shadow:
    var(--shadow);

  z-index: 5;
}

.emoji-panel {
  display: grid;

  grid-template-columns:
    repeat(8,1fr);

  gap: 3px;

  max-width: 340px;
}

.emoji-panel button,
.gif-item {
  background:
    transparent;

  padding: 7px;

  border-radius: 8px;
}

.emoji-panel button:hover,
.gif-item:hover {
  background:
    var(--card2);
}

.gif-panel {
  display: grid;

  grid-template-columns:
    repeat(3,1fr);

  gap: 8px;

  max-width: 430px;

  max-height: 330px;

  overflow: auto;
}

.gif-item {
  border:
    1px solid
    var(--line);

  background:
    var(--card);

  overflow: hidden;
}

.gif-item img {
  display: block;

  width: 100%;

  height: 82px;

  object-fit: cover;
}

.gif-item span {
  display: block;

  padding: 5px;

  font-size: 10px;

  color:
    var(--muted);
}


/* PRIVATE */

.private-layout {
  display: grid;

  grid-template-columns:
    280px 1fr;

  gap: 14px;

  min-height: 620px;
}

.private-people {
  border:
    1px solid
    var(--line);

  border-radius: 20px;

  background:
    var(--card);

  overflow: auto;

  padding: 8px;
}

.private-person {
  display: flex;

  gap: 10px;

  align-items: center;

  padding: 12px;

  border-radius: 12px;

  cursor: pointer;
}

.private-person:hover,
.private-person.active {
  background:
    var(--card2);
}

.avatar-sm {
  width: 42px;

  height: 42px;

  border-radius: 13px;

  background:
    var(--card2);

  display: grid;

  place-items: center;

  font-size: 21px;

  overflow: hidden;
}

.avatar-sm img {
  width: 100%;

  height: 100%;

  object-fit: cover;
}

.private-person small {
  display: block;

  color:
    var(--muted);

  margin-top: 2px;
}


/* ADMIN */

.admin-tabs {
  display: flex;

  gap: 7px;

  flex-wrap: wrap;

  margin-bottom: 14px;
}

.admin-tab {
  background:
    var(--card);

  border:
    1px solid
    var(--line);

  color:
    var(--muted);

  padding:
    11px 13px;

  border-radius: 12px;

  font-weight: 700;
}

.admin-tab.active {
  color:
    var(--accent);

  border-color:
    rgba(56,189,248,.45);
}

.admin-box {
  background:
    var(--card);

  border:
    1px solid
    var(--line);

  border-radius: 19px;

  padding: 20px;
}

.admin-box h3 {
  margin-bottom: 14px;
}

.admin-form {
  display: grid;

  grid-template-columns:
    repeat(4,1fr);

  gap: 9px;
}

.admin-form.two {
  grid-template-columns:
    1fr 1fr 150px;
}

.admin-form textarea {
  height: 110px;

  padding: 13px;

  resize: vertical;
}

.admin-list {
  margin-top: 16px;

  display: grid;

  gap: 8px;
}

.admin-row {
  display: flex;

  align-items: center;

  gap: 11px;

  padding: 11px;

  border:
    1px solid
    var(--line);

  border-radius: 13px;
}

.admin-row .grow {
  flex: 1;
}

.admin-row button {
  background:
    #30202a;

  color:
    #ff8094;

  padding:
    8px 10px;

  border-radius: 8px;
}

.admin-help {
  margin-top: 12px;

  color:
    var(--muted);

  font-size: 12px;

  line-height: 1.5;
}

.warning-box {
  border:
    1px solid
    #826b31;

  background:
    #3e3212;

  color:
    #f4d782;

  padding: 13px;

  border-radius: 12px;

  margin-bottom: 15px;
}

.admin-private-list {
  display: flex;

  gap: 8px;

  flex-wrap: wrap;

  margin-bottom: 14px;
}

.admin-private-list button {
  background:
    var(--card2);

  border:
    1px solid
    var(--line);

  padding:
    10px 12px;

  border-radius: 10px;

  color:
    var(--text);
}

.admin-private-messages {
  border-top:
    1px solid
    var(--line);

  padding-top: 12px;

  display: grid;

  gap: 7px;
}

.admin-msg {
  background:
    var(--bg2);

  border:
    1px solid
    var(--line);

  padding: 10px;

  border-radius: 10px;
}


/* MODAL */

.modal {
  position: fixed;

  inset: 0;

  background:
    rgba(2,7,14,.72);

  backdrop-filter:
    blur(8px);

  z-index: 300;

  display: grid;

  place-items: center;

  padding: 18px;
}

.modal-card {
  width: 550px;

  max-width: 100%;

  max-height: 90vh;

  overflow: auto;

  background:
    var(--card);

  border:
    1px solid
    var(--line);

  border-radius: 22px;

  padding: 22px;

  position: relative;

  box-shadow:
    var(--shadow);

  animation:
    modalIn .28s ease;
}

.profile-modal {
  width: 620px;
}

.close-btn {
  position: absolute;

  right: 13px;

  top: 13px;

  width: 35px;

  height: 35px;

  border-radius: 10px;

  background:
    var(--card2);

  color:
    var(--text);
}

.profile-cover {
  height: 190px;

  border-radius: 17px;

  background:
    linear-gradient(
      135deg,
      #15395d,
      #1e5277
    )

    center / cover;

  position: relative;

  margin-bottom: 58px;
}

.profile-avatar {
  position: absolute;

  bottom: -45px;

  left: 22px;

  width: 90px;

  height: 90px;

  border-radius: 26px;

  background:
    var(--card2);

  border:
    4px solid
    var(--card);

  display: grid;

  place-items: center;

  font-size: 40px;

  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;

  object-fit: cover;
}

.profile-head {
  display: flex;

  align-items: flex-start;

  justify-content:
    space-between;

  gap: 12px;
}

.profile-head h2 {
  font-size: 27px;
}

.profile-head p {
  color:
    var(--muted);

  margin-top: 4px;
}

.profile-actions {
  display: flex;

  gap: 8px;

  margin:
    15px 0;
}

.profile-actions button {
  flex: 1;
}

.post-box {
  border-top:
    1px solid
    var(--line);

  padding-top: 15px;

  margin-top: 8px;
}

.post {
  background:
    var(--card2);

  border-radius: 15px;

  padding: 13px;

  margin-top: 10px;
}

.post-head {
  display: flex;

  justify-content:
    space-between;

  align-items: center;

  font-size: 12px;
}

.post-type {
  color:
    var(--accent);

  font-size: 10px;

  font-weight: 800;

  letter-spacing: 1px;
}

.post p {
  line-height: 1.5;

  margin:
    8px 0;
}

.post img {
  display: block;

  width: 100%;

  max-height: 380px;

  object-fit: cover;

  border-radius: 11px;

  margin:
    7px 0;
}

.post-actions {
  display: flex;

  align-items: center;

  gap: 12px;
}

.like-btn {
  background:
    transparent;

  color:
    var(--muted);

  font-size: 13px;
}

.like-btn.liked {
  color:
    #fb4a70;
}

.like-names {
  color:
    var(--muted);

  font-size: 10px;
}

.modal-subtitle {
  color:
    var(--muted);

  margin:
    8px 0
    15px;
}

.post-upload-row {
  display: flex;

  gap: 8px;

  align-items: center;

  margin-top: 12px;

  flex-wrap: wrap;
}

.story-check {
  color:
    var(--muted);

  font-size: 13px;
}

.post-preview {
  margin-top: 10px;
}

.post-preview img {
  max-width: 100%;

  max-height: 210px;

  border-radius: 12px;
}

.modal-actions {
  display: flex;

  justify-content:
    flex-end;

  gap: 8px;

  margin-top: 12px;
}


/* ANIMATIONS */

@keyframes floatIn {

  from {
    opacity: 0;

    transform:
      translateY(18px)
      scale(.98);
  }

  to {
    opacity: 1;

    transform: none;
  }

}

@keyframes viewIn {

  from {
    opacity: 0;

    transform:
      translateY(8px);
  }

  to {
    opacity: 1;

    transform: none;
  }

}

@keyframes modalIn {

  from {
    opacity: 0;

    transform:
      scale(.96)
      translateY(9px);
  }

  to {
    opacity: 1;

    transform: none;
  }

}

@keyframes float {

  0%,100% {
    transform:
      translateY(0);
  }

  50% {
    transform:
      translateY(-9px);
  }

}

@keyframes pulse {

  0%,100% {
    transform:
      scale(1);
  }

  50% {
    transform:
      scale(1.06);
  }

}


/* WELCOME */

.welcome-screen {
  position: fixed;

  inset: 0;

  z-index: 99999;

  display: flex;

  align-items: center;

  justify-content: center;

  background:
    radial-gradient(
      circle at center,
      #18385c,
      #0b1424 55%,
      #060c17 100%
    );

  animation:
    welcomeShow .45s ease forwards;
}

.welcome-content {
  text-align: center;

  transform:
    translateY(25px)
    scale(.92);

  animation:
    welcomeText .8s
    cubic-bezier(.2,.8,.2,1)
    .15s forwards;
}

.welcome-icon {
  font-size: 60px;

  margin-bottom: 14px;

  animation:
    welcomeIcon 1.3s ease infinite;
}

.welcome-small {
  color:
    #8fa4bc;

  font-size: 13px;

  letter-spacing: 4px;

  margin-bottom: 9px;

  text-transform: uppercase;
}

.welcome-name {
  color:
    #ffffff;

  font-size:
    clamp(38px,8vw,72px);

  font-weight: 900;

  letter-spacing: 3px;

  text-transform: uppercase;

  text-shadow:
    0 0 25px
    rgba(56,189,248,.35);
}

.welcome-line {
  width: 0;

  height: 3px;

  margin:
    15px auto 0;

  border-radius: 20px;

  background:
    #38bdf8;

  animation:
    welcomeLine .8s
    ease .45s forwards;
}

.welcome-screen.hide {
  animation:
    welcomeHide .45s ease forwards;
}

@keyframes welcomeShow {

  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }

}

@keyframes welcomeText {

  from {
    opacity: 0;

    transform:
      translateY(25px)
      scale(.92);
  }

  to {
    opacity: 1;

    transform:
      translateY(0)
      scale(1);
  }

}

@keyframes welcomeIcon {

  0%,100% {
    transform:
      translateY(0)
      rotate(0);
  }

  50% {
    transform:
      translateY(-8px)
      rotate(-4deg);
  }

}

@keyframes welcomeLine {

  from {
    width: 0;
  }

  to {
    width: 150px;
  }

}

@keyframes welcomeHide {

  from {
    opacity: 1;
  }

  to {
    opacity: 0;

    visibility: hidden;
  }

}


/* TABLET */

@media(max-width:1100px) {

  .students-grid {
    grid-template-columns:
      repeat(3,1fr);
  }

  .games-grid {
    grid-template-columns:
      repeat(2,1fr);
  }

  .stats-grid {
    grid-template-columns:
      repeat(2,1fr);
  }

  .admin-form,
  .admin-form.two {
    grid-template-columns:
      repeat(2,1fr);
  }

  .cards-grid {
    grid-template-columns:
      1fr 1fr;
  }

}


/* PHONE */

@media(max-width:780px) {

  .topbar {
    height: 66px;

    padding:
      0 12px;
  }

  .topbar-brand strong {
    font-size: 14px;
  }

  .topbar-brand small {
    display: none;
  }

  #mobileMenuBtn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* DARK / LIGHT TUGMASI MOBILDA */
  .top-actions .icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;

    z-index: 80;

    top: 66px;

    left: 0;

    bottom: 0;

    width: 265px;

    transform:
      translateX(-105%);

    transition: .25s;

    box-shadow:
      20px 0 60px
      rgba(0,0,0,.25);

    /* JUDA TO'Q SIDEBAR */
    background:
      rgba(11,20,34,.92);
  }

  .sidebar.open {
    transform: none;
  }

  /* YOZUV VA EMOJILAR TINIQ */
  .sidebar .nav-item {
    color: #f1f5f9;

    text-shadow:
      0 1px 3px
      rgba(0,0,0,.75);
  }

  .sidebar .nav-item.active {
    color: var(--accent);

    text-shadow:
      0 1px 3px
      rgba(0,0,0,.65);
  }

  .content {
    padding:
      17px 12px;
  }

  .hero-panel {
    padding: 22px;

    min-height: 190px;
  }

  .hero-panel h2 {
    font-size: 27px;
  }

  .hero-badge {
    font-size: 52px;
  }

  .cards-grid,
  .games-grid,
  .students-grid {
    grid-template-columns:
      1fr;
  }

  .page-title {
    align-items: stretch;

    flex-direction: column;
  }

  .search-input {
    max-width: none;
  }

  .private-layout {
    grid-template-columns: 1fr;

    min-height: 720px;
  }

  .private-people {
    max-height: 230px;
  }

  .chat-shell {
    min-height: 650px;
  }

  .admin-form,
  .admin-form.two {
    grid-template-columns: 1fr;
  }

  .profile-chip {
    padding: 0 9px;
  }

  .profile-chip span:last-child {
    display: none;
  }

  .message {
    max-width: 88%;
  }

}


/* SMALL PHONE */

@media(max-width:480px) {

  .auth-card {
    padding: 18px;

    border-radius: 20px;
  }

  .auth-content h1 {
    font-size: 24px;
  }

  .field input {
    height: 52px;
  }

  .login-hint {
    font-size: 11px;
  }

  .hero-panel p {
    font-size: 13px;
  }

  .stats-grid {
    grid-template-columns:
      1fr 1fr;
  }

  .stat-card strong {
    font-size: 20px;
  }

  .stat-card small {
    font-size: 10px;
  }

  .game-cover {
    height: 140px;
  }

  .composer {
    gap: 5px;
  }

  .round-btn,
  .send-btn {
    min-width: 40px;
  }

  .profile-head {
    display: block;
  }

  .profile-actions {
    flex-direction: column;
  }

}


/* =========================
   LIGHT MODE - TO'LIQ OQ
========================= */

body.light {
  background: #ffffff;
  color: #111111;
}

body.light .topbar {
  background: rgba(255,255,255,.96);
  border-color: #d6d6d6;
}

body.light .sidebar {
  background: rgba(255,255,255,.97);
  border-color: #d6d6d6;
}

body.light .nav-item {
  color: #333333;
}

body.light .nav-item:hover {
  background: #eeeeee;
  color: #111111;
}

body.light .nav-item.active {
  background: #e8f6fd;
  color: #1687c7;
}

body.light .icon-btn,
body.light .profile-chip {
  background: #f3f3f3;
  color: #111111;
  border-color: #d6d6d6;
}

body.light .stat-card,
body.light .news-card,
body.light .game-card,
body.light .student-card,
body.light .news-row,
body.light .reminder-row,
body.light .admin-box,
body.light .private-people,
body.light .chat-shell,
body.light .private-chat {
  background: #ffffff;
  color: #111111;
  border-color: #d6d6d6;
}

body.light .hero-panel {
  background: #ffffff;
  color: #111111;
  border-color: #d6d6d6;
}

body.light .hero-panel h2,
body.light .section-head h3,
body.light .page-title h2,
body.light .news-card h4,
body.light .game-body h3,
body.light .student-card strong,
body.light .news-row h4,
body.light .reminder-row h4,
body.light .chat-head,
body.light .private-head {
  color: #111111;
}

body.light .hero-panel p,
body.light .news-card p,
body.light .game-body p,
body.light .news-row p,
body.light .reminder-row p,
body.light .page-title p,
body.light .stat-card small,
body.light .student-card small,
body.light .private-person small,
body.light .chat-head small {
  color: #555555;
}

body.light .field input,
body.light .search-input,
body.light .admin-form input,
body.light .admin-form textarea,
body.light .admin-form select,
body.light .modal-input,
body.light .modal-card > textarea,
body.light .composer input {
  background: #ffffff;
  color: #111111;
  border-color: #cfcfcf;
}

body.light .secondary-btn,
body.light .round-btn {
  color: #111111;
  background: #f3f3f3;
  border-color: #d6d6d6;
}

body.light .message {
  background: #f1f1f1;
  color: #111111;
}

body.light .message.mine {
  background: #dff3ff;
  color: #111111;
}

body.light .private-person:hover,
body.light .private-person.active {
  background: #eeeeee;
}

body.light .game-cover {
  background: #f3f3f3;
}

body.light .modal {
  background: rgba(0,0,0,.45);
}

body.light .modal-card {
  background: #ffffff;
  color: #111111;
  border-color: #d6d6d6;
}

body.light .close-btn {
  background: #f1f1f1;
  color: #111111;
}

body.light .post {
  background: #f3f3f3;
  color: #111111;
}

body.light .admin-tab {
  background: #ffffff;
  color: #444444;
  border-color: #d6d6d6;
}

body.light .admin-tab.active {
  color: #1687c7;
}

body.light .empty {
  color: #555555;
}

body.light .logout-btn {
  color: #e11d48;
}