﻿/* 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;
}

.header-video {
    width: 200px;
    height: auto;
    border-radius: 8px;
    max-width: 100%;
}

/* 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 {
    font-size: 1.4rem;
    color: #0b3d91;
    margin: 2rem auto;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    z-index: 999;
}

/* Optional: Add simple animation (if you want) */
@keyframes pulse {
    0% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.3;
    }
}

.loading-spinner {
    animation: pulse 1.5s infinite ease-in-out;
}

/* Style for clickable search history items */
.history-item {
    background-color: #0b3d91;
    color: white;
    padding: 0.5rem 1rem;
    margin: 0.3rem;
    border-radius: 20px;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    .history-item:hover {
        background-color: #072f6b;
    }

/* 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;
    }

    /* ✨ Mobile notification tweak: bigger size on small screens */
    .search-notification {
        font-size: 1.3rem;
        padding: 1rem 2rem;
    }
}

/* 404 Page Styles */
.error-page {
    text-align: center;
    padding: 2rem;
}

    .error-page h1 {
        font-size: 2.5rem;
        color: #d9534f;
        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%;
        }
}

/* ✨ NEW: Notification container and search notification styles */
#notification-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
    align-items: center;
    pointer-events: none;
}

.search-notification {
    background-color: #007bff; /* default blue */
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    font-size: 1.1rem;
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
    transition: opacity 0.5s ease, transform 0.5s ease, filter 0.3s ease; /* ✨ Now includes smooth hover fade */
    pointer-events: auto;
    position: relative;
}

    .search-notification:hover {
        filter: brightness(1.1);
        cursor: pointer;
    }

    /* Specific colours based on type */
    .search-notification.history {
        background-color: #007bff; /* blue for history */
    }

    .search-notification.favourite {
        background-color: #28a745; /* green for favourites */
    }

/* Responsive show-card for extra show details */
@media (max-width: 600px) {
    .show-card {
        width: 100% !important;
        padding: 1rem;
        box-sizing: border-box;
    }

        .show-card img {
            width: 100%;
            height: auto;
        }
}

/* Official link styling */
.official-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: #0b3d91;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}

    .official-link:hover {
        background-color: #072f6b;
    }

/* Layout for history cards (flex like favourites) */
#search-history {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

/* Responsive show cards (for details view and small screens) */
@media (max-width: 600px) {
    .show-card {
        width: 100% !important;
        padding: 1rem;
        box-sizing: border-box;
    }

        .show-card img {
            width: 100%;
            height: auto;
        }

        .show-card p {
            font-size: 1rem;
            word-wrap: break-word;
        }

        .show-card button,
        .show-card a {
            width: 100%;
            box-sizing: border-box;
        }
}

/* Max width for show cards on larger screens (better readability) */
.show-card {
    max-width: 500px;
    margin: 1rem auto;
}


