body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition:
        background-color 0.3s,
        color 0.3s;
}

:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --row-alt: #f9f9f9;
    --row-main: #ffffff;
    --header-bg: #e0e0e0;
    --title-row-bg: #c8dffb;
}

body.dark {
    --bg-color: #1e1e1e;
    --text-color: #f0f0f0;
    --row-alt: #2c2c2c;
    --row-main: #1e1e1e;
    --header-bg: #333333;
    --title-row-bg: #444c5e;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--header-bg);
    padding: 10px 20px;
    flex-wrap: wrap;
}

.header img {
    height: 40px;
}

.controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-toggle {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

select#dayFilter {
    padding: 6px;
    font-size: 14px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

thead tr {
    background-color: var(--title-row-bg);
}

thead th {
    font-size: 18px;
    padding: 12px;
    text-align: left;
}

tbody tr:nth-child(odd) {
    background-color: var(--row-main);
}

tbody tr:nth-child(even) {
    background-color: var(--row-alt);
}

tbody td {
    padding: 12px;
    font-size: 16px;
}

.status-Departed {
    background-color: #007bff;
    color: #fff;
}

.status-Closed {
    background-color: #6c757d;
    color: #fff;
}

.status-Completed {
    background-color: #6c757d;
    color: #fff;
}

.status-OnTime {
    background-color: #28a745;
    color: #fff;
}

.status-Delayed {
    background-color: #ffc107;
    color: #000;
}

.status-Cancelled {
    background-color: #dc3545;
    color: #fff;
    animation: blink 1s infinite;
}

.status-Landed {
    background-color:  skyblue;
    color: #000;
}

@keyframes blink {
    50% {
        opacity: 0.5;
    }
}

.dashboard-title {
    font-size: 28px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
}

.big-uppercase {
  font-size: 2.3rem;
  vertical-align: bottom;
}

/* Optional alternative row themes */
body.alt-theme-1 tbody tr:nth-child(even) {
    background-color: #eef6ff;
}

body.alt-theme-2 tbody tr:nth-child(even) {
    background-color: #fff7e6;
}

body.alt-theme-3 tbody tr:nth-child(even) {
    background-color: #e6ffe6;
}

/* ... existing styles ... */

#flightCards {
    display: none;
    padding: 10px;
}

.flight-card {
    border: 1px solid #ccc;
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 12px;
    background-color: var(--row-alt);
}

.flight-card.dark {
    background-color: #2c2c2c;
    color: #f0f0f0;
}

.flight-card h3 {
    margin: 0 0 6px 0;
}

.flight-card p {
    margin: 4px 0;
    font-size: 14px;
}

/* Responsive switch */
@media (max-width: 768px) {
    #flightTable {
        display: none;
    }

    #flightCards {
        display: block;
    }
}

/* Flight card styling */
#flightCards {
    display: none;
    padding: 10px;
}

.flight-card {
    border: 1px solid #ccc;
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 12px;
    background-color: var(--row-alt);
}

.flight-card.dark {
    background-color: #2c2c2c;
    color: #f0f0f0;
}

.flight-card h3 {
    margin: 0 0 6px 0;
    font-size: 20px;
}

.flight-card p {
    margin: 4px 0;
    font-size: 16px;
}

/* Responsive layout */
@media (max-width: 768px) {
    #flightTable {
        display: none;
    }

    #flightCards {
        display: block;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
    }

    .controls {
        order: -1;
        width: 100%;
        display: flex;
        justify-content: flex-end;
        gap: 8px;
        margin-bottom: 10px;
    }
}

/* TV view styling for list mode */
thead th,
tbody td {
    font-size: 20px;
    padding: 16px;
}

/* Header layout and large clock */
.header {
    display: flex;
    flex-direction: column;
    background-color: var(--header-bg);
    padding: 10px 20px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.header h1 {
    text-align: center;
    font-size: 32px;
    margin-top: 10px;
    margin-bottom: 0;
    width: 100%;
}

.controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Container scroll area */
#flightContainer {
    max-height: 80vh;
    overflow-y: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header {
        padding: 10px;
    }

    .header-top {
        flex-direction: row;
        justify-content: space-between;
    }

    .header h1 {
        font-size: 28px;
        margin-top: 8px;
    }

    select#dayFilter {
        font-size: 14px;
    }

    .icon-toggle {
        font-size: 20px;
    }
}

/* Header layout and large clock */
.header {
    display: flex;
    flex-direction: column;
    background-color: var(--header-bg);
    padding: 10px 20px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Flight container scrollable */
#flightContainer {
    max-height: 80vh;
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* Responsive adjustments */
@media (max-width: 768px) {

    #clock,
    #fullscreenToggle {
        display: none;
    }

    .header {
        padding: 10px;
    }

    .header-top {
        flex-direction: row;
        justify-content: space-between;
    }

    .header-left {
        display: flex;
        align-items: center;
    }

    .header h1 {
        font-size: 28px;
        margin-top: 8px;
    }

    select#dayFilter {
        font-size: 14px;
    }

    .icon-toggle {
        font-size: 20px;
    }
}

/* Optional alignment helpers */
.header.align-left h1 {
    text-align: left;
}

.header.align-center h1 {
    text-align: center;
}

.header.align-right h1 {
    text-align: right;
}

/* Adjust header layout for small screens */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .controls {
        width: 100%;
        justify-content: space-between;
        margin-top: 10px;
        flex-wrap: wrap;
    }

    .controls select,
    .controls button {
        margin-top: 5px;
    }

    #clock,
    #fullscreenToggle {
        display: none;
    }

    .header h1 {
        text-align: center;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .header-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
    }

    .header-left {
        flex: 1;
    }

    .controls {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 10px;
    }

    .header h1 {
        text-align: center;
        width: 100%;
        margin-top: 12px;
    }

    #clock,
    #fullscreenToggle {
        display: none;
    }

    .controls select,
    .controls button {
        font-size: 14px;
    }
}

/* Reset default image spacing and padding */
.header-left img {
    display: block;
    max-height: 60px;
    margin: 0;
    padding: 0;
}

.header {
    display: flex;
    flex-direction: column;
    background-color: var(--header-bg);
    padding: 12px 16px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .header {
        padding: 10px;
    }

    .header h1 {
        font-size: 24px;
    }

    .controls select,
    .controls button {
        font-size: 14px;
    }

    #clock,
    #fullscreenToggle {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: flex-start;
        gap: 8px;
    }

    .header-left img {
        max-width: 200px;
        height: auto;
    }

    .controls {
        flex-direction: row;
        justify-content: flex-end;
        gap: 8px;
        flex-wrap: wrap;
    }

    .controls select,
    .controls button {
        font-size: 14px;
        padding: 6px;
    }

    .header h1 {
        font-size: 22px;
        text-align: center;
        width: 100%;
        margin-top: 12px;
    }
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
}

.controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Restore fullscreen toggle visibility */
#fullscreenToggle {
    display: inline-block;
}

@media (max-width: 768px) {
    .header-top {
        flex-wrap: wrap;
    }

    .header-left {
        width: 100%;
        justify-content: flex-start;
    }

    .controls {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 6px;
    }

    #fullscreenToggle {
        display: none;
    }
}

.header {
    display: flex;
    flex-direction: column;
    background-color: var(--header-bg);
    padding: 12px 16px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
}

.header-top img {
    display: block;
    max-height: 56px;
    height: 56px;
    margin: 0;
    padding: 0;
}

.controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

/* Mobile refinements */
@media (max-width: 768px) {
    .header-top {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
    }

    .header-top img {
        max-width: 120px;
        height: auto;
    }

    .controls {
        justify-content: flex-end;
        gap: 8px;
    }

    #fullscreenToggle {
        display: none;
    }

    .header h1 {
        font-size: 22px;
        margin-top: 12px;
    }
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
}

.header-side-left img {
    max-height: 56px;
    height: auto;
    display: block;
}

.header-side-right .controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

/* Responsive layout adjustments */
@media (max-width: 768px) {
    .header-top {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 10px;
    }

    .header-side-left {
        flex: 1 1 auto;
    }

    .header-side-right {
        flex: 1 1 auto;
        display: flex;
        justify-content: flex-end;
    }

    .controls {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px;
    }

    #fullscreenToggle {
        display: none;
    }

    .header h1 {
        font-size: 22px;
        margin-top: 12px;
    }
}

.flight-card {
    background-color: var(--row-alt);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.2s ease;
}

.flight-card.dark {
    background-color: #2c2c2c;
    border-color: rgba(255, 255, 255, 0.05);
}

.flight-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-color);
}

.flight-card p {
    font-size: 15px;
    margin: 4px 0;
    color: var(--text-color);
}

.flight-card strong {
    color: var(--text-color);
}

.flight-card

/* Add spacing between title and card section */
#flightCards {
    padding-top: 12px;
}

/* Hero styling for From → To line */
.flight-card .hero-route {
    font-size: 18px;
    font-weight: 600;
    margin: 8px 0 10px 0;
    color: var(--text-color);
}

.flight-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
    /* more spacing below flight title */
    color: var(--text-color);
}

.flight-card .hero-route {
    font-size: 18px;
    font-weight: bold;
    margin: 8px 0;
    color: var(--text-color);
}

.flight-card p {
    font-size: 15px;
    margin: 4px 0;
    color: var(--text-color);
}

.flight-card

/* Reuse badge styling */
.status-Departed {
    background-color: #007bff;
    color: #fff;
}

.status-Closed {
    background-color: #6c757d;
    color: #fff;
}

.status-Completed {
    background-color: #6c757d;
    color: #fff;
}

.status-OnTime {
    background-color: #28a745;
    color: #fff;
}

.status-Delayed {
    background-color: #ffc107;
    color: #000;
}

.status-Cancelled {
    background-color: #dc3545;
    color: #fff;
    animation: blink 1s infinite;
}

.status-Landed {
    background-color:  skyblue;
    color: #000;
}

@keyframes blink {
    50% {
        opacity: 0.5;
    }
}

.flight-card {
    background-color: var(--row-alt);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.flight-card.dark {
    background-color: #2c2c2c;
    border-color: rgba(255, 255, 255, 0.05);
}

.flight-card .hero-route {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text-color);
    text-transform: uppercase;
}

.flight-card p {
    font-size: 15px;
    margin: 4px 0;
    color: var(--text-color);
}

.flight-card strong {
    color: var(--text-color);
}

.flight-card

/* Reuse existing status colors */
.status-Departed {
    background-color: #007bff;
    color: #fff;
}

.status-Closed {
    background-color: #6c757d;
    color: #fff;
}

.status-Completed {
    background-color: #6c757d;
    color: #fff;
}

.status-OnTime {
    background-color: #28a745;
    color: #fff;
}

.status-Delayed {
    background-color: #ffc107;
    color: #000;
}

.status-Cancelled {
    background-color: #dc3545;
    color: #fff;
    animation: blink 1s infinite;
}

.status-Landed {
    background-color: skyblue;
    color: #000;
}

@keyframes blink {
    50% {
        opacity: 0.5;
    }
}

@media (max-width: 768px) {}

/* Light mode styles */
body:not(.dark) {
    --header-bg: #fdfaf5;
    --row-alt: #fdfaf5;
    --title-row-bg: #e8d6bb;
}

body:not(.dark) .header {
    background-color: var(--header-bg);
}

body:not(.dark) .flight-card {
    background-color: var(--row-alt);
    border-color: #e8d6bb;
}

body:not(.dark) thead {
    background-color: var(--title-row-bg);
}

@media (max-width: 768px) {}

#clock {
    font-size: 56px;
    font-weight: bold;
    display: inline-block;
    line-height: 1;
    vertical-align: middle;
    margin-right: 12px;
}

@media (max-width: 768px) {
    #clock {
        display: none;
    }
}

.status-badge {
    padding: 6px 10px;
    border-radius: 10px;
    font-weight: bold;
    text-align: center;
    display: inline-block;
    min-width: 80px;
}

.status-badge.on-time {
    background-color: #4caf50;
    color: white;
}

.status-badge.delayed {
    background-color: #ff9800;
    color: white;
    animation: none;
    /* Remove blinking */
}

.status-badge.cancelled {
    background-color: #f44336;
    color: white;
}

.status-badge.completed {
    background-color: #9e9e9e;
    color: white;
}

.badge.departed {
    background-color: #007bff;
    color: white;
}

/* Mobile-only title styling */
@media (max-width: 768px) {
    .dashboard-title {
        display: none;
    }
    .dashboard-title-mobile {
        display: block;
        font-size: 24px;
        font-weight: bold;
        text-align: center;
        text-transform: uppercase;
        letter-spacing: 2px;
        margin: 10px 0;
    }
}

@media (min-width: 769px) {
    .dashboard-title-mobile {
        display: none;
    }
}
