* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  min-height: 100vh;
  padding: 15px;
  color: #333;
}

#clock-container {
  position: fixed;
  top: 15px;
  left: 15px;
  background: rgba(255, 255, 255, 0.95);
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

#clock {
  font-family: "Courier New", monospace;
  font-size: 1.8rem;
  font-weight: 600;
  color: #2c3e50;
  text-align: center;
  margin-bottom: 12px;
}

.clock-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  justify-content: center;
}

.clock-controls input {
  width: 50px;
  padding: 6px;
  text-align: center;
  border: 2px solid #3498db;
  border-radius: 4px;
  font-family: "Courier New", monospace;
  font-size: 0.95rem;
  font-weight: 600;
}

.clock-controls input:focus {
  outline: none;
  border-color: #2980b9;
}

.clock-controls span {
  font-weight: bold;
  color: #2c3e50;
  font-size: 1rem;
}

.clock-controls button {
  padding: 6px 12px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  margin-left: 5px;
  transition: background 0.3s ease;
}

.clock-controls button:hover {
  background: #2980b9;
}

.clock-controls button.stopped {
  background: #27ae60;
}

.clock-controls button.stopped:hover {
  background: #229954;
}

.clock-controls button#clock-reset {
  background: #e74c3c;
}

.clock-controls button#clock-reset:hover {
  background: #c0392b;
}
/* Toggle button - hidden on desktop */
#clock-collapse-toggle {
  display: none;
  position: absolute;
  top: 5px;
  right: 5px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 0.8rem;
  z-index: 10;
}

#clock-collapse-toggle:hover {
  background: #2980b9;
}
#version {
  position: fixed;
  bottom: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 15px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #2c3e50;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

a:link {
  color: orange;
  background-color: transparent;
  text-decoration: none;
}

a:visited {
  color: yellow;
  background-color: transparent;
  text-decoration: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

header {
  text-align: center;
  color: white;
  margin-bottom: 25px;
  padding: 15px;
}

h1 {
  font-size: 2rem;
  margin-bottom: 8px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}
.message-format ul,
.message-format ol {
    white-space: normal;
    margin: 8px 0;
    padding-left: 25px;
}

.message-format li {
    line-height: 1.2;
    margin-bottom: 0;
}


.subtitle {
  font-size: 1rem;
  opacity: 0.9;
}

.callsign-container {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.callsign-container label {
  font-size: 1rem;
  font-weight: 500;
}

.callsign-container input {
  padding: 8px 15px;
  font-size: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.9);
  color: #2c3e50;
  font-weight: 600;
  text-align: center;
  min-width: 150px;
  transition: all 0.3s ease;
}

.callsign-container input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.8);
  background: white;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}

.card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.card-header {
  padding: 15px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
  border-bottom: 2px solid #e9ecef;
  transition: background 0.3s ease;
}

.card-header:hover {
  background: #e9ecef;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
}

.card-icon {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
  color: #3498db;
}

.card.active .card-icon {
  transform: rotate(180deg);
}

.card-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.card.active .card-content {
  max-height: 2000px;
}

.card-body {
  padding: 20px;
  background: white;
}

.message-format {
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #3498db;
    line-height: 1.6;
    white-space: pre-line;
    font-size: 0.9rem;
    font-weight: 500;
}

.message-line {
  margin: 8px 0;
}

.marker {
  color: #c0392b;
  font-weight: bold;
}

.placeholder {
  color: #2980b9;
  font-weight: bold;
}

.note {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 12px;
  margin-top: 12px;
  border-radius: 4px;
  font-size: 0.85rem;
}

.note strong {
  color: #856404;
}

.example {
  background: #d1ecf1;
  border-left: 4px solid #17a2b8;
  padding: 12px;
  margin-top: 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-style: italic;
}

.emergency {
  border-left-color: #c0392b;
}

.emergency .card-header {
  background: #fdd;
}

.warning {
  border-left-color: #e67e22;
}

.warning .card-header {
  background: #fef5e7;
}

.routine {
  border-left-color: #27ae60;
}

@media (max-width: 768px) {
  h1 {
    font-size: 1.5rem;
  }
@media (max-width: 768px) {
  /* Keep your existing styles, then ADD/UPDATE these: */
  
  /* Show toggle button only on mobile */
  #clock-collapse-toggle {
    display: block;
    font-size: 1.5rem; /* 20% larger icon */
  }
  
  /* Collapse container when not expanded */
  #clock-container {
    padding: 0;
    background: transparent;
    box-shadow: none;
    width: auto;
  }
  
  /* When expanded, show the white background */
  #clock-container.expanded {
    padding: 15px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  }
  
  /* Clock content - collapsed by default on mobile */
  #clock-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  
  /* When expanded */
  #clock-container.expanded #clock-content {
    max-height: 200px;
    margin-top: 10px;
  }
  
  #clock {
    font-size: 1.5rem;
  }

  .clock-controls input {
    width: 45px;
    font-size: 0.85rem;
  }
  .card-title {
    font-size: 1rem;
  }

  .card-header {
    padding: 12px;
  }

  .card-body {
    padding: 15px;
  }

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

  .callsign-container {
    flex-direction: column;
    gap: 8px;
  }

  .callsign-container input {
    min-width: 200px;
  }

  #clock {
    font-size: 1.5rem;
  }

  .clock-controls input {
    width: 45px;
    font-size: 0.85rem;
  }
  .clock-controls input[type="number"]::-webkit-inner-spin-button,
  .clock-controls input[type="number"]::-webkit-outer-spin-button {
    height: 20px;
  }

  #version {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
}

@media (min-width: 1400px) {
  .cards-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

.divider {
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  margin: 30px 0;
}
}