
    /* THEME VARIABLES */
    :root {
      --bg-color: #f2f4f8;
      --text-color: #333;
      --panel-bg: #fff;
      --header-bg: #0077cc;
      --header-text: #fff;
      --btn-bg: #0077cc;
      --btn-text: #fff;
      --input-bg: #fff;
      --input-border: #ccc;
      --hover-bg: #e6f2ff;
    }
    body.dark-mode {
      --bg-color: #1e1e1e;
      --text-color: #eaeaea;
      --panel-bg: #2a2a2a;
      --header-bg: #111;
      --header-text: #eee;
      --btn-bg: #444;
      --btn-text: #eee;
      --input-bg: #333;
      --input-border: #555;
      --hover-bg: #333d;
    }
    /* Apply variables */
    html, body {
      height: 100%; margin: 0;
      font-family: 'Nunito Sans', sans-serif;
      background-color: var(--bg-color);
      color: var(--text-color);
    }
    #header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 12px 20px; background-color: var(--header-bg); color: var(--header-text);
      font-weight: 600; height: 60px; box-shadow: 0 4px 6px rgba(0,0,0,0.1);
      border-bottom-left-radius: 12px; border-bottom-right-radius: 12px;
    }
    #header .logo { display: flex; align-items: center; gap: 12px; }
    #header .logo img { height: 60px; width: 60px; }

    #container {
      display: grid;
      grid-template-columns: 280px 1fr 320px;
      height: calc(100vh - 60px);
      gap: 10px;
      padding: 10px;
    }

     #leftPanel, #rightPanel {
      background: var(--panel-bg); color: var(--text-color);
      padding: 15px; overflow-y: auto;
      border-radius: 12px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);
      position: relative; transition: transform 0.3s ease, opacity 0.3s ease; z-index: 2;
    }

    #map {
      height: 100%;
      width: 100%;
      border-radius: 12px;
    }

    #searchInput, #typeFilter {
      width: 90%;
      padding: 10px;
      margin-bottom: 12px;
      border: 1px solid #ccc;
      border-radius: 8px;
      font-size: 1em;
      box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
    }

    h3 { margin-top: 0; font-size: 1.1em; color: #0077cc; }

    .boat-item {
      padding: 10px;
      margin-bottom: 6px;
      border-left: 6px solid #333;
      cursor: pointer;
      border-radius: 8px;
      transition: background-color 0.2s;
    }

    .boat-item:hover, .boat-item.selected { background-color: #e6f2ff; }

    #boatDetails p { margin: 8px 0; }
    #boatDetails hr { border: none; border-top: 1px solid #ddd; margin: 12px 0; }
    #toggleTrailBtn { margin-bottom: 10px; padding: 8px 12px; background-color: #0077cc; color: white; border: none; border-radius: 8px; cursor: pointer; }

    .eta-link { color: #0077cc; cursor: pointer; text-decoration: underline; }
    .crowd-status { font-weight: 600; }
    .crowded { color: red; }
    .not-crowded { color: green; }
    .reroute-suggestion { margin-top: 6px; font-style: italic; color: #cc3300; }

    #leftPanel.collapsed {
      transform: translateX(-100%);
      opacity: 0;
    }

    #rightPanel.collapsed {
      transform: translateX(100%);
      opacity: 0;
    }

    @media (max-width: 1024px) {
      #container { grid-template-columns: 1fr; grid-template-rows: auto auto auto; height: auto; }
      #leftPanel, #rightPanel { max-height: 300px; height: auto; }
      #map { height: 400px; min-height: 300px; }
      #header { flex-direction: column; align-items: flex-start; height: auto; gap: 10px; }
      #header .logo img { height: 40px; width: 40px; }
    }

    #toggleLeftPanelBtn, #toggleRightPanelBtn {
      position: absolute;
      top: 15px;
      z-index: 1001;
      background: #0077cc;
      color: white;
      border: none;
      border-radius: 50%;
      width: 32px;
      height: 32px;
      font-size: 18px;
      cursor: pointer;
      box-shadow: 0 2px 6px rgba(0,0,0,0.2);
      transition: transform 0.3s ease;
    }

    #toggleLeftPanelBtn { right: -16px; }
    #toggleRightPanelBtn { left: -16px; }

    @media (max-width: 1024px) {
      #container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        height: auto;
      }

      #leftPanel, #rightPanel {
        max-height: 300px;
        height: auto;
      }

      #map {
        height: 400px;
        min-height: 300px;
      }

      #header {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        gap: 10px;
      }

      #header .logo img {
        height: 40px;
        width: 40px;
      }
    }

    @media (max-width: 600px) {
      #searchInput, #typeFilter {
        width: 100%;
      }

      .logo span {
        font-size: 0.9em;
      }

      .login-status {
        font-size: 0.85em;
      }
    }

    /* Modal container */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

/* Modal content */
.modal-content {
  background: #ffffff;
  padding: 30px;
  border-radius: 16px;
  width: 320px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  position: relative;
  animation: scaleIn 0.3s ease;
}

/* Close button */
.modal-content .close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 22px;
  cursor: pointer;
  color: #555;
}

/* Modal title */
.modal-content h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-weight: 600;
  color: #333;
  font-size: 1.5em;
  text-align: center;
}

/* Form group */
.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  font-size: 0.9em;
  margin-bottom: 6px;
  color: #333;
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1em;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: #0077cc;
  outline: none;
}

/* Login button */
.login-btn {
  width: 100%;
  padding: 10px;
  background: #0077cc;
  color: white;
  font-size: 1em;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.login-btn:hover {
  background: #005fa3;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Loader */
    #loader {
      display: none; /* hidden on page load */
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      background: rgba(0,0,0,0.4);
      z-index: 9999;
      justify-content: center;
      align-items: center;
    }
    #loader div {
      width: 60px; height: 60px;
      border: 6px solid #f3f3f3;
      border-top: 6px solid #0077cc;
      border-radius: 50%;
      animation: spin 1s linear infinite;
    }
    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }