body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    background-color: #f0f3f4; /* Slightly lighter, cooler background */
    color: #333;
    padding: 0 20px;
    line-height: 1.6;
}

h1 {
    font-size: 24px;
    margin: 0;
    padding: 0 20px;
}

@media (max-width: 768px) {
    h1 {
        padding: 0 10px;
    }
}

header {
    /* Subtle Gradient from Red to Darker Red */
    background: linear-gradient(to right, #e52d27, #b31217);
    color: white;
    padding: 15px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Stronger shadow */
    border-radius: 8px;
    margin-bottom: 20px;
    margin-top: 20px;
    overflow: hidden;
}

.header-content {
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 0 20px;
    flex-wrap: nowrap;
}

.logo {
    margin: 0;
    font-size: 1.8em;
    letter-spacing: -0.5px;
    flex-shrink: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    font-weight: bold;
    display: block;
    color: white;
}

/* Ensure logo stays white when linked */
.header-content a {
    text-decoration: none;
}

a .logo {
    color: white;
}

.search-bar-container {
    background-color: transparent;
    padding: 0;
    box-shadow: none;
    position: static;
    z-index: auto;
    flex-grow: 1;
    max-width: 800px;
    margin: 0 20px;
}

.search-form-wrapper {
     max-width: 100%;
     margin: 0;
     position: relative;
}

#search-form {
    display: flex;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #ccc;
    background-color: white;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); /* Inner shadow for depth */
}

#search-input {
    flex-grow: 1;
    padding: 10px 15px;
    border: none;
    font-size: 1.1em;
    outline: none;
    color: #333;
}

#search-form button {
    padding: 10px 20px;
    background-color: #333;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

#search-form button:hover {
    background-color: #555;
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-top: none;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    z-index: 20;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    border-radius: 0 0 4px 4px;
}

.search-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-suggestions li {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    color: #333;
}

.search-suggestions li:last-child {
    border-bottom: none;
}

.search-suggestions li:hover {
    background-color: #f0f0f0;
}

header nav {
     flex-shrink: 0;
}

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

header nav ul li {
    margin-left: 25px;
}

header nav ul li:first-child {
     margin-left: 0;
}

header nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

header nav ul li a:hover {
    color: #ffcdd2;
}


.container {
    margin: 20px auto;
    padding: 0;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}

.sidebar {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); /* Slightly more prominent shadow */
    align-self: start;
}

.sidebar h2 {
    margin-top: 0;
    font-size: 1.3em;
    color: #e52d27;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.sidebar ul li {
    margin-bottom: 8px;
}

.sidebar ul li a {
    text-decoration: none;
    color: #555;
    display: block;
    padding: 5px 0;
    transition: color 0.3s ease, transform 0.1s ease; /* Add transform transition */
}

.sidebar ul li a:hover {
    color: #e52d27;
    font-weight: bold;
    transform: translateX(5px); /* Slight slide on hover */
}

.sidebar ul li a.active {
     color: #e52d27;
     font-weight: bold;
}

.sidebar .filters {
    margin-bottom: 15px;
}

.sidebar .filters label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    color: #555;
    cursor: pointer;
}

.sidebar .filters input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #e52d27;
}

.main-content-pane {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.main-content-pane > h2 {
    margin-top: 0;
    font-size: 1.3em;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.video-grid {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); /* Match sidebar shadow */
}

#videoContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.video-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Initial subtle shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; /* Add border-color transition */
    border: 1px solid transparent; /* Add a transparent border */
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* Stronger, lifted shadow */
    border-color: #e52d27; /* Highlight with border on hover */
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumbnail .video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: bold;
}

.video-info {
    padding: 10px 15px;
}

.video-title {
    margin: 0;
    font-size: 1.1em;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#pagination-controls {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-link {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #555;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    font-size: 1em;
    min-width: 30px;
    text-align: center;
}

.page-link:hover,
.page-link.active {
    background-color: #e52d27;
    color: white;
    border-color: #e52d27;
}

.about-section {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    margin: 30px 0;
}

.about-section h2 {
    color: #333;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.about-section p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.about-section ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.about-section ul li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.about-section ul li:before {
    content: "•";
    color: #e52d27;
    position: absolute;
    left: 0;
}

.about-section a {
    color: #e52d27;
    text-decoration: none;
    transition: color 0.3s ease;
}

.about-section a:hover {
    color: #b31217;
    text-decoration: underline;
}

.faq-section {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    margin: 30px 0;
}

.faq-section h2 {
    color: #333;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.faq-item {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-item h3 {
    color: #e52d27;
    margin: 0 0 10px 0;
    font-size: 1.2em;
    cursor: pointer;
}

.faq-item p {
    margin: 0;
    line-height: 1.6;
    color: #555;
    display: none;
}

.faq-item.active p {
    display: block;
}

.faq-item h3:after {
    content: "+";
    float: right;
    transition: transform 0.3s ease;
}

.faq-item.active h3:after {
    transform: rotate(45deg);
}

.disclaimer-section {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 20px;
    text-align: center;
    font-size: 0.75em;
    color: #666;
    line-height: 1.4;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.disclaimer-section p {
    margin: 10px 0;
}

.disclaimer-section a {
    color: #e52d27;
    text-decoration: none;
    padding: 2px 5px;
    transition: color 0.3s ease;
}

.disclaimer-section a:hover {
    color: #b31217;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .about-section,
    .faq-section {
        padding: 20px;
        margin: 20px 0;
    }

    .about-section h2,
    .faq-section h2 {
        font-size: 1.3em;
    }

    .faq-item h3 {
        font-size: 1.1em;
    }

    .disclaimer-section {
        margin: 15px 10px;
        padding: 10px;
        font-size: 0.7em;
    }
}

footer {
    /* Subtle Gradient matching header */
    background: linear-gradient(to right, #b31217, #e52d27);
    color: white;
    text-align: center;
    padding: 15px 0;
    margin-top: 30px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.3); /* Shadow above footer */
}

footer p {
    margin: 0;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    body {
        padding: 0 10px; /* Reduce padding on smaller screens */
    }

    .header-content {
        flex-direction: column;
        align-items: stretch;
        padding: 0 10px;
        gap: 15px;
    }

    .logo {
        font-size: 1.6em;
        text-align: center;
    }

    .search-bar-container {
        width: 100%;
        max-width: 100%;
        order: 2;
        margin: 0;
    }

    header nav {
        order: 3;
        width: 100%;
    }

    header nav ul {
        width: 100%;
        justify-content: space-around;
        background-color: rgba(255, 255, 255, 0.1);
        border-radius: 6px;
        padding: 10px 0;
        margin: 0;
        flex-wrap: nowrap;
    }

    header nav ul li {
        margin-left: 0;
        flex: 1;
        text-align: center;
    }

    header nav ul li a {
        display: block;
        padding: 8px 12px;
        border-radius: 4px;
        transition: background-color 0.3s ease, color 0.3s ease;
        font-size: 0.9em;
        white-space: nowrap;
    }

    header nav ul li a:hover {
        background-color: rgba(255, 255, 255, 0.2);
        color: white;
    }

    .container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .sidebar {
        order: 2;
    }

    .main-content-pane {
        order: 1;
    }

    #videoContainer {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); /* Adjust grid for smaller screens */
        gap: 10px; /* Reduced gap */
    }

    .video-card {
        border-radius: 6px; /* Slightly smaller border-radius */
    }
    .video-card:hover {
         transform: translateY(-3px); /* Less lift on hover */
         box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* Adjusted shadow */
    }

    .video-title {
        font-size: 0.9em; /* Reduce title size */
        margin: 8px 10px 4px 10px; /* Adjust margins */
    }

    .video-info {
         margin: 0 10px 8px 10px; /* Adjust margins */
    }

    .page-link {
        padding: 6px 10px;
        font-size: 0.9em;
    }
}
