/* General body styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #fff;
    color: #000;
}

/* Header styles */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #0b3d91;
    color: white;
    padding: 1rem;
}

.header-videos {
    display: flex;
    gap: 1rem;
    align-items: center;
    overflow: hidden; /* Ensures videos don't overflow */
}

.header-video {
    width: 200px;
    height: auto;
    border-radius: 8px;
    max-width: 100%; /* Ensures responsiveness */
}

/* Branding styles */
.logo {
    height: 160px;
}

.branding {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-title {
    font-size: 2.16rem;
}

/* Navigation styles */
nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
}

    nav ul li {
        display: inline;
    }

        nav ul li button {
            color: white;
            background: none;
            border: none;
            font-size: 1rem;
            cursor: pointer;
        }

/* Main content styles */
main {
    padding: 2rem;
    text-align: center;
}

/* Search form styles */
#search-form {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

#search-input {
    width: 300px;
    padding: 0.5rem;
}

/* Results and favourites container */
#results,
#favourites {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

/* Show card styles */
.show-card {
    border: 1px solid #ccc;
    padding: 1rem;
    width: 200px;
    text-align: left;
    background-color: #f9f9f9;
}

    .show-card img {
        width: 100%;
    }

/* High Contrast Mode Styles */
.high-contrast {
    background-color: #000 !important;
    color: #fff !important;
}

    .high-contrast .site-title {
        color: #0ff !important;
    }

    .high-contrast nav ul li button {
        color: #0ff !important;
    }

    .high-contrast .show-card {
        background-color: #111 !important;
        color: #fff !important;
        border-color: #0ff !important;
    }

    .high-contrast .show-description {
        color: #fff !important;
    }

/* Active navigation button */
nav ul li button.active {
    background-color: yellow;
    color: black;
    font-weight: bold;
    text-decoration: underline;
}

/* Notification for adding to favourites */
.favourites-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1.2rem;
    z-index: 1000;
}

/* Dark Mode Styles */
.dark-mode {
    background-color: #121212;
    color: #ffffff;
}

    .dark-mode .site-title {
        color: #fff;
    }

    .dark-mode .show-card {
        background-color: #1e1e1e;
        color: #fff;
        border-color: #333;
    }

/* Loading Spinner */
.loading-spinner {
    font-size: 1.2rem;
    color: #0b3d91;
    margin: 1rem auto;
    z-index: 999; /* Ensures it's on top */
}

/* Responsive Layout */
@media (max-width: 600px) {
    header, .branding, nav ul {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    nav ul {
        padding-left: 0;
    }

    .logo {
        height: 100px;
    }

    #search-input {
        width: 100%;
    }

    .header-video {
        width: 80px;
        height: auto;
    }
}

/* 404 Page Styles */
.error-page {
    text-align: center;
    padding: 2rem;
}

    .error-page h1 {
        font-size: 2.5rem;
        color: #d9534f; /* red tone for emphasis */
        margin-bottom: 1rem;
    }

    .error-page p {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }

#search-form-404 {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

    #search-form-404 input {
        padding: 0.5rem;
        font-size: 1rem;
        width: 300px;
        max-width: 90%;
    }

    #search-form-404 button {
        padding: 0.5rem 1rem;
        font-size: 1rem;
        background-color: #0b3d91;
        color: white;
        border: none;
        cursor: pointer;
        border-radius: 5px;
    }

        #search-form-404 button:hover {
            background-color: #072f6b;
        }

/* Responsive tweaks for 404 */
@media (max-width: 600px) {
    .error-page h1 {
        font-size: 2rem;
    }

    .error-page p {
        font-size: 1rem;
    }

    #search-form-404 {
        flex-direction: column;
        align-items: center;
    }

        #search-form-404 input {
            width: 100%;
        }

        #search-form-404 button {
            width: 100%;
        }
}
