#footer {
    padding: 0 10px;
    background-color: #000;
    color: white;
    flex-shrink: 0;
    position: relative;
    display: grid;
    grid-template-columns: 30% 40% 30%;
    align-items: center;
    height: 40px;
}

.footer-column {
    display: flex;
    align-items: center;
    height: 100%; /* Ensure full height for positioning */
    position: relative; /* This is the anchor for the divider line */
}
.footer-column:nth-child(2) {
    justify-content: center;
}
.footer-column:nth-child(3) {
    justify-content: flex-end;
}

#gameStatusHUD {
    font-size: 13px;
    color: #cfeccf;
    padding-left: 10px;
    margin-left: 8px;
    border-left: 1px solid rgba(255,255,255,0.04);
    align-self: center;
}

/* --- Horizontal Line Above Footer --- */
#footer::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    animation: pulse-glow 5s ease-in-out infinite;
    z-index: 5;
}

/* --- Vertical Divider Lines --- */
/* This rule attaches a glowing line to the right side of the first and second columns */
.footer-column:nth-child(1)::after,
.footer-column:nth-child(2)::after {
    content: '';
    position: absolute;
    top: 15%;
    right: -1.5px; /* Centers the 2px line on the column boundary */
    height: 70%;
    width: 3px;
    animation: pulse-glow 5s ease-in-out infinite;
    z-index: 5;
}


#header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    background-color: #000;
    color: white;
    position: relative;
    border: none;
    height: 40px;
}

/* --- Horizontal Line Below Header --- */
#header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    animation: pulse-glow 5s ease-in-out infinite;
    z-index: 5;
}


/* Defines the three columns */
.header-left {
    width: 20%;
    display: flex;
    justify-content: center;
}
.header-center {
    flex-grow: 1;
    text-align: center;
}
.header-right {
    width: 20%;
    display: flex;
    justify-content: flex-end;
}

/* Style for the logo */
#gameLogo {
    height: 35px;
    width: auto;
}

#headerClock {
    grid-column: 2 / 3;
    justify-self: center;
    color: #90EE90;
    padding: 0 20px;
}

/* --- Header Link and Options Popup styles --- */
.header-title {
    flex-grow: 1;
}

.header-links {
    display: flex;
    gap: 15px;
}

.header-link {
    height: 30px;
    padding: 0 25px;
    background-image: url('../assets/images/PNG/Button03.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background-color: transparent;
}

.header-link:hover {
    background-image: url('../assets/images/PNG/Button04.png');
}

.header-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
}

.header-controls .speed-buttons {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.speed-btn {
    padding: 4px 8px;
    font-size: 13px;
    min-width: 42px;
    text-align: center;
    border-radius: 4px;
    opacity: 0.95;
    transition: transform 120ms ease, box-shadow 180ms ease, background 160ms ease, color 120ms ease;
}

.speed-btn.active {
    background: linear-gradient(180deg, rgba(34,139,34,0.22), rgba(0,100,0,0.18));
    color: #eaffea;
    border: 1px solid rgba(144,238,144,0.45);
    box-shadow: 0 8px 22px rgba(0,160,80,0.14), 0 0 10px rgba(144,238,144,0.18) inset;
    transform: translateY(-2px) scale(1.06);
    font-weight: 700;
    text-shadow: 0 1px 0 rgba(0,0,0,0.45);
}

/* keep header-link look but slightly smaller for these controls */
.header-controls .header-link {
    padding: 4px 10px;
    font-size: 13px;
}

/* tweak responsiveness */
@media (max-width: 700px) {
    .header-controls { display: none; } /* hide controls on very small screens */
}