/* Website design by Geek With Social Skills - https://www.geekwithsocialskills.com */

:root {
    --bg: #05070a;
    --panel: #101820;
    --panel2: #16212b;
    --blue: #00aaff;
    --green: #39ff88;
    --white: #f5f7fa;
    --grey: #9aa8b5;
    --border: #294150;
}

/* Global reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at -10% 0%, rgba(0,170,255,.14), transparent 32%),
        radial-gradient(circle at 115% -5%, rgba(57,255,136,.05), transparent 24%),
        var(--bg);
    color: var(--white);
    line-height: 1.6;
}

a {
    color: inherit;
}

a,
.btn,
.watch-link {
    transition: color 0.2s ease;
}

.video-card,
.featured-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a:focus-visible,
.btn:focus-visible,
.watch-link:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 3px;
}

/* Layout */
.site-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 18px;
}

/* =========================================
   Hero
========================================= */

.hero {
    border: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(16,24,32,.96), rgba(22,33,43,.92));
    border-radius: 18px;
    padding: 34px 26px;
    margin-bottom: 28px;
    box-shadow: 0 0 28px rgba(0,170,255,.12);
}

.kicker,
.featured-label,
.section-title {
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: .85rem;
    font-weight: bold;
}

.section-note {
    margin: 10px 0 0;
    color: var(--grey);
    font-size: .9rem;
    opacity: .75;
    font-style: italic;
}

.featured-label {
    display: inline-block;
    margin-bottom: 12px;
}

.section-title {
    margin: 0 0 16px;
}

h1 {
    margin: 8px 0 12px;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.05;
    color: var(--white);
}

.hero h1 {
    font-size: clamp(1.8rem, 4.5vw, 3.4rem);
    max-width: 28ch;
    text-wrap: balance;
}

h1 span {
    color: var(--blue);
}

.hero p {
    max-width: 100%;
    color: var(--grey);
    font-size: 1.08rem;
}

.quote {
    margin-top: 14px;
    font-style: italic;
    color: var(--grey);
    opacity: 0.85;
    letter-spacing: 0.5px;
}

/* =========================================
   Buttons
========================================= */

.button-row {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-block;
    padding: 11px 18px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: bold;
    border: 1px solid var(--border);
    color: var(--white);
    background: transparent;
}

.btn.active {
    background-color: #0077cc; /* #009cbd; */
    color: #fff;
}

.btn:hover {
    color: var(--green);
    border-color: var(--blue);
    box-shadow: 0 0 18px rgba(0,170,255,.18);
}

.btn.green {
    border-color: var(--green);
    background: rgba(57,255,136,.12);
}

/* =========================================
   Featured Newest Video
========================================= */

.featured-video {
    margin-bottom: 28px;
}

.featured-card,
.video-card {
    background: linear-gradient(180deg, var(--panel), var(--panel2));
    border: 1px solid var(--border);
    overflow: hidden;
}

.featured-card {
    display: grid;
    grid-template-columns: 2fr 1fr;
    border-radius: 18px;
    box-shadow: 0 0 28px rgba(57,255,136,.10);
}

.video-card {
    position: relative;
    border-radius: 16px;
    box-shadow: 0 0 18px rgba(0,0,0,.25);
}

.featured-card:hover,
.video-card:hover {
    transform: none;
    box-shadow:
        0 6px 18px rgba(0,0,0,.35),
        0 0 18px rgba(0,170,255,.18);
}

/* =========================================
   Lite YouTube Embed (Homepage Performance)
========================================= */

.featured-embed .lite-youtube {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: #000;
    cursor: pointer;
    overflow: hidden;
}

.featured-embed .lite-youtube img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-embed .lite-youtube .play-button {
    pointer-events: none;
}

.featured-embed .lite-youtube:hover .play-button,
.featured-embed .video-facade:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--blue);
    box-shadow:
        0 0 20px rgba(0,170,255,.6),
        0 0 40px rgba(0,170,255,.4);
}

/* =========================================
   Responsive Video Embeds
========================================= */

.featured-embed,
.video-embed {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    background: #000;
    aspect-ratio: auto;
}

.featured-embed iframe,
.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Video text */
.featured-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* was center */
    gap: 12px;
}

/* Video page player */
.video-page-player {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.video-page-player .featured-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    max-width: 900px;
    margin: 0 auto;
}

.video-page-player .featured-embed {
    order: 1;
}

.video-page-player .featured-info {
    order: 2;
    padding: 18px 24px;
}

.video-page-player ~ .about-channel {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.video-info {
    padding: 16px;
}

.featured-info .featured-video-title,
.video-info h3 {
    line-height: 1.35;
    margin: 0 0 8px;
}

.featured-info .featured-video-title {
    line-height: 1.2;
    margin: 0 0 12px;
    font-size: clamp(1.35rem, 3vw, 2rem);
}

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

.featured-info .featured-video-title a:hover {
    color: var(--green);
}

.date {
    color: var(--grey);
    font-size: .9rem;
}

.watch-link {
    display: inline-block;
    margin-top: 12px;
    color: var(--blue);
    font-weight: bold;
    text-decoration: none;
}

.watch-link:hover {
    color: var(--green);
}

/* =========================================
   Video Grid
========================================= */

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

/* =========================================
   About Section
========================================= */

.about-channel {
    margin-top: 36px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255,255,255,.04);
}

.about-channel h2 {
    margin: 0 0 12px;
    color: var(--white);
}

.about-channel p {
    color: var(--grey);
    margin: 0 0 12px;
}

.about-channel p:last-child {
    margin-bottom: 0;
}

/* Notices */
.notice {
    background: rgba(255,255,255,.06);
    border: 1px solid var(--border);
    padding: 18px;
    border-radius: 12px;
}

.notice + .featured-pages {
    margin-top: 1.25rem;
}

/* =========================================
   Footer
========================================= */

footer {
    margin-top: 8px;
    padding-top: 8px;
    /* border-top: 1px solid var(--border); */
    color: var(--grey);
    font-size: .95rem;
    text-align: center;
}

footer p:first-of-type {
    font-size: 0.95rem;
    font-weight: 500;
}

.content-note {
    font-size: 0.85rem;
    opacity: 0.75;
    line-height: 1.4;
}

footer p:last-of-type {
    font-size: 0.9rem;
}

footer a {
    color: var(--blue);
    text-decoration: none;
    font-weight: bold;
}

footer a:hover {
    color: var(--green);
    text-decoration: underline;
}

footer p {
    margin: 2px 0;
    line-height: 1.4;
}

footer .footer-pi {
    opacity: 0.4;
    margin-left: 0.35em;
    text-decoration: none;
    cursor: default; 
    transition: opacity 0.2s ease, color 0.2s ease, text-shadow 0.2s ease;
}

footer .footer-pi:hover {
    opacity: 1;
    color: var(--green);
    text-shadow: 0 0 6px rgba(57,255,136,0.6);
    text-decoration: none; /* ?? THIS is what you're missing */
}

/* Featured page links */
.featured-pages {
    margin-bottom: 28px;
}

.featured-page-links {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 0.5rem;
    grid-auto-flow: row;
    align-items: start;
}

.featured-page-links a,
.featured-page-link {
    display: block;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255,255,255,.04);
    color: var(--white);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
    line-height: 1.3;
}

.featured-page-links a:hover,
.featured-page-link:hover {
    color: var(--green);
    border-color: var(--blue);
    box-shadow: 0 0 18px rgba(0,170,255,.18);
}

.video-thumb {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
}

.video-thumb a {
    display: block;
    position: relative;
    z-index: 1;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    width: 70px;
    height: 50px;
    
    background: #ff0000;
    border-radius: 12px;

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

    box-shadow:
        0 0 15px rgba(0,0,0,.7),
        0 0 25px rgba(255,0,0,.4);

    pointer-events: none;
}

.play-button::before {
    content: '';
    display: block;
    margin-left: 3px;
    width: 0;
    height: 0;
    border-left: 14px solid #fff;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
}

.video-thumb:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--blue);
    box-shadow:
        0 0 20px rgba(0,170,255,.6),
        0 0 40px rgba(0,170,255,.4);
}

/* Safe click-layer fix */
.video-card {
    position: relative;
}

.video-info,
.featured-info {
    position: relative;
    z-index: 2;
}

.video-info h3,
.featured-info .featured-video-title {
    position: relative;
    z-index: 3;
}

.video-info h3 a,
.featured-info .featured-video-title a,
.watch-link {
    position: relative;
    z-index: 4;
    pointer-events: auto;
    cursor: pointer;
}

/* Tablet */
@media (max-width: 900px) {
    .featured-card {
        grid-template-columns: 1fr;
    }

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

    .featured-page-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile */
@media (max-width: 620px) {
    .site-wrap {
        padding: 22px 14px;
    }

    .hero {
        padding: 26px 20px;
    }

    .button-row {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

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

    .featured-info {
        padding: 20px;
    }

    .about-channel {
        padding: 18px;
    }

    .featured-page-links {
        grid-template-columns: 1fr;
    }

}

/* Reduce animation for users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
    a,
    .btn,
    .watch-link,
    .video-card,
    .featured-card,
    footer .footer-pi {
        transition: none;
    }

    .featured-card:hover,
    .video-card:hover {
        transform: none;
    }
}

/* Final fix for video title links */
.video-card {
    display: flex;
    flex-direction: column;
}

.video-thumb {
    flex: 0 0 auto;
}

.video-info {
    flex: 1 1 auto;
    position: relative;
    z-index: 10;
    background: linear-gradient(180deg, var(--panel), var(--panel2));
}

.video-info h3 {
    position: relative;
    z-index: 20;
}

.video-info h3 a {
    display: block !important;
    position: relative !important;
    z-index: 30 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

.video-info h3 a:hover {
    color: var(--green) !important;
}

/* =========================================
   Site Search
========================================= */

.site-search {
    margin: 0 auto 28px;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.site-search-wide {
    max-width: none;
}

.site-search-narrow {
    max-width: 900px;
    margin: 0 auto 28px;
}

.site-search label {
    display: block;
    margin: 0 0 10px;
    color: var(--white);
    font-weight: 700;
    letter-spacing: 0.2px;
    font-size: 1rem;
}

.site-search-row {
    display: flex;
    gap: 10px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(16,24,32,.82), rgba(5,7,10,.72));
    box-shadow: 0 0 18px rgba(0,0,0,.18);
}

.site-search input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(5,7,10,.92);
    color: var(--white);
    font-size: 1rem;
}

.site-search input::placeholder {
    color: var(--grey);
}

.site-search input:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

.site-search button {
    padding: 12px 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255,255,255,.04);
    color: var(--white);
    font-weight: 700;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-search button:hover {
    color: var(--green);
    border-color: var(--blue);
    box-shadow: 0 0 14px rgba(0,170,255,.14);
}

@media (max-width: 620px) {
    .site-search-row {
        flex-direction: column;
    }

    .site-search button {
        width: 100%;
    }
}

/* About section link styling */
.about-channel p a {
    color: #00c2ff;
    text-decoration: none;
    font-weight: 500;
}

.about-channel p a:hover {
    color: #00ff9c;
    text-decoration: underline;
}

/* ================================
   Mobile Performance Tweaks
   (PageSpeed / Lighthouse focused)
================================ */
@media (max-width: 620px) {
    body {
        background:
            radial-gradient(circle at top left, rgba(0,170,255,.10), transparent 28%),
            var(--bg);
    }

    .hero,
    .featured-card,
    .video-card,
    .site-search-row,
    .search-pagination {
        box-shadow: none;
    }

    .hero {
        padding: 22px 18px;
        margin-bottom: 22px;
    }

    .hero p {
        font-size: 1rem;
        line-height: 1.55;
    }

    .featured-video,
    .featured-pages,
    .site-search {
        margin-bottom: 22px;
    }

    .featured-info {
        padding: 18px;
    }

    .video-grid {
        gap: 18px;
    }

    .play-button {
        width: 58px;
        height: 42px;
        border-radius: 10px;
    }
}
