/* =========================
   Base / Reset
========================= */
html,
body {
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  background-color: #333;
  color: #fff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.row {
  display: flex;
  align-items: center;
}

.card {
  background-color: #444;
  border-radius: 8px;
  padding: 20px;
}

.muted {
  color: #bbb;
  font-size: 0.9em;
}

/* =========================
   Banner / Header
========================= */
#banner {
  height: 160px;
  background:
    linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)),
    url('/images/Home/hambanner.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
}

#header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.header-right {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.layout-callsign-search {
  display: flex;
  align-items: center;
  gap: 6px;
}

.layout-callsign-search input {
  width: 125px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #555;
  background: #222;
  color: #fff;
  font-size: 13px;
}

.layout-callsign-search input:focus {
  outline: none;
  border-color: #2f6fed;
}

.layout-callsign-search button {
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  background: #2f6fed;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease;
}

.layout-callsign-search button:hover {
  background: #255fd1;
}

.layout-callsign-search button:active {
  transform: translateY(1px);
}

@media (max-width: 600px) {
  .header-right {
    gap: 6px;
  }

  .layout-callsign-search {
    gap: 4px;
  }

  .layout-callsign-search input {
    width: 82px;
    padding: 5px 6px;
    font-size: 12px;
  }

  .layout-callsign-search button {
    padding: 5px 7px;
    font-size: 12px;
  }
}

#header img {
  height: 120px;
  width: auto;
  transition: transform 0.3s ease;
}

#header img:hover {
  transform: scale(1.05);
}

.discord-btn {
  display: inline-block;
  background: #5865f2;
  color: white;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  transition: background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.discord-btn:hover {
  background: #4752c4;
  transform: translateY(-1px);
}

/* =========================
   Back / Shared Buttons
========================= */
.back-button-container {
  padding-left: 150px;
  margin-bottom: 20px;
}

.back-button {
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #444;
  background: #2f6fed;
  color: #fff;
  cursor: pointer;
  width: auto;
  min-width: 140px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.back-button:hover {
  background: #255fd1;
}

.back-button:active {
  transform: translateY(1px);
}

#discord-link {
  display: block;
  text-align: center;
  background-color: #7289da;
  color: white;
  padding: 12px 20px;
  font-size: 1.2em;
  border-radius: 5px;
  text-decoration: none;
  width: fit-content;
  margin: 20px auto;
  transition: background-color 0.3s ease;
}

#discord-link:hover {
  background-color: #99aab5;
}

.btn-back,
.ham-btn {
  display: inline-block;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.4rem 0.8rem;
  background-color: #007bff;
  color: white;
  border-radius: 4px;
  margin-right: 1rem;
  transition: background-color 0.2s;
}

/* =========================
   Shared Server Status Basics
========================= */
#server-status a {
  color: #fff;
  text-decoration: none;
}

#server-status a:hover {
  text-decoration: none;
  color: #fff;
}

.server-status-section {
  background-color: #444;
  border-radius: 8px;
  padding: 20px;
}

/* =========================
   Audio Streams
========================= */
.audio-section {
  margin-top: 40px;
}

.audio-stream {
  padding-left: 50px;
  margin-bottom: 20px;
}

.audio-stream p {
  color: lightgray;
  margin-bottom: 8px;
}

.audio-stream audio {
  display: block;
  width: 300px;
  max-width: 100%;
}

/* =========================
   News Panel
========================= */
#newsPanel {
  position: fixed;
  bottom: 0;
  right: -420px;
  width: 360px;
  max-width: 90%;
  background: #1b1b1b;
  color: white;
  border-radius: 12px 0 0 0;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.4);
  padding: 16px;
  transition: right 0.4s ease;
  z-index: 9999;
}

#newsPanel.open {
  right: 0;
}

.newsHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

#openNewsBtn {
  position: fixed;
  bottom: 15px;
  right: 15px;
  background: #2e7d32;
  color: white;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
}

/* =========================
   Footer
========================= */
#footer {
  background-color: #222;
  color: white;
  text-align: center;
  padding: 20px;
  margin-top: 60px;
}

.affiliate-disclaimer {
  font-size: 0.85rem;
  color: #aaa;
  margin-bottom: 6px;
}

/* =========================
   Sub Header (below banner)
========================= */
.sub-header-row {
  padding-left: 150px;
  margin-bottom: 20px;
}

.sub-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* =========================
   Account UI
========================= */
.layout-account-area {
  display: flex;
  align-items: center;
}

.account-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-welcome {
  font-size: 14px;
  font-weight: 700;
  background: #444;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
}

.account-button {
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #444;
  background: #2f6fed;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.account-button:hover {
  background: #255fd1;
}

.account-button:active {
  transform: translateY(1px);
}

.account-button.account-button-logout {
  background: #555;
  border-color: #666;
}

.account-button.account-button-logout:hover {
  background: #666;
}

.account-link {
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #444;
  color: #fff;
  text-decoration: none;
  transition: background 0.2s ease;
}

.account-link:hover {
  background: #555;
}

/* =========================
   Responsive
========================= */
@media (max-width: 900px) {
  #banner {
    height: 140px;
  }
}

@media (max-width: 768px) {
  #header img {
    height: 80px;
  }

  .back-button-container {
    padding-left: 20px;
  }

  .back-button {
    font-size: 0.9em;
    padding: 8px 12px;
    min-width: 120px;
  }

  .sub-header-row {
    padding-left: 20px;
  }

  .sub-header-left {
    gap: 8px;
  }

  .account-info {
    gap: 8px;
  }

  .account-welcome,
  .account-button,
  .account-link {
    font-size: 13px;
  }

  .account-welcome {
    padding: 7px 10px;
  }

  .account-button,
  .account-link {
    padding: 7px 12px;
  }
}

@media (max-width: 600px) {
  #banner {
    height: 100px;
  }

  #header {
    padding: 0 12px;
    gap: 10px;
  }

  .header-left {
    gap: 8px;
  }

  .discord-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  .account-info {
    flex-direction: column;
    align-items: flex-start;
  }

  .account-welcome {
    white-space: normal;
  }
}