/* =========================================================
   VIDEOS PAGE
   YouTube-style public video listing
   ========================================================= */

.videos-page {
    padding-top: 10px;
    padding-bottom: 60px;
}

/* ---------------------------------------------------------
   VIDEO GRID
   --------------------------------------------------------- */

.videos-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 22px;
    row-gap: 36px;
}

/* ---------------------------------------------------------
   VIDEO ITEM
   No outer card / no border
   --------------------------------------------------------- */

.video-card {
    position: relative;
    min-width: 0;
    background: transparent;
    border-radius: 12px;
    transition:
            background 0.2s ease,
            box-shadow 0.2s ease,
            transform 0.2s ease;
}

.video-card:hover {
    background: #eef3ff;
    box-shadow: 0 0 0 3px #eef3ff;
    transform: translateY(-2px);
}

/* ---------------------------------------------------------
   THUMBNAIL
   --------------------------------------------------------- */

.video-thumbnail {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;

    overflow: hidden;
    border-radius: 10px;

    background: #e9e9e9;

    text-decoration: none;
}

/*
 * Apply the radius directly to the image as well.
 * This guarantees that the image itself follows
 * the rounded thumbnail frame.
 */
.video-thumbnail img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    border-radius: 10px;

    transition: transform 0.25s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.04);
}

/* ---------------------------------------------------------
   PLAY BUTTON
   --------------------------------------------------------- */

.video-play-button {
    position: absolute;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    width: 48px;
    height: 48px;

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

    border-radius: 50%;

    background: #e50914;
    color: #fff;

    font-size: 17px;
    line-height: 1;

    opacity: 0.96;

    transition:
            transform 0.2s ease,
            background 0.2s ease;
}

.video-card:hover .video-play-button {
    transform: translate(-50%, -50%) scale(1.08);
    background: #e50914;
}

/* ---------------------------------------------------------
   DURATION
   --------------------------------------------------------- */

.video-duration {
    position: absolute;

    right: 8px;
    bottom: 8px;

    padding: 4px 6px;

    border-radius: 4px;

    background: rgba(0, 0, 0, 0.86);
    color: #fff;

    font-family: Arial, sans-serif;
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
}

/* ---------------------------------------------------------
   VIDEO INFORMATION
   --------------------------------------------------------- */

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

/* ---------------------------------------------------------
   TITLE
   --------------------------------------------------------- */

.video-title {
    margin: 0 0 6px;

    /*
     * YouTube uses a clean sans-serif visual hierarchy
     * for video titles.
     */
    font-family: var(--sans, Arial, sans-serif);

    font-size: 16px;
    line-height: 1.35;
    font-weight: 600;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.video-title a {
    color: var(--dark);
    text-decoration: none;
}

.video-title a:hover {
    color: var(--accent);
}

/* ---------------------------------------------------------
   VIDEO METADATA
   --------------------------------------------------------- */

.video-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 3px;

    color: var(--muted);

    font-family: var(--sans, Arial, sans-serif);
    font-size: 12px;
    line-height: 1.5;
}

.video-meta-separator {
    color: var(--muted);
    margin: 0 1px;
}

.video-category {
    font-weight: 500;
    color: var(--mid);
}

/* ---------------------------------------------------------
   EMPTY STATE
   --------------------------------------------------------- */

.videos-empty {
    text-align: center;
    padding: 70px 0;
    color: var(--muted);
}

/* ---------------------------------------------------------
   PAGINATION
   --------------------------------------------------------- */

.videos-pagination {
    margin-top: 50px;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

    .videos-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 20px;
        row-gap: 32px;
    }

}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .videos-page {
        padding-bottom: 40px;
    }

    .videos-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .video-thumbnail,
    .video-thumbnail img {
        border-radius: 9px;
    }

    .video-title {
        font-size: 16px;
    }

    .video-info {
        padding-top: 9px;
    }

}

/* =========================================================
   VIDEO DETAIL / WATCH PAGE
   YouTube-style video viewing layout
   ========================================================= */

.video-watch-page {
    padding-top: 30px;
    padding-bottom: 40px;
}

/* ---------------------------------------------------------
   WATCH LAYOUT
   --------------------------------------------------------- */

.video-watch-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
    align-items: start;
}

/* ---------------------------------------------------------
   MAIN VIDEO AREA
   --------------------------------------------------------- */

.video-watch-main {
    min-width: 0;
}

.video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;

    overflow: hidden;
    border-radius: 10px;

    background: #000;

    margin-bottom: 18px;
}

.video-player iframe {
    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    border: 0;
}

/* ---------------------------------------------------------
   VIDEO TITLE
   --------------------------------------------------------- */

.video-watch-title {
    margin: 0 0 10px;

    font-family: var(--sans, Arial, sans-serif);
    font-size: 21px;
    line-height: 1.35;
    font-weight: 700;

    color: var(--dark);
}

/* ---------------------------------------------------------
   HOST / CHANNEL ROW
   --------------------------------------------------------- */

.video-channel-row {
    display: flex;
    align-items: center;
    gap: 11px;

    margin-bottom: 7px;
}

.video-channel-avatar {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

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

    border-radius: 50%;

    background: var(--dark);
    color: #fff;

    font-family: var(--sans, Arial, sans-serif);
    font-size: 15px;
    font-weight: 700;

    text-transform: uppercase;
}

.video-channel-info {
    min-width: 0;
}

.video-channel-name {
    font-family: var(--sans, Arial, sans-serif);
    font-size: 14px;
    line-height: 1.3;
    font-weight: 700;

    color: var(--dark);
}

.video-channel-label {
    margin-top: 2px;

    font-family: var(--sans, Arial, sans-serif);
    font-size: 11.5px;
    line-height: 1.3;

    color: var(--muted);
}

/* ---------------------------------------------------------
   WATCH METADATA
   --------------------------------------------------------- */

.video-watch-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;

    margin-bottom: 18px;
    margin-left: 49px;

    color: var(--muted);

    font-family: var(--sans, Arial, sans-serif);
    font-size: 13px;
    line-height: 1.5;
}

.video-watch-separator {
    color: #888;
}

/* ---------------------------------------------------------
   DESCRIPTION
   --------------------------------------------------------- */

.video-watch-description {
    padding: 14px 16px;

    border-radius: 8px;

    background: #f2f2f2;

    color: var(--dark);

    font-family: var(--sans, Arial, sans-serif);
    font-size: 14px;
    line-height: 1.65;

    margin-bottom: 20px;
}

.video-watch-description p {
    margin: 0;
}

/* ---------------------------------------------------------
   SHARE
   --------------------------------------------------------- */

.video-watch-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;

    padding-top: 16px;

    border-top: 1px solid var(--border);
}

.video-watch-share-label {
    margin-right: 3px;

    font-family: var(--sans, Arial, sans-serif);
    font-size: 13px;
    font-weight: 700;
    color: var(--mid);
}

.video-watch-share a {
    text-decoration: none;
}

/*
 * Share buttons are styled as compact action pills.
 * The background colors remain controlled by the HTML.
 */
.video-share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 34px;
    padding: 0 14px;

    border-radius: 18px;

    font-family: var(--sans, Arial, sans-serif);
    font-size: 12px;
    font-weight: 700;

    text-decoration: none;

    transition: opacity 0.2s ease;
}

.video-share-button:hover {
    opacity: 0.85;
}

/* ---------------------------------------------------------
   SIDEBAR
   --------------------------------------------------------- */

.video-watch-sidebar {
    min-width: 0;
}

.video-watch-sidebar-title {
    margin: 0 0 16px;

    font-family: var(--sans, Arial, sans-serif);
    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;

    color: var(--dark);
}

/* ---------------------------------------------------------
   RELATED VIDEO
   --------------------------------------------------------- */

.video-related-item {
    position: relative;

    display: grid;
    grid-template-columns: 168px minmax(0, 1fr);

    gap: 11px;

    margin-bottom: 18px;
    padding: 5px;

    border-radius: 10px;

    text-decoration: none;

    transition:
            background 0.2s ease,
            box-shadow 0.2s ease,
            transform 0.2s ease;
}

.video-related-item:hover {
    background: #eef3ff;
    box-shadow: 0 0 0 2px #eef3ff;
    transform: translateY(-1px);
}

.video-related-thumbnail {
    position: relative;

    width: 100%;
    aspect-ratio: 16 / 9;

    overflow: hidden;

    border-radius: 7px;

    background: #eee;
}

.video-related-thumbnail img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    border-radius: 7px;

    transition: transform 0.2s ease;
}

.video-related-item:hover .video-related-thumbnail img {
    transform: scale(1.05);
}

/* ---------------------------------------------------------
   RELATED VIDEO PLAY BUTTON
   --------------------------------------------------------- */

.video-related-play {
    position: absolute;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    width: 30px;
    height: 30px;

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

    border-radius: 50%;

    background: #e50914;
    color: #fff;

    font-size: 11px;
}

.video-related-item:hover .video-related-play {
    transform: translate(-50%, -50%) scale(1.06);
    background: #e50914;
}

.video-related-duration {
    position: absolute;

    right: 5px;
    bottom: 5px;

    padding: 3px 5px;

    border-radius: 3px;

    background: rgba(0, 0, 0, 0.85);
    color: #fff;

    font-size: 10px;
    font-weight: 700;
}

.video-related-title {
    margin: 0;

    font-family: var(--sans, Arial, sans-serif);
    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;

    color: var(--dark);

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.video-related-meta {
    margin-top: 5px;

    color: var(--muted);

    font-family: var(--sans, Arial, sans-serif);
    font-size: 11.5px;
    line-height: 1.4;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.video-related-item:hover .video-related-title {
    color: var(--accent);
}

/* ---------------------------------------------------------
   TOPIC SIDEBAR
   --------------------------------------------------------- */

.video-topics {
    margin-top: 28px;
    padding-top: 22px;

    border-top: 1px solid var(--border);
}

.video-topics-title {
    margin: 0 0 12px;

    font-family: var(--sans, Arial, sans-serif);
    font-size: 16px;
    font-weight: 700;
}

.video-topic-link {
    display: block;

    padding: 7px 0;

    color: var(--mid);

    font-size: 13px;
    text-decoration: none;
}

.video-topic-link:hover {
    color: var(--accent);
}

/* =========================================================
   VIDEO DETAIL TABLET
   ========================================================= */

@media (max-width: 1100px) {

    .video-watch-layout {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 22px;
    }

    .video-related-item {
        grid-template-columns: 115px minmax(0, 1fr);
    }

}

/* =========================================================
   VIDEO DETAIL MOBILE
   ========================================================= */

@media (max-width: 760px) {

    .video-watch-page {
        padding-top: 20px;
        padding-bottom: 45px;
    }

    .video-watch-layout {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .video-player {
        border-radius: 7px;
        margin-bottom: 15px;
    }

    .video-watch-title {
        font-size: 19px;
        margin-bottom: 9px;
    }

    .video-channel-row {
        gap: 10px;
        margin-bottom: 7px;
    }

    .video-channel-avatar {
        width: 36px;
        height: 36px;
        flex-basis: 36px;

        font-size: 14px;
    }

    .video-channel-name {
        font-size: 13.5px;
    }

    .video-channel-label {
        font-size: 11px;
    }

    /*
     * Desktop metadata is aligned under the channel information.
     * On mobile it should return to the normal left edge.
     */
    .video-watch-meta {
        margin-left: 0;
        margin-bottom: 16px;
    }

    .video-watch-description {
        padding: 15px;
    }

    .video-watch-share {
        padding-top: 14px;
    }

    .video-watch-sidebar {
        width: 100%;
    }

    .video-related-item {
        grid-template-columns: 150px minmax(0, 1fr);
    }

}
/* =========================================================
   HOMEPAGE VIDEOS
   YouTube-style homepage video cards
   ========================================================= */

.homepage-videos-section {
    width: 100%;
}

/* ---------------------------------------------------------
   GRID
   --------------------------------------------------------- */

.homepage-video-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 28px;

    width: 100%;
}

/* ---------------------------------------------------------
   VIDEO CARD
   No border
   No background card
   --------------------------------------------------------- */

.homepage-video-card {
    min-width: 0;

    margin: 0;
    padding: 0;

    border: 0;
    background: transparent;
}

/* ---------------------------------------------------------
   THUMBNAIL
   --------------------------------------------------------- */

.homepage-video-thumbnail {
    position: relative;

    display: block;

    width: 100%;
    aspect-ratio: 16 / 9;

    overflow: hidden;

    border-radius: 9px;

    background: #eee;

    text-decoration: none;
}

/* Image */

.homepage-video-thumbnail img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    border-radius: 9px;

    transition: transform 0.25s ease;
}

/* Subtle YouTube-like hover */

.homepage-video-card:hover
.homepage-video-thumbnail img {
    transform: scale(1.025);
}

/* ---------------------------------------------------------
   PLAY BUTTON
   --------------------------------------------------------- */

.homepage-video-play {
    position: absolute;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    width: 48px;
    height: 48px;

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

    border-radius: 50%;

    background: rgba(0, 0, 0, 0.70);

    color: #fff;

    font-size: 17px;
    line-height: 1;

    transition:
            transform 0.2s ease,
            background 0.2s ease;
}

.homepage-video-card:hover
.homepage-video-play {
    transform: translate(-50%, -50%) scale(1.06);

    background: rgba(0, 0, 0, 0.82);
}

/* ---------------------------------------------------------
   DURATION
   --------------------------------------------------------- */

.homepage-video-duration {
    position: absolute;

    right: 8px;
    bottom: 8px;

    padding: 4px 6px;

    border-radius: 4px;

    background: rgba(0, 0, 0, 0.86);

    color: #fff;

    font-family: Arial, sans-serif;
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
}

/* ---------------------------------------------------------
   INFORMATION
   --------------------------------------------------------- */

.homepage-video-info {
    padding-top: 10px;
}

/* ---------------------------------------------------------
   HOST
   --------------------------------------------------------- */

.homepage-video-host {
    margin-bottom: 4px;

    color: var(--muted);

    font-family: var(--sans, Arial, sans-serif);
    font-size: 12px;
    line-height: 1.4;
}

/* ---------------------------------------------------------
   TITLE
   --------------------------------------------------------- */

.homepage-video-title {
    margin: 0 0 5px;

    font-family: var(--sans, Arial, sans-serif);

    font-size: 16px;
    line-height: 1.35;
    font-weight: 600;
}

.homepage-video-title a {
    color: var(--dark);

    text-decoration: none;
}

.homepage-video-title a:hover {
    color: var(--accent);
}

/* ---------------------------------------------------------
   META
   --------------------------------------------------------- */

.homepage-video-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 3px;

    color: var(--muted);

    font-family: var(--sans, Arial, sans-serif);
    font-size: 12px;
    line-height: 1.5;
}

.homepage-video-separator {
    color: var(--muted);
    margin: 0 1px;
}

/* =========================================================
   HOMEPAGE VIDEOS — TABLET
   ========================================================= */

@media (max-width: 900px) {

    .homepage-video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 24px;
    }

}

/* =========================================================
   HOMEPAGE VIDEOS — MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .homepage-video-grid {
        grid-template-columns: 1fr;

        gap: 30px;
    }

    .homepage-video-thumbnail,
    .homepage-video-thumbnail img {
        border-radius: 8px;
    }

    .homepage-video-title {
        font-size: 16px;
    }

}

/* =========================================================
   HOMEPAGE VIDEOS
   YouTube-inspired video cards
   ========================================================= */

.video-home-grid {
    gap: 30px;
}

.video-home-card {
    position: relative;

    min-width: 0;

    border-radius: 12px;

    transition:
            background 0.2s ease,
            box-shadow 0.2s ease,
            transform 0.2s ease;
}

.video-home-card:hover {
    background: #eef3ff;
    box-shadow: 0 0 0 3px #eef3ff;
    transform: translateY(-2px);
}

.video-home-thumbnail {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 10px;
    background: #eee;
}

.video-home-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.video-home-card:hover .video-home-thumbnail img {
    transform: scale(1.04);
}

/* ---------------------------------------------------------
   PLAY BUTTON
   --------------------------------------------------------- */

.video-home-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 48px;
    height: 48px;

    border-radius: 50%;

    background: #e50914;
    color: #fff;

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

    font-size: 17px;
    line-height: 1;

    transition:
            transform 0.2s ease,
            background 0.2s ease;
}

.video-home-card:hover .video-home-play {
    transform: translate(-50%, -50%) scale(1.08);
    background: #e50914;
}

.video-home-duration {
    position: absolute;
    right: 7px;
    bottom: 7px;

    padding: 3px 6px;

    background: rgba(0, 0, 0, 0.85);
    color: #fff;

    border-radius: 3px;

    font-family: var(--sans, Arial, sans-serif);
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
}


/* Information below thumbnail */

.video-home-info {
    display: flex;
    align-items: flex-start;
    gap: 11px;

    padding-top: 12px;
}

.video-home-avatar {
    flex: 0 0 34px;

    width: 34px;
    height: 34px;

    border-radius: 50%;

    background: #222;
    color: #fff;

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

    font-family: var(--sans, Arial, sans-serif);
    font-size: 14px;
    font-weight: 700;
}

.video-home-text {
    min-width: 0;
    flex: 1;
}

.video-home-title {
    margin: 0;

    font-family: var(--sans, Arial, sans-serif);
    font-size: 16px;
    line-height: 1.35;
    font-weight: 700;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.video-home-title a {
    color: var(--dark);
    text-decoration: none;
}

.video-home-title a:hover {
    color: var(--primary, #3155b5);
}

.video-home-card:hover .video-home-title a {
    color: var(--primary, #3155b5);
}

.video-home-host {
    margin-top: 5px;

    font-family: var(--sans, Arial, sans-serif);
    font-size: 13px;
    line-height: 1.3;
    color: #666;
}

.video-home-meta {
    margin-top: 3px;

    display: flex;
    flex-wrap: wrap;
    gap: 4px;

    font-family: var(--sans, Arial, sans-serif);
    font-size: 13px;
    line-height: 1.3;
    color: #777;
}
/* =========================================================
   HOMEPAGE VIDEO CARD - FINAL POLISH
   ========================================================= */

.video-home-info {
    padding-top: 10px;
    gap: 10px;
}

.video-home-avatar {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    font-size: 13px;
}

.video-home-title {
    font-size: 15px;
    line-height: 1.35;
    font-weight: 700;
}

.video-home-host {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.3;
}

.video-home-meta {
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.3;
}

/* =========================================================
   HOMEPAGE VIDEOS - RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

    .video-home-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

}

@media (max-width: 600px) {

    .video-home-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .video-home-thumbnail {
        border-radius: 8px;
    }

    .video-home-play {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    .video-home-info {
        padding-top: 9px;
    }

}
/* =====================================================
   VIDEO FILTERS
===================================================== */

.videos-filters {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-bottom: 30px;
    padding: 0;
}

.videos-filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.videos-filter-group label {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.videos-filter-group select {
    min-width: 175px;
    padding: 9px 34px 9px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #222;
    font-size: 13px;
    cursor: pointer;
    outline: none;
}

.videos-filter-group select:focus {
    border-color: var(--navy);
}

@media (max-width: 700px) {

    .videos-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .videos-filter-group {
        justify-content: space-between;
    }

    .videos-filter-group select {
        min-width: 180px;
    }
}