body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f4f4;
  -webkit-tap-highlight-color: transparent;
}

header {
  background-color: #355E3B;
  color: white;
  text-align: center;
  padding: 5px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

header h1 {
  margin: 0;
  font-size: 25px;
  text-transform: uppercase;
}

.header-content {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 3px;
  position: relative;
}

header #connectionType {
  width: 56px;
  padding: 6.25px;
  margin: 0;
  font-size: 16px;
  height: 48px;
  line-height: 28px;
  background-color: white;
  color: #355E3B;
  border: 1px solid #ccc;
  border-radius: 4px;
  position: absolute;
  left: 10px;
}

header #stats {
  font-weight: bold;
  background-color: #355E3B;
  color: white;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 18px;
  text-align: center;
  flex-grow: 0;
}

header #currentLocator {
  font-size: 18px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  padding: 3px 6px;
  margin-left: 8px;
  cursor: pointer;
}

main {
  max-width: 600px;
  margin: 100px auto 20px;
  padding: 0 10px;
}

select, input[type="text"] {
  padding: 10px;
  margin: 5px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
  height: 48px;
  line-height: 28px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  box-sizing: border-box;
}

select {
  background-color: white;
  color: #355E3B;
}

input[type="text"]::placeholder {
  color: #355E3B;
  font-size: 16px;
}

select:focus, input[type="text"]:focus {
  outline: none;
  border-color: #355E3B;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.input-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

#callsign, #qthContent {
  width: calc(66.67% - 15px);
}

#type, #locator {
  width: calc(33.33% - 15px);
}

#mySignal, #myRadio, #hisSignal, #hisRadio {
  width: calc(25% - 10px);
  margin: 5px 0;
}

#frequency, #modulation {
  width: calc(50% - 10px);
  margin: 5px 0;
}

.info-right {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  font-size: 18px;
  color: #355E3B;
  margin: 5px 0;
  gap: 8px;
}

.info-right span {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.info-label {
  font-weight: bold;
}

.button-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.button-group .save-button, .button-group .delete-entry-button {
  flex: 1;
}

.bottom-buttons {
  justify-content: center;
}

.save-button {
  background-color: hsl(130, 30%, 75%);
  color: #355E3B;
  padding: 8px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  margin: 5px 0;
  font-size: 25.6px;
  font-weight: bold;
}

.delete-entry-button {
  background-color: #FF5757;
  color: white;
  padding: 8px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  margin: 5px 0;
  font-size: 25.6px;
  font-weight: bold;
}

#deleteButton {
  background-color: #FF5757;
  color: white;
  padding: 8px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  width: 33.33%;
  margin: 5px 2px;
  font-size: 16px;
  font-weight: bold;
}

#exportButton, #shareButton {
  background-color: #FFBD59;
  color: white;
  padding: 8px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  width: 33.33%;
  margin: 5px 2px;
  font-size: 16px;
  font-weight: bold;
}

.save-button:hover, .delete-entry-button:hover, #deleteButton:hover, #exportButton:hover, #shareButton:hover {
  filter: brightness(110%);
}

#logList {
  background-color: white;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  min-height: 100px;
  white-space: pre-wrap;
  font-family: monospace;
}

#logList.empty {
  color: #888;
  font-style: italic;
}

#logList .log-time {
  color: #355E3B;
  font-weight: bold;
  cursor: pointer;
}

#logList .log-time:hover {
  text-decoration: underline;
}

#output {
  margin: 10px 0;
  color: green;
}

#output.error {
  color: red;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: white;
  padding: 20px;
  border-radius: 4px;
  text-align: center;
  max-width: 90%;
}

.modal-content h2 {
  margin-top: 0;
}

.modal-content button {
  background-color: #355E3B;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 10px;
}

.modal-content button:hover {
  background-color: #4a7a50;
}

#map {
  width: 100%;
  height: 300px; /* Upraveno na novou výšku mapy (300px) */
  margin-top: 10px;
  position: relative;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#mapImage {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

#mapCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.map-tooltip {
  position: fixed;
  z-index: 1000;
  background-color: white;
  border: 1px solid black;
  border-radius: 4px;
  padding: 5px;
}

@media (max-width: 400px) {
  select, input[type="text"] {
    font-size: 16px;
    height: 42px;
    line-height: 24px;
  }
  select option {
    font-size: 16px;
  }
  input[type="text"]::placeholder {
    font-size: 16px;
  }
  header h1 {
    font-size: 22.5px;
  }
  header #stats, header #currentLocator {
    font-size: 15px;
  }
  header #connectionType {
    width: 52px;
    font-size: 16px;
    height: 42px;
    line-height: 24px;
  }
  main {
    margin-top: 90px;
  }
  #callsign, #qthContent {
    width: calc(66.67% - 15px);
  }
  #type, #locator {
    width: calc(33.33% - 15px);
  }
  #mySignal, #myRadio, #hisSignal, #hisRadio {
    width: calc(25% - 10px);
  }
  #frequency, #modulation {
    width: calc(50% - 10px);
  }
  .info-right {
    font-size: 15px;
  }
  .save-button, .delete-entry-button {
    font-size: 22.4px;
  }
  #deleteButton, #exportButton, #shareButton {
    font-size: 14.4px;
  }
  #map {
    height: 200px; /* Zachování poměru stran 2:1 (300 * 2/3) pro menší obrazovky */
  }
}