* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: linear-gradient(135deg,
            #07111d,
            #0b1d2e);
    color: #e8eef5;
    font-family: Arial, sans-serif;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-bg);
    color: var(--header-fg);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    backdrop-filter: saturate(115%) blur(6px);
}

.site-header .nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 64px;
    padding: 8px var(--space-4) 12px;
    max-width: none;
    width: 100%;
    padding-left: 95px;
    padding-right: 30px;
    box-sizing: border-box;
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: clamp(1.1rem, 2.2vw, 1.6rem);
    color: inherit;
    text-decoration: none;
    transform: translateY(15px);
}

.nav .nav-links a {
    color: rgba(255, 255, 255, .9);
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 8px;
}

.nav .nav-links a:hover {
    text-decoration: underline;
    background: rgba(255, 255, 255, .08);
}

.nav .nav-links a[aria-current="page"] {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
}

.app {
    min-height: 100vh;
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
}

.sidebar {
    width: 240px;
    flex-shrink: 0;
    padding: 24px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-logo {
    width: 140px;
    height: 85px;
    margin: 10px auto 0;
    border-radius: 14%;
    background: linear-gradient(135deg, #173a59, #3498db);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    color: white;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
    cursor: default;
    padding-left: 8px;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.brand {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 32px;
    color: #eef4fa;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #4a9bd8;
}

.search-box {
    width: 100%;
    max-width: 500px;
    padding: 12px 16px 12px 44px;
    background: #172b42;
    color: #e8eef5;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.search-box:focus {
    outline: none;
    border-color: #4a9bd8;
    box-shadow: 0 0 0 3px rgba(74, 155, 216, 0.15);
    transform: scale(1.01);
}

.search-box::placeholder {
    color: #8196ab;
}

.search-wrapper {
    position: relative;
    width: 100%;
    flex: 1;
    max-width: 680px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    color: #8196ab;
    font-size: 22px;
    pointer-events: none;
}

.main-content {
    flex: 1;
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.top-bar {
    height: 70px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.gallery-title {
    margin: 0;
    white-space: nowrap;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 0.8px;
    padding: 10px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, #173a59, #3498db);
    border: 1px solid rgba(255, 255, 255, 0.18);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.35),
        inset 0 2px 2px rgba(255, 255, 255, 0.18),
        inset 0 -3px 6px rgba(0, 0, 0, 0.35);
}

.featured-video {
    height: 360px;
    display: flex;
    align-items: flex-end;
    padding: 32px;
    background: linear-gradient(135deg,
            #173a59,
            #0d2236);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(220, 230, 240, 0.12);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
    position: relative;
}

.featured-video::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to right,
            rgba(7, 17, 29, 0.15),
            rgba(7, 17, 29, 0.55));
    pointer-events: none;
}

.featured-info {
    max-width: 520px;
    position: relative;
    z-index: 1;
}

.featured-label {
    color: #6bb6e8;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 2px;
    margin: 0 0 8px;
}

.featured-info h1 {
    font-size: 36px;
    margin: 0 0 10px;
}

.featured-info p {
    margin-top: 0;
}

.featured-play {
    margin-top: 16px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: #e8eef5;
    color: #102033;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.featured-play:hover {
    transform: translateY(-2px);
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 24px;
    row-gap: 32px;
}

.no-results {
    display: none;
    text-align: center;
    margin-top: 40px;
    color: #aeb8c4;
    font-size: 18px;
}

.video-thumbnail {
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    background: linear-gradient(135deg,
            #1b3550,
            #244f70);
    transition: filter 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.video-thumbnail:focus-visible {
    outline: 2px solid white;
    outline-offset: 4px;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.duration {
    position: absolute;
    right: 8px;
    bottom: 8px;

    padding: 3px 6px;
    border-radius: 5px;

    background: rgba(0, 0, 0, 0.72);
    color: #ffffff;
    font-size: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.play-button {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: transform 0.2s, background 0.2s;
    padding-top: 2px;
    padding-left: 3px;
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.video-card:hover .video-thumbnail {
    filter: brightness(1.15);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.video-card h2 {
    font-size: 18px;
    margin: 12px 0 6px;
    transition: color 0.2s;
}

.video-card p {
    font-size: 14px;
    color: #9eafc2;
    margin: 0;
    letter-spacing: 0.2px;
}

.video-card {
    transition: transform 0.2s;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-4px);
}

.video-card:hover .play-button {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.25);
}

.video-card:hover h2 {
    color: #6bb6e8;
}

.video-count {
    font-size: 13px;
    color: #8196ab;
    font-weight: 400;
}

.section-title {
    font-size: 22px;
    margin: 0 0 16px;
    color: #dce5ef;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-details {
    display: flex;
    align-items: center;
    gap: 16px;
}

.view-all {
    color: #4a9bd8;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.view-all:hover {
    color: #ffffff;
}

.view-arrow {
    display: inline-block;
    transition: transform 0.2s;
}

.view-all:hover .view-arrow {
    transform: translateX(4px);
}

.video-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: modalFadeIn 0.5s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-video {
    width: 100%;
    border-radius: 14px;
}

.watch-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
}

.watch-progress-bar {
    height: 100%;
    width: 0%;
    background: red;
}

.modal-close {
    position: absolute;
    top: 0;
    right: -65px;

    width: 44px;
    height: 44px;

    background: linear-gradient(135deg, #0d243d, #1a4670);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;

    color: white;
    font-size: 26px;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.55),
        inset 0 2px 2px rgba(255, 255, 255, 0.18),
        inset 0 -3px 6px rgba(0, 0, 0, 0.45);

    transition: all 0.2s ease;
}

.modal-close:hover {
    transform: scale(1.08);
    filter: brightness(1.25);

    box-shadow:
        0 10px 20px rgba(0, 0, 0, 0.60),
        0 0 0 2px rgba(255, 255, 255, 0.15),
        inset 0 2px 2px rgba(255, 255, 255, 0.28),
        inset 0 -3px 6px rgba(0, 0, 0, 0.45);
}

.modal-content {
    width: 80%;
    max-width: 1000px;
    position: relative;
    animation: modalGrowIn 0.5s ease;
}

@keyframes modalGrowIn {
    from {
        transform: scale(0.8);
    }

    to {
        transform: scale(1);
    }
}

@keyframes modalShrinkOut {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(0.01);
    }
}

@media (max-width: 1000px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .video-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 90%;
    }

    .modal-close {
        right: 0px;
        top: -55px;
    }
}