body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column; /* Align children vertically */
    min-height: 100vh;
    background-color: #222; 
    color: white;
}

header h1 {
    font-size: 1.5em; /* Adjust font size */
    margin: 5px 0; /* Reduce padding above and below */
}

.app-container {
    width: 100%;
    max-width: 400px;
    text-align: center;
    margin: 0 auto; /* Center horizontally */
    padding-top: 0; /* Remove unnecessary padding at the top */
    flex: 1; /* Allow it to stretch vertically */
}

header {
    background: #444;
    padding: 10px;
    font-size: 1.2em;
}

.compass-container {
    position: relative; /* For positioning child elements like pointers */
    width: 300px;
    height: 300px;
    margin: 0 auto; /* Center the container horizontally */
}

.compass-container img {
    width: 300px; /* Exact width */
    height: 300px; /* Exact height */
    object-fit: contain; /* Ensure the image fits within its container without distortion */
    transform-origin: center; /* Ensure rotation happens from the center */
    transition: transform 0.3s ease; /* Optional: Smooth rotation */
    display: block; /* Remove any gaps caused by inline elements */
    margin: 0 auto; /* Center the image horizontally in the container */
}

.pointer {
    position: absolute;
    width: 300px; /* Match compass dimensions */
    height: 300px; /* Match compass dimensions */
    top: 0; /* Align with compass container */
    left: 0; /* Align with compass container */
    transform-origin: center; /* Rotate around the center */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent; /* Explicitly ensure transparency */
    pointer-events: none; /* Prevent pointer interaction */
}

.pointer.sun {
    background-image: url('pointer_sun.png');
}

.pointer.shadow {
    background-image: url('pointer_shadow.png');
}

.pointer.moon {
    background-image: url('pointer_moon.png');
}

.controls {
    display: flex;
    justify-content: space-between; /* Spread items evenly */
    align-items: center;
    padding: 10px;
    background: #333;
    border-radius: 8px;
    margin: 10px 0;
}

.controls button {
    margin: 5px;
    padding: 8px 12px; /* Smaller padding for compact buttons */
    font-size: 0.9em; /* Slightly smaller font */
}

.controls #mode-btn,
.controls #help-btn {
    padding: 8px 12px;
    font-size: 0.9em;
    border: 1px solid #ccc;
    background-color: #444;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.controls #mode-btn:hover,
.controls #help-btn:hover {
    background-color: #666;
}

.controls #mode-state {
    flex: 1; /* Expand to fill space between buttons */
    text-align: center; /* Center-align text */
    color: white;
    font-size: 1em;
    padding: 0 10px;
}

.info {
    text-align: left; /* Align all text to the left */
    padding: 10px;
    background: #333;
    border-radius: 8px;
}

.info p {
    margin: 3px 0; /* Reduce vertical spacing */
    line-height: 1.2; /* Compact line height */
}

#mode-btn {
    pointer-events: auto; /* Allow this element to receive pointer events */
    position: relative; /* Ensure it appears above absolute elements */
    z-index: 10; /* Bring it above the pointers */
}

#copyright {
    /* position: fixed;
    bottom: 10px; */
    margin-top: 30px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 12px;
  }
