* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #111;
    color: white;
}

header {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 15px 20px;
    background: rgb(0, 18, 29);
}

header a {
  color: #8c02cc;
  text-decoration: none;
  font-size: 24px;
  font-weight: bold;
  margin-left: 50px; /* default for desktop */
}

/* For mobile or smaller screens */
@media (max-width: 768px) {
  header a {
    margin-left: 0; /* override on mobile */
    /* display: block;    ensures auto margin works properly 
    text-align: center;  optional: centers the link */
  }
}


.site-logo {
    flex-shrink: 0;
    color: #8c02cc;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
}

main {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.filter-bar span {
    color: #aaa;
    margin-right: 5px;
}

.filter-bar a {
    padding: 8px 14px;
    border: 1px solid #333;
    border-radius: 6px;
    background: #1c1c1c;
    color: #aaa;
    text-decoration: none;
    font-size: 12px;
}

.filter-bar a:hover {
    color: white;
    border-color: #555;
}

.filter-bar a.active {
    background: #8c02cc;
    color: #111;
    border-color: #8c02cc;
    font-weight: bold;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.video-card {
    background: #1c1c1c;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #36b0d4;
    position: relative;
}

#index-hot {
    border: 2px solid #ec4850 !important;
}

.index-hot {
   background: #ec4850;
   color: white;
   padding: 2px 3px;
   border-radius: 4px;
   font-size: 12px;
  
}

.watch-hot {  
   background: #ec4850;
   color: white;
   font-weight: bold;
   padding: 5px 8px;
   border-radius: 4px;
   font-size: 12px;

}


.video-card a {
    color: white;
    text-decoration: none;
}

.video-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block; 
}

/**.video-card h2 {
    font-size: 16px;
    padding: 12px;
    margin: 0;
}***/

.watch-page {
    max-width: 900px;
}

.video-player {
    width: 100%;
    max-height: 80vh;
    background: black;
}

.post-information {
    margin-top: 20px;
    background: #1c1c1c;
    padding: 20px;
    border-radius: 8px;
}

/***INDEX CARDS***/

.index-info {
    padding: 5px 12px;
    margin: 0;
}

.index-info p {
    font-size: 18px;
    font-weight: bold;
    margin-top: 1px;
}

.index-category {
    padding: 2px 3px; border: 1px solid #2596be; border-radius: 5px; font-size: 12px;
}

.index-duration {
  position: absolute;
  right: 8px;          /* distance from left edge */
  bottom: 23px;        /* distance from bottom edge */
  background: rgba(0,0,0,0.6); /* semi-transparent background */
  color: #fff;        /* text color */
  padding: 4px 6px;   /* spacing around text */
  font-size: 0.7em;   /* adjust size */
  border-radius: 3px; /* optional rounded corners */
  z-index: 999;
}


/*PAGINATION*/
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin-top: 40px;
    padding: 20px 0;
}

.pagination a {
    color: #8c02cc;
    text-decoration: none;
    font-weight: bold;
}

.pagination a:hover {
    text-decoration: underline;
}

.pagination span {
    color: #aaa;
}

.pagination a.active {
    border-color: #8c02cc;
}

/*SEARCH FORM*/
.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.search-form input {
    flex: 1;
    min-width: 0;
    padding: 12px 15px;
    border: 1px solid #333;
    border-radius: 6px;
    background: #1c1c1c;
    color: white;
    font-size: 16px;
}

.search-form input::placeholder {
    color: #888;
}

.search-form button {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    background: #8c02cc;
    color: #111;
    font-weight: bold;
    cursor: pointer;
}

.search-form button:hover {
    opacity: 0.85;
}

.no-results {
    color: #aaa;
    padding: 30px 0;
}

/****HEADER & SEARCH BAR****/


.header-search {
    display: flex;
    flex: 1;
    max-width: 400px;
    gap: 8px;
}

.header-search input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid #333;
    border-radius: 6px;
    background: #111;
    color: white;
    font-size: 15px;
}

.header-search input::placeholder {
    color: #888;
}

.header-search button {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    background: #8c02cc;
    color: #111;
    font-weight: bold;
    cursor: pointer;
}

.header-search button:hover {
    opacity: 0.85;
}

@media (max-width: 600px) {

    header {
        flex-wrap: wrap;
        gap: 12px;
    }

    .header-search {
        order: 2;
        flex-basis: 100%;
        max-width: none;
    }

}


/*=====================FOOTER======================*/
footer {
  padding-top: 10px;
  position: flex;       /* keeps it anchored to the viewport */
  bottom: 8px;           /* 8px from the bottom */
  width: 100%;           /* span across the screen */
  text-align: center;    /* center the text (optional) */
  font-size: 0.8em;      /* text size */
  color: rgba(255, 255, 255, 0.322);       /* text color */
}


/*****RECOMMENDATION*****/
.related-section {
    margin-top: 40px;
}

.related-section > h2 {
    margin-bottom: 20px;
}


/* Recommended feed on watch pages */
.related-feed-section {
    width: 100%;
    max-width: 760px;
    margin: 32px auto;
}

.related-feed-section .feed-list {
    width: 100%;
}

.related-feed-section .feed-post {
    width: 100%;
}


/*=======================
NEW UI IN WATCH PAGE
=======================*/

        .watch-page {
            max-width: 1200px;
            margin: 0 auto;
            padding: 25px 16px 60px;
        }


        /* =========================
           VIDEO
        ========================= */

        .watch-player-wrapper {
            width: 100%;
            background: #000;
            border-radius: 14px;
            overflow: hidden;
            box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
        }

        .video-player {
            display: block;
            width: 100%;
            max-height: 680px;
            background: #000;
        }


        /* =========================
           TITLE
        ========================= */

        .watch-title {
            margin: 22px 0 8px;
            font-size: clamp(1.4rem, 3vw, 2rem);
            line-height: 1.25;
            font-weight: 700;
        }


        /* =========================
           META
        ========================= */

        .watch-meta {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 8px;
            margin-bottom: 18px;
            color: #888;
            font-size: 0.9rem;
        }

        .meta-item {
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }

        .meta-divider {
            opacity: 0.4;
        }


        /* =========================
           INFORMATION CARD
        ========================= */

        .watch-information {
            padding: 18px;
            border-radius: 12px;
            background: rgba(128, 128, 128, 0.08);
            margin-bottom: 35px;
        }

        .information-row {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            align-items: center;
            margin-bottom: 15px;
        }

        .information-row:last-child {
            margin-bottom: 0;
        }

        .information-label {
            font-size: 0.9rem;
            font-weight: 700;
            min-width: 85px;
        }


        /* =========================
           CLICKABLE CHIPS
        ========================= */

        .tag-list {
            display: flex;
            flex-wrap: wrap;
            gap: 7px;
        }

        .watch-chip {
            display: inline-flex;
            align-items: center;
            padding: 6px 11px;
            border-radius: 20px;
            background: rgba(0, 255, 136, 0.08);
            border: 1px solid rgba(0, 255, 136, 0.18);
            color: inherit;
            text-decoration: none;
            font-size: 0.85rem;
            transition: 0.2s ease;
        }

        .watch-chip:hover {
            background: #8c02cc;
            color: #000;
            border-color: #8c02cc;
            transform: translateY(-1px);
        }

        .tag-chip {
            background: rgba(14, 158, 201, 0.08);
            border-color: rgba(14, 158, 201, 0.2);
        }

        .tag-chip:hover {
            background: #0e9ec9;
            color: #fff;
            border-color: #0e9ec9;
        }


        /* =========================
           RELATED
        ========================= */

        .related-section {
            margin-top: 45px;
        }

        .related-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 18px;
        }

        .related-header h2 {
            margin: 0;
            font-size: 1.35rem;
        }

        .related-header span {
            color: #888;
            font-size: 0.85rem;
        }


        /* =========================
           RELATED CARD
        ========================= */

        .video-card {
            overflow: hidden;
            border-radius: 10px;
        }

        .video-card a {
            display: block;
            color: inherit;
            text-decoration: none;
        }

        .video-card img {
            display: block;
            width: 100%;
            aspect-ratio: 16 / 9;
            object-fit: cover;
            border-radius: 10px;
            transition: transform 0.25s ease;
            position: relative;
        }

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

        .video-card h3 {
            margin: 9px 2px 0;
            font-size: 0.95rem;
            line-height: 1.35;
        }


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

        @media (max-width: 600px) {

            .watch-page {
                padding: 12px 10px 45px;
            }

            .watch-player-wrapper {
                margin-left: -10px;
                width: calc(100% + 20px);
                border-radius: 0;
            }

            .watch-title {
                margin-top: 18px;
            }

            .watch-information {
                padding: 14px;
            }

            .information-label {
                width: 100%;
            }

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

            .video-card h3 {
                font-size: 0.85rem;
            }

        }


/* Age Verification */
.age-gate[hidden] {
    display: none !important;
}

.age-gate {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.97);
    color: #fff;
    font-family: Arial, sans-serif;
}

.age-card {
    width: 100%;
    max-width: 420px;
    padding: 35px 25px;
    text-align: center;
    background: #111;
    border: 1px solid #292929;
    border-radius: 16px;
    box-shadow: 0 15px 60px #000;
}

.age-logo {
    margin-bottom: 25px;
    font-size: 25px;
    font-weight: 900;
}

.age-logo span {
    color: #8c02cc;
}

.age-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin: 0 auto 20px;
    border: 2px solid #8c02cc;
    border-radius: 50%;
    color: #8c02cc;
    font-size: 25px;
    font-weight: bold;
}

.age-card h2 {
    margin: 0 0 15px;
    font-size: 26px;
}

.age-card p {
    color: #ccc;
    line-height: 1.6;
}

.age-card .age-warning {
    color: #8c02cc;
    font-weight: bold;
}

.age-enter,
.age-exit {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 14px;
    border-radius: 7px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

.age-enter {
    border: 0;
    background: #8c02cc;
    color: #000;
}

.age-exit {
    border: 1px solid #444;
    background: #222;
    color: #fff;
}

.age-card small {
    display: block;
    margin-top: 22px;
    color: #888;
    line-height: 1.5;
}



/* =========================================
   MXM DAILY - TWITTER/X STYLE HOMEPAGE FEED
   Scoped to homepage only
========================================= */

.home-feed {
    max-width: 760px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

/* Feed list */
.feed-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

/* Individual post */
.feed-post {
    position: relative;
    min-width: 0;
    padding: 18px 0 22px;
    border-bottom: 1px solid #30363d;
    background: transparent;
    color: #f5f5f5;
}

/* Highlight HOT posts subtly */
.feed-post-hot {
    border-left: 3px solid #ec4850;
    padding-left: 12px;
}

/* Publisher row */
.feed-publisher-row {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    margin-bottom: 12px;
}

/* Circular publisher avatar */
.feed-avatar {
    display: flex;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #173b48;
    border: 1px solid #24596b;
    color: #8c02cc;
    font-size: 19px;
    font-weight: 700;
    text-transform: uppercase;
    overflow: hidden;
}

/* Publisher name and date */
.feed-publisher-details {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}

.feed-publisher-name {
    color: #f5f5f5;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.feed-post-date {
    color: #8b949e;
    font-size: 12px;
    line-height: 1.3;
}

/* Optional HOT indicator in publisher row */
.feed-hot-indicator {
    flex: 0 0 auto;
    padding: 4px 7px;
    border-radius: 5px;
    background: #ec4850;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
}

/* Metadata row: HOT, part, hashtags */
.feed-post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin: 0 0 13px;
}

.feed-hot-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 7px;
    border-radius: 4px;
    background: #ec4850;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
}

.feed-part {
    display: inline-flex;
    align-items: center;
    padding: 4px 7px;
    border: 1px solid #343b43;
    border-radius: 4px;
    color: #c9d1d9;
    font-size: 12px;
    line-height: 1.2;
}

/* Hashtags */
.feed-hashtags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 10px;
    min-width: 0;
}

.feed-hashtag {
    color: #8c02cc;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* Thumbnail link */
.feed-thumbnail-link {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    color: inherit;
    text-decoration: none;
}

/* The thumbnail wrapper anchors the duration badge */
.feed-thumbnail-wrap {
    position: relative;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #30363d;
    border-radius: 10px;
    background: #080808;
    line-height: 0;
}

/*
 * Preserve each image's original aspect ratio.
 * Do not force 16:9 or crop portrait thumbnails.
 */
.feed-thumbnail {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    aspect-ratio: auto;
    object-fit: contain;
    border: 0;
    border-radius: 0;
    transition: opacity 0.2s ease;
}

.feed-thumbnail-link:hover .feed-thumbnail {
    opacity: 0.92;
}

/* Duration overlay: bottom-right corner */
.feed-duration {
    position: absolute;
    right: 9px;
    bottom: 9px;
    z-index: 2;
    display: inline-block;
    padding: 5px 7px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.82);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    pointer-events: none;
}

/* Title below the thumbnail */
.feed-post-title {
    display: block;
    margin-top: 11px;
    color: #f5f5f5;
    font-size: 16px;
    line-height: 1.45;
    font-weight: 700;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.feed-post-title:hover {
    color: #8c02cc;
}

/* Responsive layout */
@media (max-width: 600px) {
    .home-feed {
        padding: 14px 12px 30px;
    }

    .feed-post {
        padding-top: 15px;
        padding-bottom: 18px;
    }

    .feed-post-hot {
        padding-left: 9px;
    }

    .feed-avatar {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
        font-size: 17px;
    }

    .feed-publisher-name {
        font-size: 14px;
    }

    .feed-post-meta {
        gap: 7px;
        margin-bottom: 11px;
    }

    .feed-hashtag {
        font-size: 12px;
    }

    .feed-thumbnail-wrap {
        border-radius: 8px;
    }

    .feed-duration {
        right: 7px;
        bottom: 7px;
        font-size: 11px;
    }

    .feed-post-title {
        font-size: 15px;
    }
}

/*================== SIDEBAR ==================================*/

/* =========================================
   MXM DAILY HOMEPAGE LAYOUT
   ========================================= */

.home-layout {
    width: min(1240px, calc(100% - 32px));
    margin: 24px auto 40px;
    display: grid;
    grid-template-columns: minmax(0, 760px) minmax(250px, 300px);
    justify-content: center;
    align-items: stretch;
    gap: 28px;
}

.home-layout .home-feed {
    width: 100%;
    max-width: 760px;
    min-width: 0;
    margin: 0;
}


/* ========================================
   THUMBNAIL SHIMMER LOADING EFFECT
======================================== */

/* Thumbnail container */
.feed-thumbnail-wrap {
    position: relative;
    overflow: hidden;
    background: #181818;
    isolation: isolate;
}

/* Animated placeholder shown while loading */
.feed-thumbnail-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;

    background: linear-gradient(
        110deg,
        #181818 8%,
        #303030 18%,
        #454545 28%,
        #303030 38%,
        #181818 48%
    );

    background-size: 250% 100%;
    animation: thumbnail-shimmer 1.5s linear infinite;
}

/* Actual thumbnail */
.feed-thumbnail-wrap .feed-thumbnail {
    position: relative;
    z-index: 0;
    display: block;
    width: 100%;
    height: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Reveal the thumbnail after successful loading */
.feed-thumbnail-wrap.is-loaded .feed-thumbnail {
    opacity: 1;
}

/* Remove the shimmer after successful loading */
.feed-thumbnail-wrap.is-loaded::before {
    content: none;
}

/* Keep the duration above the image and placeholder */
.feed-thumbnail-wrap .feed-duration {
    z-index: 2;
}

/* Shimmer animation */
@keyframes thumbnail-shimmer {
    from {
        background-position: 100% 0;
    }

    to {
        background-position: -150% 0;
    }
}

/* Respect visitors' reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .feed-thumbnail-wrap::before {
        animation: none;
        background: #292929;
    }

    .feed-thumbnail-wrap .feed-thumbnail {
        transition: none;
    }
}


/* Sticky sidebar, bounded by the home-layout container */
.home-sidebar {
    min-width: 0;
    align-self: stretch;
    position: relative;
}

.sidebar-inner {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    padding: 0 5px 8px 0;
}

/* Sidebar cards */
.sidebar-widget {
    min-width: 0;
    margin-bottom: 16px;
    padding: 16px;
    background: #15191d;
    border: 1px solid #2b3238;
    border-radius: 12px;
}

.sidebar-widget h2 {
    margin: 0 0 14px;
    color: #f5f7f8;
    font-size: 15px;
    font-weight: 700;
}

/* Suggested tags */
.sidebar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sidebar-tag {
    display: inline-block;
    max-width: 100%;
    padding: 6px 10px;
    overflow-wrap: anywhere;
    color: #8c02cc;
    background: #102820;
    border: 1px solid #20563f;
    border-radius: 20px;
    font-size: 12px;
    text-decoration: none;
}

.sidebar-tag:hover {
    background: #194333;
}

/* Suggested models */
.sidebar-models {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-model {
    display: block;
    padding: 10px 8px;
    overflow-wrap: anywhere;
    color: #e1e7eb;
    border-radius: 7px;
    font-size: 13px;
    text-decoration: none;
}

.sidebar-model:hover {
    color: #8c02cc;
    background: #20272c;
}

.sidebar-empty {
    margin: 0;
    color: #89939b;
    font-size: 12px;
}

/* Advertisement placeholder */
.sidebar-ad-placeholder {
    min-height: 250px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: #89939b;
    background: #101316;
    border: 1px dashed #47515a;
    border-radius: 8px;
    text-align: center;
    font-size: 13px;
}

.sidebar-ad-placeholder small {
    font-size: 11px;
}

/* Mobile and tablet */
@media (max-width: 900px) {
    .home-layout {
        width: min(760px, calc(100% - 24px));
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .home-layout .home-feed {
        max-width: none;
    }

    .home-sidebar {
        align-self: auto;
    }

    .sidebar-inner {
        position: static;
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .sidebar-ad-placeholder {
        min-height: 180px;
    }
}

