body {
    margin: 0;
    font-family: "Segoe UI", sans-serif;
    background-color: #E1F6FB;
    color: #4b3b2a;
    transition: background-color 0.3s, color 0.3s;
}

.dark-mode {
    background-color: #2e2e2e;
    color: #f5f5f5;
}

.dark-mode header {
    background-color: #5E74A1;
    border-bottom: 2px solid #5b4538;
}

.dark-mode .connected-status {
    color: #cdbba7;
}

.dark-mode .athlete-name {
    color: #f0e6d2;
}

.dark-mode .card {
    background-color: #4d5f82; 
    color: #f5e8da;
    border: 1px solid #5b4538;
}

.dark-mode #menu {
    background-color: #364561;
    border-color: #5b4538;
}

.dark-mode #menu a, .dark-mode #menu button {
    color: #f0e6d2;
    background-color: #3e5073;
}

.dark-mode #menu a:hover, .dark-mode #menu button:hover {
    color: #f0e6d2;
    background-color: #495e87;
}

.dark-mode button, .dark-mode a {
    background-color: #3e5073; 
    color: #f0e6d2;       
}

.dark-mode button:hover, .dark-mode a:hover {
    background-color: #4d5f82;
}

header {
    display: flex;
    justify-content: space-between;
    padding: 15px 30px;
    background-color: #90ADCB;
    border-bottom: 2px solid #e5c6b2;
    align-items: flex-start;
}

.left {
    font-size: 1.2em;
    line-height: 1.4;
}

.athlete-name {
    font-size: 1.4em;
    font-weight: bold;
}

.connected-status {
    font-size: 0.9em;
    color: #7a6e60;
}

.right {
    position: relative;
}

#menuToggle {
    font-size: 1.4em;
    background: none;
    border: none;
    cursor: pointer;
}

#menu {
    position: absolute;
    right: 0;
    top: 40px;
    background-color: #7195BC;
    border: 1px solid #cdb8a1;
    list-style: none;
    padding: 12px 20px;
    width: 200px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
    text-align: left;
    border-radius: 8px;
}

#menu.hidden {
    display: none;
}

#menu li {
    margin: 12px 0;
    white-space: nowrap;
}

#menu a, #menu button {
    width: 100%;
    display: block;
    text-align: left;
    text-decoration: none;
    color: #5c3d2e;
    background: none;
    border: none;
    font-size: 1em;
    cursor: pointer;
    padding: 5px 0;
}

#menu a:hover, #menu button:hover {
    width: 100%;
    display: block;
    text-align: left;
    text-decoration: none;
    color: #735c51;
    background-color: #98B1CE;
    border: none;
    font-size: 1em;
    cursor: pointer;
    padding: 5px 0;
}

main {
    padding: 30px 15px;
    max-width: 900px;
    margin: auto;
    text-align: center;
}

h2 {
    margin-top: 40px;
    border-bottom: 2px solid #e5c6b2;
    padding-bottom: 5px;
}

.card {
    background-color: #AFC4D9;
    border: 1px solid #f1d2b7;
    padding: 15px;
    border-radius: 8px;
    margin: 15px auto;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    text-align: left;
    max-width: 600px;
}

.map-container {
  width: 100%;
  max-width: 600px; /* or whatever your card's max-width is */
  margin: 0 auto;
  box-sizing: border-box;
  height: 300px;
  background: #e0e0e0; /* placeholder background */
  margin-bottom: 1.5rem;
}

form {
    margin-top: 20px;
    display: inline-block;
    text-align: left;
}

label {
    display: block;
    margin-top: 10px;
}

select, button {
    padding: 8px;
    margin-top: 5px;
    font-size: 1em;
    border-radius: 5px;
    border: 1px solid #f7e1cf;
    background-color: #7195BC;
}

button, a {
    background-color: #7195BC;
    color: #4b3b2a;
    cursor: pointer;
    margin-top: 15px;
}

button:hover, a:hover {
    background-color: #98B1CE;
}

p.subtitle {
    font-size: 1.1em;
    margin: 10px 0 30px;
    color: #7a6e60;
}
.form-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.settings-section {
    background-color: var(--card-light);
    border: 1px solid #ccc;
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    margin-bottom: 2rem;
    box-shadow: 0 0 10px rgba(0,0,0,0.03);
}

.dark-mode .settings-section {
    background-color: #456686; 
    color: #f5e8da;
    border-color: #444;

}

.settings-section.deauth {
    border: 2px solid #dc3545;
    background-color: #fff0f0;
}

.dark-mode .settings-section.deauth {
    background-color: #674c4c;
}

.btn-danger, .dark-mode .btn-danger {
    display: flex;
    justify-content: center;
    background-color: #dc3545;
    color: white;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.btn-danger:hover, .dark-mode .btn-danger:hover {
    background-color: #a71d2a;
}

.theme-toggle-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.2rem;
    padding: 0.5rem 0.8rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.back-button {
    position: absolute;
    top: 1rem;
    left: 1rem;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

h1 {
    margin-bottom: 2rem;
}
