/* === Styl ogólny === */
body {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  color: #cfd3d7;
  background-color: #0f1114;
  min-height: 100vh;    
  overflow-x: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;    
}
main {
  flex: 1; /* klucz – main wypełnia pozostałą przestrzeń */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
}
@font-face {
  font-family: 'Orbitron';
  src: url('fonts/Orbitron-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Orbitron';
  src: url('fonts/Orbitron-Bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}

body, h1, h2, h3, table, th, td {
  font-family: 'Orbitron', sans-serif;
}
#back_image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  opacity: 0.25;
  filter: brightness(0.9) contrast(1.1);
}

/* === Nagłówek - poprawiony układ === */
header {
  width: 100%;
  background: rgba(25, 28, 33, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(120, 150, 180, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 30px;
  box-sizing: border-box;
  position: relative;
  z-index: 10;
}

.header-content {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Lewa część - menu */
.left-menu {
  flex: 1;
  display: flex;
  justify-content: flex-start;
}

/* Środkowa część - tytuł */
header h1 {
  flex: 1;
  text-align: center;
  font-weight: 700;
  font-style: italic;
  color: #e4e8ec;
  letter-spacing: 2px;
  font-size: 1.8rem;
  margin: 0;
}

/* Prawa część - ikony social */
.socials-top {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.social-icon {
  width: 28px;
  height: 28px;
  opacity: 0.85;
  transition: transform 0.2s, opacity 0.2s;
}

.social-icon:hover {
  transform: scale(1.1);
  opacity: 1;
}

/* Menu rozwijane */
.top-dropdown {
  position: relative;
}

.dropbtn {
  background: none;
  border: 1px solid rgba(150, 170, 190, 0.4);
  color: #d0d4d8;
  padding: 8px 16px;
  margin-left: 15%;    
  border-radius: 4px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s;
}

.dropbtn:hover {
  background: rgba(90, 110, 130, 0.4);
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(25, 28, 33, 0.95);
  min-width: 200px;
  border-radius: 6px;
  border: 1px solid rgba(100, 120, 140, 0.4);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
  z-index: 15;
}

.dropdown-content a {
  color: #d2d7de;
  padding: 10px 15px;
  display: block;
  text-decoration: none;
}

.dropdown-content a:hover {
  background-color: rgba(90, 110, 130, 0.5);
}

.top-dropdown:hover .dropdown-content {
  display: block;
}

/* === Sekcje === */
section {
  margin: 50px auto;
  padding: 30px;
  width: 90%;
  max-width: 1200px;
  background: rgba(20, 25, 30, 0.6);
  border: 1px solid rgba(120, 140, 160, 0.3);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

section h2 {
  color: #e6ebef;
  border-bottom: 1px solid rgba(120, 150, 170, 0.3);
  padding-bottom: 5px;
  margin-bottom: 15px;
}

/* === Tabele === */
.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 0.95rem;
}

thead {
  background: rgba(40, 45, 50, 0.7);
  color: #e0e6ea;
}

th, td {
  padding: 10px;
  border-bottom: 1px solid rgba(120, 150, 170, 0.3);
}

tbody tr:hover {
  background-color: rgba(80, 100, 120, 0.3);
}

.stats-section {
  margin: 40px auto;
  padding: 20px;
  max-width: 1200px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 16px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  text-align: center;
}

.stats-table th, .stats-table td {
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stats-table th {
  background-color: rgba(255, 255, 255, 0.1);
  font-weight: bold;
  text-transform: uppercase;
}

.stats-table tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

h2 {
  color: #00bfff;
  margin-bottom: 10px;
  text-align: center;
  font-family: 'Orbitron', sans-serif;
}
/* --- Tryby misji --- */
#modeSwitcher {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 20px 0 10px;
}

.mode-btn {
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-family: Orbitron, sans-serif;
  font-size: 14px;
  font-weight: bold;
  background: rgba(60, 60, 65, 0.7);
  border: 1px solid rgba(200, 200, 200, 0.3);
  color: #eee;
  transition: 0.25s;
}
.mode-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}
.mode-btn.active {
  background: #c0392b;
  border-color: #ff6b5a;
  color: white;
}
#btnTraining.mode-btn.active {
  background: #27ae60;
  border-color: #7fffb2;
}
/* --- Ikona powrotu do strony głównej --- */
.home-icon {
  position: absolute;
  left: 25px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 6px;
  background: rgba(255,255,255,0.07);
  transition: 0.25s ease;
}
.home-icon:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-50%) scale(1.05);
}
.home-svg {
  width: 26px;
  height: 26px;
  color: #e4e8ec;
  transition: color 0.25s ease;
}
.home-icon:hover .home-svg {
  color: #ffffff;
}

/* === Stopka === */
footer {
  margin-top: auto; /* klucz – dopycha do dołu */
  width: 100%;
  text-align: center;
  background: rgba(0, 0, 0, 0.7);
  color: #ccc;
  padding: 12px 0;
  font-size: 0.9em;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
/* === Responsywność === */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    padding: 15px;
  }

  .header-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .left-menu, .socials-top {
    justify-content: center;
    margin: 5px 0;
  }

  header h1 {
    font-size: 1.5rem;
    margin: 8px 0;
  }

  section {
    width: 95%;
    padding: 20px;
  }

  th, td {
    padding: 8px;
  }
}
