
:root {
    --bg-color: #f0f2f5;
    --text-color: #1a1a1a;
    --header-bg: #1a237e;
    --card-bg: #ffffff;
}

body.dark-mode {
    --bg-color: #2c2c2c;
    --text-color: #f0f2f5;
    --header-bg: #2a337e;
    --card-bg: #363636;
}

body {
    background-color: var(--bg-color);
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    color: var(--text-color);
    line-height: 1.5;
    min-height: 100vh;
}

header {
    background-color: var(--header-bg);
    color: white;
    padding: 20px;
    text-align: center;
    margin-bottom: 30px;
    min-height: 180px;
    position: relative;
}

header h1 {
    margin: 0;
    font-size: 2.5em;
    padding-bottom: 10px;
}

.description {
    margin-top: 10px;
    font-size: 1.1em;
    opacity: 0.9;
}

.header-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.button-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.unavailableOverlay {
    background-color: rgba(255, 165, 0, .75) !important;
}

.theme-button {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    background: white;
    color: var(--header-bg);
    cursor: pointer;
    margin: 5px;
}

.theme-button:hover {
    background: #f0f0f0;
}

.berths-section {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.berth-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.berth-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.berth-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.berth-card h3, .berth-card h4 {
    margin: 0 0 15px 0;
    color: #1a237e;
}

body.dark-mode .berth-card h3,
body.dark-mode .berth-card h4 {
    color: white;
}

.berth-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: #1a237e;
}

body.dark-mode .berth-info {
    color: white;
}

.berth-info span {
    color: #1a237e;
}

body.dark-mode .berth-info span {
    color: white;
}

@keyframes animationFrames {
    50% {
        background-color: orange;
    }
}

.unavailableOverlay, .disconnectedOverlay {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background-color: rgba(255, 165, 0, .75);
}

.sysUnavailable, .sysDisconnected {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    text-align: center;
    background-color: #282828;
    color: orange;
    font-size: 2rem;
    font-weight: bold;
    padding: 0.5rem;
    width: 50%;
    height: fit-content;
}

.welcomeOverlay {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, .75);
}

.welcomeOverlayText {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    text-align: center;
    background-color: #282828;
    color: orange;
    font-size: 2rem;
    font-weight: bold;
    padding: 0.5rem;
    width: 50%;
    height: fit-content;
    cursor: pointer;
}

footer {
    text-align: center;
    padding: 6px;
    background-color: #282828;
    color: #fff;
    font-size: 0.9em;
    margin-top: auto;
}
