/* ---------- ROOT VARIABLES ---------- */
:root {
  --black-900: #0a0a0a; 
  --black-850: #101010;
  --black-800: #161616; 
  --black-700: #1f1f1f; 
  --black-600: #2a2a2a; 
  --muted: #aaa; 
  --accent-1: #3e00ff; 
  --accent-2: #ae00fb; 
  --text: #f3f2f6;
  --glass-border: 1px solid rgba(255,255,255,0.06);
  --radius: 16px; 
  --max-width: 1200px;
}

/* ---------- GLOBAL ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Tahoma, Arial, sans-serif;
  background: var(--black-900);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------- NAVBAR (GLASS DARK) ---------- */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(10, 10, 10, 0.85); /* Ciemniejszy dla lepszego kontrastu */
  backdrop-filter: blur(12px);
  border-bottom: var(--glass-border);
  padding: 0.6rem 1.2rem;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.7);
}

.navbar-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Fix dla strzałek obok nazwy */
.dropbtn {
  display: flex !important;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.arrow-icon { font-size: 0.7rem; color: var(--accent-2); transition: 0.3s; }
.arrow-icon-side { font-size: 0.6rem; margin-left: auto; color: var(--accent-2); transition: 0.3s; }
.dropdown:hover > .dropbtn .arrow-icon { transform: rotate(180deg); }

.nav-links {
  display: flex;
  gap: 0.8rem;
  list-style: none;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 0.8rem;
  border-radius: 12px;
  transition: 0.25s;
}

.nav-links a:hover {
  background: var(--black-700);
  color: #fff;
}

.nav-links li { position: relative; }

.nav-links .dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--black-800);
  min-width: 200px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
  border-radius: 12px;
  border: var(--glass-border);
  z-index: 1000;
  padding: 5px 0;
}

.nav-links .dropdown-content a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 1.2rem;
  border-radius: 0;
}

.nav-links li.dropdown:hover > .dropdown-content { display: block; }

/* Sub-dropdowny (poziome) */
.sub-dropdown { top: 0 !important; left: 100% !important; margin-left: 2px; }

/* Hamburger Menu Button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1100;
}
.mobile-menu-btn span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--text);
  border-radius: 3px;
  transition: 0.3s;
}

/* ---------- USER MENU ---------- */
.user-menu {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: transform 0.2s;
}
.avatar:hover { transform: scale(1.05); }

.avatar-dropdown {
  position: relative;
}

.avatar-dropdown .dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  background: var(--black-800);
  border: var(--glass-border);
  border-radius: var(--radius);
  min-width: 160px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.6);
  overflow: hidden;
  z-index: 1100;
}

.avatar-dropdown .dropdown a {
  display: block;
  padding: 0.8rem 1rem;
  color: var(--text);
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s;
}

.avatar-dropdown .dropdown a:hover {
  background: var(--black-700);
}

.avatar-dropdown .dropdown.show {
  display: block;
}

/* login link */
.user-menu a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  background: var(--black-700);
  transition: background 0.2s;
}
.user-menu a:hover {
  background: var(--black-600);
}

/* ---------- SECTION ---------- */
section {
  padding-top: 90px;
  min-height: calc(100vh - 90px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
}

.section-content {
  max-width: var(--max-width);
  width: 100%;
  background: var(--black-800);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.6);
  text-align: center;
}

/* ---------- CLOCK ---------- */
#clock .time { 
  font-size: 3rem; 
  font-weight: 700; 
  color: #fff;
}
#clock .date, #clock .date_text { 
  font-size: 1rem; 
  color: var(--muted); 
}

/* ---------- BINARY CLOCK ---------- */
#binaryClock {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 2rem 0;
}

.time-unit {
  display: flex;
  flex-direction: column; /* dolny bit na dole */
  gap: 6px;
  justify-content: flex-end; /* wyrównanie do dołu */
  align-items: center; /* wyśrodkowanie kolumny */
}

.circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--black-700);
  border: 1px solid rgba(255,255,255,0.1);
  transition: background 0.3s, box-shadow 0.3s;
}

/* aktywna dioda */
.circle.on {
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  box-shadow: 0 0 8px var(--accent-1);
}

/* nieaktywna dioda */
.circle.off {
  background: var(--black-700);
  box-shadow: none;
}

/* ---------- CYFROWY ZEGAR ---------- */
#digitalClock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

#digitalClock .time {
  font-size: 2rem;
  font-weight: 700;
}

#digitalClock .date {
  font-size: 1rem;
  color: var(--muted);
}

/* ---------- TABLE ---------- */
#studentsTable {
  width: 100%;
  max-width: 800px;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--black-800);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
  margin: 2rem auto;
}

#studentsTable th, 
#studentsTable td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--black-700);
  color: var(--text);
  text-align: left;
  font-size: 1rem;
}

#studentsTable th {
  background: var(--black-700);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#studentsTable tr:nth-child(even) td {
  background: var(--black-850);
}

#studentsTable tr:hover td {
  background: var(--black-600);
  transition: background 0.25s;
}

#studentsTable tr:first-child th:first-child { border-top-left-radius: var(--radius); }
#studentsTable tr:first-child th:last-child { border-top-right-radius: var(--radius); }
#studentsTable tr:last-child td:first-child { border-bottom-left-radius: var(--radius); }
#studentsTable tr:last-child td:last-child { border-bottom-right-radius: var(--radius); }

/* ---------- FORMS ---------- */
form {
  background: var(--black-800);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
}

input, textarea, select {
  border-radius: 12px;
  border: 1px solid var(--black-700);
  background: var(--black-700);
  color: var(--text);
  padding: 0.75rem 1rem;
  width: 100%;
  font-size: 1rem;
  transition: border 0.2s, background 0.2s;
}

textarea:focus, select:focus {
  border-color: var(--accent-1);
  background: var(--black-600);
  outline: none;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  padding: .6rem 1rem;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  color: #fff;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { 
  transform: translateY(-2px);
  opacity: 0.9;
}
.btn.ghost {
  background: transparent;
  border: 1px solid var(--black-700);
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--black-800);
  border-top: var(--glass-border);
  padding: 1.5rem 1rem;
  text-align: center;
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
}
.footer a {
  color: var(--accent-2);
  text-decoration: none;
}
.footer a:hover { text-decoration: underline; }
.footer-container { max-width: var(--max-width); margin: 0 auto; }

/* ---------- RESPONSIVE / MOBILE MENU ---------- */
@media (max-width: 1100px) {
  .desktop-only { display: none !important; }
  
  .mobile-menu-btn { display: flex; }

  .nav-links {
    position: fixed;
    top: 60px; /* Panel wysuwa się idealnie spod navbaru */
    left: -300px; /* Bezpiecznie ukryte po LEWEJ stronie (piksele zapobiegają błędom zooma) */
    width: 260px; /* Kompaktowa szerokość, nie zasłania całej strony */
    max-width: 85vw; /* Zabezpieczenie dla bardzo wąskich ekranów */
    height: calc(100vh - 60px);
    background: var(--black-900);
    flex-direction: column;
    align-items: stretch; 
    padding: 1rem 0 4rem 0;
    transition: left 0.3s ease-in-out; /* Płynne wysuwanie */
    box-shadow: 10px 0 30px rgba(0,0,0,0.8); /* Cień rzucany na resztę strony */
    border-right: var(--glass-border);
    z-index: 1050;
    overflow-y: auto;
  }

  /* Włączenie menu (wysuwa się z lewej do krawędzi) */
  .nav-links.mobile-active { left: 0; }

  .nav-links li { 
    width: 100%; 
    margin: 0;
  }
  
  .nav-links a, .dropbtn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    font-size: 1.05rem; 
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
  }
  
  /* Reset dropdownów na telefonie - rozwijają się jak akordeon w dół */
  .nav-links .dropdown-content {
    position: static;
    display: none;
    width: 100%;
    background: var(--black-850);
    box-shadow: none;
    border: none;
    padding: 0;
  }
  
  /* Wcięcia dla sub-menu, żeby było widać hierarchię */
  .nav-links .dropdown-content a {
    padding-left: 40px;
    font-size: 0.95rem;
    color: var(--muted);
  }
  .sub-dropdown li a {
    padding-left: 55px; 
  }
  
  /* Rozwijanie podkategorii po KLIKNIĘCIU (współpracuje ze skryptem JS) */
  .nav-links li.dropdown:hover > .dropdown-content { display: none; }
  .nav-links li.dropdown.active-mobile > .dropdown-content { display: block; }
  
  .sub-dropdown { position: static !important; }
  
  /* Rotacja strzałek po rozwinięciu */
  .nav-links li.dropdown.active-mobile > .dropbtn .arrow-icon,
  .nav-links li.dropdown.active-mobile > a .arrow-icon-side {
    transform: rotate(180deg) !important;
  }
  
  /* Obrócenie bocznej strzałki na dół domyślnie */
  .arrow-icon-side {
    transform: rotate(90deg);
  }

  /* Animacja ikony hamburgera */
  .mobile-menu-btn.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .mobile-menu-btn.open span:nth-child(2) { opacity: 0; }
  .mobile-menu-btn.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

@media (max-width: 600px) {
  .circle {
    width: 16px;
    height: 16px;
  }
  .code-header span {
    font-size: 0.8rem;
  }
  .copy-btn {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .avatar { width: 38px; height: 38px; }
  .navbar { padding: 0.5rem 0.8rem; }
}


/* RESET tabeli - usuń domyślne kolory */
table, th, td {
  all: unset;
  display: revert;
}

/* ---------- MANAGE TABLES ---------- */
.manage-table {
  width: 100%;
  max-width: 800px;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--black-800);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 2rem auto;
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
}

.manage-table th,
.manage-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--black-700);
  color: var(--text);
  text-align: left;
  font-size: 1rem;
}

.manage-table th {
  background: var(--black-700);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
}

.manage-table tr:nth-child(even) td { background: var(--black-850); }
.manage-table tr:hover td { background: var(--black-600); transition: background 0.25s; }

.manage-table tr:first-child th:first-child { border-top-left-radius: var(--radius); }
.manage-table tr:first-child th:last-child { border-top-right-radius: var(--radius); }
.manage-table tr:last-child td:first-child { border-bottom-left-radius: var(--radius); }
.manage-table tr:last-child td:last-child { border-bottom-right-radius: var(--radius); }

.manage-table td { vertical-align: middle; }
.manage-table td form { display: inline-block; margin: 0 2px; }
.manage-table td:last-child { display: flex; justify-content: center; gap: 6px; }
.manage-table button { cursor: pointer; }

/* ---------- DELETE BUTTON ---------- */
.btn-danger {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  background: linear-gradient(90deg, #ff4d4d, #b30000);
  color: #fff;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn-danger:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* flex-container dla filmów */
.flex-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  overflow: hidden;
  max-height: 1000px;
  transition: max-height 0.3s ease;
}

.flex-container.collapsed { max-height: 0; }

.flex-container > div {
  flex: 1 1 300px;
  max-width: 350px;
}

.yt {
  width: 100%;
  height: 200px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.manage-table input.edit-input {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  padding: 2px 4px;
  box-sizing: border-box;
}

/* ---------- FLEX SECTION (zegary + kalendarz) ---------- */
.flex-section {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
}

.left-side, .right-side {
  flex: 1 1 400px;
  max-width: 600px;
}

.right-side iframe {
  box-shadow: 0 6px 18px rgba(0,0,0,0.6);
}

#darkCalendar {
  background: var(--black-800);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(0,0,0,0.6);
  color: var(--text);
  padding: 0.5rem;
}

#darkCalendar .fc {
  font-family: "Inter", sans-serif;
  color: var(--text);
  background: var(--black-800);
}

#darkCalendar .fc-toolbar-title,
#darkCalendar .fc-toolbar button {
  color: var(--text);
  background: var(--black-700);
  border: none;
  border-radius: var(--radius);
}
#darkCalendar .fc-toolbar button:hover { background: var(--black-600); }

#darkCalendar .fc-col-header-cell,
#darkCalendar .fc-timegrid-col-header {
  background-color: var(--black-700);
  border: none;
}
#darkCalendar .fc-col-header-cell-cushion,
#darkCalendar .fc-timegrid-col-header {
  color: var(--text);
  font-weight: 600;
}

#darkCalendar .fc-col-header-cell-cushion span {
  color: var(--accent-2);
  font-weight: 500;
}

#darkCalendar .fc-timegrid-slot-label {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  border: none;
}

#darkCalendar .fc-daygrid-event, 
#darkCalendar .fc-timegrid-event {
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  color: #fff;
  border: none;
  border-radius: 8px;
}

#darkCalendar .fc-scrollgrid,
#darkCalendar .fc-scrollgrid-section,
#darkCalendar .fc-timegrid-slot {
  background: var(--black-800);
  border: none;
}

.results-count {
  text-align: left;
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0.5rem 0 1rem 0;
}

/* ---------- CODE BOX (styl jak w ChatGPT) ---------- */
.code-box {
  position: relative;
  background: var(--black-850);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  margin-top: 1.5rem;
  text-align: left;
  box-shadow: 0 4px 18px rgba(0,0,0,0.5);
  overflow: hidden;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--black-800);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

.copy-btn {
  background: transparent;
  border: none;
  color: var(--accent-2);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s, transform 0.2s;
}

.copy-btn:hover {
  color: var(--accent-1);
  transform: translateY(-1px);
}

pre {
  margin: 0;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  font-family: "Fira Code", monospace;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #e4e4e4;
  background: transparent;
}

pre code {
  display: block;
  white-space: pre;
}

code.language-php { color: #e7d184; }
code.language-php .keyword { color: #ff79c6; }
code.language-php .string { color: #f1fa8c; }
code.language-php .function { color: #8be9fd; }

/* Poprawka Avatar Dropdown */
#dropdownMenu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 15px);
  background: var(--black-800);
  border: var(--glass-border);
  border-radius: 12px;
  min-width: 180px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
#dropdownMenu.show { display: block; }
#dropdownMenu a {
  display: block;
  padding: 12px 20px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  transition: 0.2s;
}
#dropdownMenu a:hover { background: var(--black-700); }


/* ---------- PCB AUTOROUTER LOGO (z idle animacją) ---------- */
.logo-container {
  display: flex;
  align-items: center;
  z-index: 100;
}

.pcb-route-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 160px; /* Szerokość obrysu PCB */
  height: 50px;
  text-decoration: none;
}

.routing-svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
}

/* Ciemne ścieżki w tle (jak ukryta miedź pod maską) */
.trace-bg {
  fill: none;
  stroke: var(--black-700);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

/* Aktywne, neonowe ścieżki - domyślny stan "oddychania" */
.trace-active {
  fill: none;
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  /* Subtelne oddychanie w spoczynku */
  animation: trace-breathe 4s ease-in-out infinite; 
}

/* Kolory dla linii oraz lekkie przesunięcie w czasie, by nie migały równo */
.line-1 { stroke: var(--accent-1); }
.line-2 { stroke: var(--accent-2); animation-delay: 2s; }

/* Kluczowe klatki oddychania */
@keyframes trace-breathe {
  0%, 100% { stroke-dashoffset: 200; opacity: 0; }
  50% { stroke-dashoffset: 100; opacity: 0.6; filter: drop-shadow(0 0 2px currentColor); }
}

/* =========================================
   AKTYWACJA PEŁNEGO SYGNAŁU NA HOVER
   ========================================= */

/* Gdy najedziemy, zdejmujemy oddychanie i rysujemy z dużą siłą */
.pcb-route-logo:hover .line-1,
.pcb-route-logo:hover .line-2 {
  animation: none;
  stroke-dashoffset: 0;
  opacity: 1;
}

.pcb-route-logo:hover .line-1 {
  filter: drop-shadow(0 0 6px var(--accent-1));
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.pcb-route-logo:hover .line-2 {
  filter: drop-shadow(0 0 6px var(--accent-2));
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

/* Przelotki (kółeczka na końcach) */
.via {
  fill: var(--black-900);
  stroke: var(--black-600);
  stroke-width: 1.5;
  transition: fill 0.3s, stroke 0.3s, filter 0.3s;
}

.logo-text-pcb {
  position: relative;
  z-index: 2;
  font-family: 'VT323', monospace;
  font-size: 1.9rem;
  color: var(--text);
  letter-spacing: 1px;
  margin-top: 2px; /* Lekkie centrowanie optyczne */
  transition: color 0.3s, text-shadow 0.3s;
}

/* =========================================
   AKTYWACJA PEŁNEGO SYGNAŁU NA HOVER
   ========================================= */

/* Po najechaniu WYŁĄCZAMY animację w tle i wypełniamy całą linię */
.pcb-route-logo:hover .line-1,
.pcb-route-logo:hover .line-2 {
  animation: none;
  stroke-dasharray: 200;
  stroke-dashoffset: 0;
}

.pcb-route-logo:hover .line-1 {
  filter: drop-shadow(0 0 5px var(--accent-1));
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.pcb-route-logo:hover .line-2 {
  filter: drop-shadow(0 0 5px var(--accent-2));
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

/* Podświetlanie przelotek w rytm docierającego sygnału */
.pcb-route-logo:hover .via-1-start { fill: var(--accent-1); stroke: var(--accent-1); }
.pcb-route-logo:hover .via-1-end   { fill: var(--accent-1); stroke: var(--accent-1); filter: drop-shadow(0 0 4px var(--accent-1)); transition-delay: 0.5s; }

.pcb-route-logo:hover .via-2-start { fill: var(--accent-2); stroke: var(--accent-2); transition-delay: 0.1s; }
.pcb-route-logo:hover .via-2-end   { fill: var(--accent-2); stroke: var(--accent-2); filter: drop-shadow(0 0 4px var(--accent-2)); transition-delay: 0.6s; }

/* Rozświetlenie tekstu */
.pcb-route-logo:hover .logo-text-pcb {
  color: #fff;
  text-shadow: 0 0 10px rgba(255,255,255,0.4);
}

/* ---------- RESPONSIVE TABLES WRAPPER ---------- */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* Płynne przewijanie na iOS */
  margin: 2rem auto;
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
  background: var(--black-800);
}

/* Własny styl paska przewijania dla tabel */
.table-wrapper::-webkit-scrollbar {
  height: 8px;
}
.table-wrapper::-webkit-scrollbar-track {
  background: var(--black-850);
  border-radius: 0 0 var(--radius) var(--radius);
}
.table-wrapper::-webkit-scrollbar-thumb {
  background: var(--black-600);
  border-radius: 8px;
}
.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--accent-2); /* Kolor akcentu przy najechaniu na pasek */
}

/* Modyfikacja samej tabeli, by dopasowała się do wrappera */
#studentsTable, .manage-table {
  width: 100%;
  min-width: 650px; /* Minimalna szerokość - zapobiega nadmiernemu ściskaniu tekstu */
  margin: 0; /* Margines przejmuje wrapper */
  box-shadow: none; /* Cień przejmuje wrapper */
  border-radius: 0; /* Zaokrąglenia na rogach tabeli można wyzerować */
}