:root {
    --bg-color: #FFF8E1;
    /* Light Amber */
    --nav-bg: #FF9800;
    /* Orange */
    --card-bg: #FFFFFF;
    --text-color: #3E2723;
    /* Dark Brown for readability */
    --accent-color: #E65100;
    /* Deep Orange */
    --card-width: 250px;
    --card-aspect-ratio: 16/9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    background-color: var(--nav-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo {
    color: #FFFFFF;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    max-width: 60%;
}

.search-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 5px 15px;
    border-radius: 4px;
}

.search-container input {
    background: transparent;
    border: none;
    color: #333;
    padding: 5px;
    width: 200px;
    outline: none;
}

.search-icon {
    font-size: 1rem;
    opacity: 0.7;
    color: #333;
}

.nav-links {
    display: flex;
    gap: 20px;
    margin: 0 40px;
}

.nav-btn {
    background: transparent;
    border: none;
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.3s, transform 0.2s;
    padding: 10px 0;
    position: relative;
}

.nav-btn:hover,
.nav-btn.active {
    opacity: 1;
}

.nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #FFFFFF;
}

.hero {
    padding: 120px 4% 40px;
    background: linear-gradient(rgba(255, 152, 0, 0.1), var(--bg-color));
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-text {
    flex: 1;
    text-align: center;
}

.hero-image {
    width: 200px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.hero-image:hover {
    transform: scale(1.05);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.hero p {
    font-size: 1.2rem;
    color: #5D4037;
    line-height: 1.6;
    margin-bottom: 15px;
}

.hero p:last-child {
    margin-bottom: 0;
}

main {
    padding-top: 20px;
    padding-bottom: 50px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 0 4%;
}

.video-card {
    min-width: var(--card-width);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s;
    background-color: var(--card-bg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.video-card:hover {
    transform: translateY(-5px);
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.video-thumb-container {
    width: 100%;
    aspect-ratio: var(--card-aspect-ratio);
    overflow: hidden;
}

.video-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-info {
    padding: 15px 12px;
    background: var(--card-bg);
    flex-grow: 1;
}

.video-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

#no-results {
    text-align: center;
    padding: 50px;
    font-size: 1.2rem;
    color: #A1887F;
}

.hidden {
    display: none;
}

footer {
    padding: 40px 4%;
    color: #A1887F;
    background-color: #FFF3E0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-author-pic {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--nav-bg);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.footer-info {
    text-align: left;
}

.footer-info p {
    margin: 5px 0;
}

.footer-info a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.footer-info a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-info {
        text-align: center;
    }
}

@media (max-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    :root {
        --card-width: 100%;
    }

    .navbar {
        height: auto;
        padding: 12px 4%;
        flex-wrap: wrap;
        row-gap: 12px;
    }

    .logo {
        font-size: 1.1rem;
        flex: 1;
        white-space: nowrap;
    }

    .search-container {
        flex: 0 0 150px;
        margin-left: 10px;
    }

    .search-container input {
        width: 110px;
    }

    .nav-links {
        display: flex;
        flex-basis: 100%;
        justify-content: center;
        margin: 0;
        gap: 25px;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        padding-top: 10px;
    }

    .nav-btn {
        font-size: 0.9rem;
        padding: 5px 0;
    }

    .hero {
        padding-top: 150px;
        padding-left: 5%;
        padding-right: 5%;
    }

    .hero-content {
        flex-direction: column;
        gap: 20px;
    }

    .hero-image {
        width: 150px;
        order: -1;
        /* Move images to top on mobile by default, or we can hide one */
    }

    .image-right {
        display: none;
        /* Hide one image on small mobile to save space */
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 0.9rem;
    }
}