.page-lw {
    background-image: url('../images/LW_background.jpg');
    background-repeat: no-repeat;
    background-color: #cccccc;
    background-blend-mode: overlay;
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
}

.page-lw {
    padding-top: 40px;
}

.page-lw h2 {
  color: black;
  font-family: 'Veteran Typewriter';
  font-size: 350%;
  text-align: center;
}

.page-lw h3 {
  color: black;
  font-family: 'Veteran Typewriter';
  font-size: 130%;
  text-align: left;
}

.page-lw p {
  text-align: left;
  font-family: 'Special Elite';
}

.page-lw button {
  color: black;
  font-family: 'Special Elite';
  font-size: 100%;
}

.page-lw .panel-section {
  background-color: rgba(255,255,255,0.4);
  padding: 10px;
  margin: 60px auto;
  max-width: 800px;
  border: 2px solid #333;
  opacity: 0.9;
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(0,0,0,0.4);
  font-family: 'Special Elite';
  color: #222;
}

.page-lw .panel-content p {
  margin-bottom: 10px;
  line-height: 1.6;
  color: black;
  opacity: 1;
}

.page-lw .panel-images {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.page-lw .panel-images img {
  max-width: 800px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.page-lw .panel-buttons {
  border: 2px solid black;
  color: black;
  font-family: 'Special Elite';
  opacity: 0.8;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.3);
  font-size: 120%;
  padding: 10px 20px;
  padding-top: 14px;
  margin: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.page-lw .jafu-section {
  padding: 60px;
  margin: 40px auto;
  max-width: 900px;
  border: 2px solid #333;
  opacity: 0.8;
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(0,0,0,0.4);
  font-family: 'Special Elite';
  color: #222;
  background-color: rgba(255,255,255,0.7);
}

.page-lw .jafu-section h3 {
  font-size: 200%;
  text-align: center;
}

.page-lw .jafu-content p {
  margin-bottom: 10px;
  line-height: 1.6;
}

.page-lw .jafu-images {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
  align-items: center;
}

.page-lw .jafu-images img {
  width: 100%;
  max-width: 800px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.page-lw .kneeboard-images {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
  align-items: center;
}

.page-lw .kneeboard-images img {
  width: 100%;
  max-width: 550px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.page-lw .caption {
  font-family: 'Veteran Typewriter';
  font-size: 150%;
  text-align: center;
  margin-top: 8px;
  color: #111;
}

/* ========================= */
/*   SQUADRON OVERLAY PANEL  */
/* ========================= */

.page-lw #squadron-overlay {
  display: none;
  opacity: 0;
  transition: opacity 1s ease;
  width: 1000px;
  margin: 40px auto;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  overflow: hidden;
  background-color: rgba(255,255,255,0.85);
  padding: 20px;
}

.page-lw #returnButton {
  font-family: 'Special Elite';
  font-size: 140%;
  padding: 10px 20px;
  padding-top: 15px;
  border: 2px solid black;
  background: white;
  cursor: pointer;
  margin-bottom: 20px;
}

/* ========================= */
/*   GLOBAL SQUADRON STYLES  */
/* ========================= */

.page-lw .squadron-background {
  background-size: 100%;
  background-position: top;
  background-blend-mode: screen;
  padding: 40px;
  border-radius: 12px;
  position: relative;
}

.page-lw .squadron-background::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.65);
  backdrop-filter: brightness(1.1);
  z-index: 0;
}

.page-lw .squadron-background > * {
  position: relative;
  z-index: 1;
}

.page-lw .squadron-background h2 {
  color: black;
  font-family: 'Special Elite';
  font-size: 300%;
  text-align: center;
  margin-top: 10px;
}

.page-lw .squadron-background h3 {
  color: black;
  font-family: 'Special Elite';
  font-size: 200%;
  text-align: center;
}

.page-lw .squadron-background h4 {
  color: black;
  font-family: 'Special Elite';
  font-size: 150%;
  text-align: left;
  margin-top: 5px;
}

.page-lw .squadron-background p {
  margin-bottom: 5px;
  font-size: 110%;
}

.page-lw .squadron-heading {
  font-family: 'Special Elite';
  font-size: 35px;
  margin-bottom: 10px;
}

.page-lw .roster-log-button {
  background-color: transparent;
  border: 2px solid black;
  color: black;
  font-family: 'Special Elite';
  box-shadow: 2px 2px 6px rgba(0,0,0,0.3);
  font-size: 120%;
  padding: 10px 20px;
  padding-top: 15px;
  margin: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

/* Roster background panel */

.page-lw #roster-background {
  background-image: url('../images/chalkboard_texture.png');
  background-position: center/contain;
  padding: 40px;
  border-radius: 10px;
  margin: 50px 50px;
  opacity: 0.9;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Pilot roster table */

.page-lw #pilot-table {
  width: 100%;
  border-collapse: collapse;
  font-family: Bradley Hand ITC;
  font-size: 130%;
  color: white;
  background-color: transparent;
}

.page-lw #pilot-table th,
.page-lw #pilot-table td {
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding: 12px;
  text-align: left;
}

.page-lw #pilot-table th {
  font-size: 120%;
  font-family: 'Special Elite';
  border-bottom: 2px solid white;
}

.page-lw #pilot-table-body td:nth-child(3),
.page-lw #pilot-table-body td:nth-child(4) {
  text-align: center;
}

.page-lw .pilot-link {
  color: white;
  text-decoration: none;
  cursor: pointer;
}

.page-lw .pilot-link:hover {
  font-weight: bold;
  font-size: 100%;
}

/* Modal system */

.page-lw .modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  overflow-y: auto;
}

.page-lw .modal-content {
  background-image: url('../images/lw_pilot_card.png');
  background-position: center;
  background-size: 190%;
  background-repeat: no-repeat;
  margin: 180px auto;
  padding: 20px;
  border: 2px solid #333;
  border-radius: 15px;
  font-family: 'Special Elite';
  opacity: 0.9;
  width: 600px;
  box-shadow: 0 0 10px #000;
}

.page-lw #dossierContent {
  margin-top: 10px;
  margin-left: 8px;
  font-family: 'Special Elite';
  font-size: 90%;
}

.page-lw .pilot-callsign {
  font-size: 1.2em;
  font-weight: bold;
  display: inline;
}

/* --- Luftwaffe Pilot Card (Refined) --- */

.page-lw .lw-card {
  background: transparent;
  border: none;
  padding: 20px 24px;
  margin: 10px auto;
  max-width: 720px;
  font-family: 'Special Elite', monospace;
  position: relative;
  color: #111;
}

.page-lw .lw-card-header {
  text-align: center;
  margin-bottom: 18px;
}

.page-lw .lw-card-rank {
  font-size: 130%;
  letter-spacing: 1px;
}

.page-lw .lw-card-name {
  font-size: 150%;
  font-weight: bold;
  margin-top: 6px;
}

.page-lw .lw-card-callsign {
  font-weight: normal;
  font-style: italic;
  margin: 0 4px;
}

.page-lw .lw-card-section {
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,0.4);
}

.page-lw .lw-card-section-title {
  font-size: 110%;
  letter-spacing: 1px;
  font-weight: bold;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.page-lw .lw-card-row {
  display: flex;
  justify-content: space-between;
  font-size: 120%;
  margin: 4px 0;
}

.page-lw .lw-label {
  color: #111;
}

.page-lw .lw-value {
  color: #111;
}

.page-lw .lw-card-report {
  font-size: 120%;
  margin-top: 6px;
  white-space: pre-wrap;
}

/* Medals */

.page-lw .lw-card-medals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, auto));
  gap: 15px 15px;
  justify-items: center;
  justify-content: start;
  margin: 12px 0 12px;
}

.page-lw .lw-medal {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 160px;
}

.page-lw .lw-medal img {
  height: 130px;
  width: auto;
  filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.4));
}

.page-lw .medal-label {
  display: block;
  font-family: 'Special Elite';
  font-size: 80%;
  margin-top: 4px;
  opacity: 0.8;
  text-align: center;
}

/* Information */

.page-lw #information-background {
  background-image: url('../images/chalkboard_texture.png');
  background-position: center/contain;
  width: 500px;
  padding: 40px;
  border-radius: 10px;
  margin: 50px 170px;
  opacity: 0.9;
  font-family: Bradley Hand ITC;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.page-lw .info-content h3 {
  font-family: Bradley Hand ITC;
  font-size: 160%;
  font-weight: bold;
  color: white;
  text-align: left;
}

.page-lw .info-content p {
  font-family: Bradley Hand ITC;
  font-size: 130%;
  color: white;
  text-align: left;
}

.page-lw .section-line {
  position: relative;
  margin: 18px 0;
  height: 1px;
}

.page-lw .section-line::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background-color: white;
}

/* LOGBOOK */

.page-lw .lw-logbook {
  background: #f4f1e8;
  border: 2px solid #3a2f1b;
  padding: 20px;
  margin: 20px 0;
  font-family: "Courier New", monospace;
  color: #2a2418;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.page-lw .lw-logbook h4 {
  margin-top: 0;
  font-family: "Stencil", sans-serif;
  letter-spacing: 1px;
  color: #1e1a12;
}

.page-lw .lw-logbook-section {
  border-top: 1px solid #3a2f1b;
  margin-top: 15px;
  padding-top: 10px;
}

.page-lw .lw-logbook-row {
  display: flex;
  justify-content: space-between;
  margin: 4px 0;
}

.page-lw .lw-logbook-label {
  font-weight: bold;
}

/* ============================= */
/*   SEENOTDIENST STATUS PANEL   */
/* ============================= */

.page-lw .seenotdienst-status {
  background-image: url('../images/lw_paper_texture.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-color: rgba(240,240,240,0.85);
  border: 2px solid #222;
  padding: 20px;
  margin-top: 20px;
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(0,0,0,0.4);
}

.page-lw .seenotdienst-status .asr-header-title {
  font-family: 'Veteran Typewriter';
  font-size: 220%;
  text-align: center;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.page-lw .seenotdienst-status .asr-header-sub {
  font-family: 'Veteran Typewriter';
  font-size: 140%;
  text-align: center;
  opacity: 0.8;
}

.page-lw .seenotdienst-status .asr-stamp {
  font-family: 'Veteran Typewriter';
  text-align: center;
  margin: 10px 0;
  padding: 4px 0;
  border-top: 2px solid #000;
  border-bottom: 2px solid #000;
  letter-spacing: 3px;
}

.page-lw .seenotdienst-status .asr-divider {
  border: none;
  border-top: 1px solid #444;
  margin: 15px 0;
}

.page-lw .seenotdienst-status .asr-entry {
  background-color: rgba(255,255,255,0.7);
  border-left: 3px solid #333;
  padding: 10px;
  margin: 10px 0;
}

.page-lw .seenotdienst-status .asr-entry.indented {
  border-left: 3px solid #666;
  margin-left: 20px;
}