/* Overwatch Theme Refinements */
:root {
    --ow-orange: #F99E1A;
    --ow-blue: #40B2ED;
    --ow-dark-grey: #12161A;
    --ow-light-grey: #AFB9C1;
    --ow-white: #FFFFFF;
    --ow-black: #000000;
    --ow-surface: #1E262E;
}

body {
    background-color: var(--ow-black) !important;
    color: var(--ow-white) !important;
    font-family: 'Gilroy', 'Segoe UI', Roboto, sans-serif !important;
}

/* Fix Leftover original colors (Blue/Pink) */
/* Main Content Area Unification */
.page-main.container,
.column-main-video,
.section,
.section.columns.is-centered {
    background-color: #0d1013 !important;
    /* Uniform Deep HUD Grey */
    padding: 20px !important;
}

.has-background-dark {
    background-color: var(--ow-black) !important;
}

.has-text-alt {
    color: var(--ow-blue) !important;
}

/* Navbar & Global UI */
.main-nav.navbar,
.navbar-links {
    background-color: var(--ow-black) !important;
    border-bottom: 4px solid var(--ow-orange) !important;
}

.navbar-links a:hover,
.navbar-links a.is-active {
    color: var(--ow-orange) !important;
    border-bottom: none !important;
}

/* Normalize Headings (H1 requested as normal font) */
h1 {
    font-family: 'Gilroy', sans-serif !important;
    font-weight: 800 !important;
    font-style: normal !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-size: 1.8rem !important;
    color: var(--ow-white) !important;
    background: none !important;
    -webkit-text-fill-color: initial !important;
    filter: none !important;
    margin-bottom: 1rem !important;
}

.sort-filter__title {
    font-family: 'Gilroy', sans-serif !important;
    font-weight: 800 !important;
    font-style: normal !important;
    font-size: 1.5rem !important;
    color: var(--ow-white) !important;
}

/* Page Layout */
.container,
.page-main.container {
    max-width: 96% !important;
    /* Ultra-wide */
    width: 96% !important;
    margin: 0 auto !important;
}

.page-main {
    padding-top: 20px !important;
}

.columns {
    display: flex !important;
    width: 100%;
}

.main-content-area {
    flex: 1 !important;
    min-width: 0;
    /* Prevent flex blowout */
}

.sidebar-main {
    width: 340px !important;
    min-width: 340px !important;
    padding-left: 30px !important;
}

@media screen and (max-width: 1024px) {
    .sidebar-main {
        display: none !important;
    }

    .page-main.container {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Video Grid Layout */
.video-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    /* Bigger thumbnails */
    gap: 30px !important;
    padding: 20px 0 !important;
    width: 100% !important;
}

/* Overwatch HUD Video Card */
.ow-video-card {
    background: #11151a !important;
    border: none !important;
    padding: 0 !important;
    position: relative;
    overflow: visible !important;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
}

/* The angled HUD frame effect */
.ow-video-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--ow-blue) 0%, transparent 40%, transparent 60%, var(--ow-blue) 100%);
    clip-path: polygon(25px 0, 100% 0, 100% calc(100% - 25px), calc(100% - 25px) 100%, 0 100%, 0 25px);
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

.ow-video-card:hover::before {
    background: linear-gradient(135deg, var(--ow-orange) 0%, transparent 40%, transparent 60%, var(--ow-orange) 100%);
    opacity: 0.8;
}

.ow-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    overflow: hidden;
    clip-path: polygon(25px 0, 100% 0, 100% calc(100% - 25px), calc(100% - 25px) 100%, 0 100%, 0 25px);
    background: #000;
    z-index: 1;
}

.video-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.5s ease;
}

.ow-video-card:hover .video-image {
    transform: scale(1.05);
}

.trailer {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.ow-card-media:hover .trailer {
    opacity: 1;
}

/* HUD Overlay Elements */
.ow-hud-stats {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    z-index: 3;
}

.ow-stat-pill {
    background: rgba(0, 0, 0, 0.82);
    border-left: 3px solid var(--ow-blue);
    color: #fff;
    padding: 3px 10px;
    font-size: 0.7rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    text-transform: uppercase;
    font-family: 'Gilroy', sans-serif;
}

.ow-stat-pill svg {
    margin-right: 5px;
    width: 12px;
    height: 12px;
    fill: var(--ow-blue);
}

.ow-video-card:hover .ow-stat-pill {
    border-color: var(--ow-orange);
}

.ow-video-card:hover .ow-stat-pill svg {
    fill: var(--ow-orange);
}

.ow-duration-pill {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: var(--ow-orange);
    color: #000;
    padding: 4px 12px;
    font-weight: 900;
    font-size: 0.8rem;
    clip-path: polygon(10% 0%, 100% 0%, 90% 100%, 0% 100%);
    z-index: 3;
}

/* Content Area */
.ow-card-content {
    padding: 12px 10px !important;
    z-index: 1;
}

.ow-card-content .title {
    margin-bottom: 5px !important;
}

.ow-card-content .title a {
    color: #fff !important;
    font-size: 1rem !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
}

.ow-card-content .title a:hover {
    color: var(--ow-orange) !important;
}

.ow-card-footer {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 50px;
}

.ow-subtitle {
    color: var(--ow-blue) !important;
    font-size: 0.65rem !important;
    font-weight: 900 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ow-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.ow-tag {
    background: #1e262e;
    color: var(--ow-light-grey);
    border-left: 2px solid var(--ow-orange);
    font-size: 0.6rem;
    padding: 2px 8px;
    text-transform: uppercase;
    font-weight: 700;
    transition: all 0.2s ease;
}

.ow-tag:hover {
    background: var(--ow-orange);
    color: #000;
}

/* Single Video Page Immersive Style */
#page-video .column-main-video {
    background: linear-gradient(180deg, #11151a 0%, #0d1013 300px, #080a0c 100%) !important;
    position: relative;
    padding: 30px !important;
}

/* Overwatch HUD Gradient Containers */
.ow-hud-block {
    background: linear-gradient(110deg, rgba(30, 38, 46, 0.95) 0%, rgba(18, 22, 26, 0.98) 100%) !important;
    border: none !important;
    position: relative;
    overflow: visible !important;
}

.ow-hud-block::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(64, 178, 237, 0.1);
    pointer-events: none;
    z-index: 1;
}

.ow-hud-block.title-block {
    border-left: 5px solid var(--ow-orange) !important;
    box-shadow: -10px 0 20px rgba(249, 158, 26, 0.05);
}

.ow-hud-block.title-block h1 {
    font-size: 1.6rem !important;
    letter-spacing: 0.5px;
    color: var(--ow-white);
}

.ow-hud-block.meta-block {
    background: linear-gradient(160deg, #1e262e 0%, #12161a 100%) !important;
}

.ow-hud-block .tag.is-dark {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--ow-light-grey) !important;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.7rem;
    padding: 10px;
    border-radius: 0;
    transition: all 0.2s ease;
}

.ow-hud-block .tag.is-dark:hover {
    background: var(--ow-blue) !important;
    color: #000 !important;
    border-color: var(--ow-blue) !important;
}

.ow-hud-block .tag.duration {
    background: var(--ow-orange) !important;
    color: #000 !important;
    font-weight: 900 !important;
}

/* Player Frame */
.ow-player-frame {
    background: #000;
    position: relative;
    padding: 2px;
}

.ow-player-frame::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(90deg, var(--ow-blue), transparent, var(--ow-blue));
    opacity: 0.2;
    z-index: 0;
}

/* Buttons */
.button.is-link,
.button.is-primary,
.btn-theme {
    background-color: var(--ow-orange) !important;
    color: var(--ow-black) !important;
    clip-path: polygon(5% 0%, 100% 0%, 95% 100%, 0% 100%) !important;
    font-weight: 800 !important;
}

/* Footer (HUD Style) */
.footer {
    background-color: #1a2129 !important;
    /* Surface Slate */
    border-top: 4px solid var(--ow-orange) !important;
    position: relative;
    padding: 3rem 1.5rem 6rem !important;
}

.footer::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--ow-blue);
    opacity: 0.5;
}

/* Cleanup Leftovers */
.sort-filter {
    background-color: var(--ow-surface) !important;
    border-left: 6px solid var(--ow-orange) !important;
}

/* Sidebar Ads cleanup */
.sidebar-ads-container {
    background-color: transparent !important;
}

/* Global scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--ow-black);
}

::-webkit-scrollbar-thumb {
    background: var(--ow-orange);
}

/* Theme Utilities */
.theme-bg,
.has-background-link,
.has-background-primary {
    background-color: var(--ow-orange) !important;
    color: var(--ow-black) !important;
}

.theme-bg:hover {
    background-color: var(--ow-white) !important;
    color: var(--ow-black) !important;
}

.has-text-primary,
.has-text-link {
    color: var(--ow-orange) !important;
}

.player .control-buttons>a.theme-bg {
    background-color: var(--ow-orange) !important;
}

.badges .tag {
    background-color: var(--ow-surface) !important;
    color: var(--ow-white) !important;
    border: 1px solid #444 !important;
}

.badges .tag.duration {
    background-color: var(--ow-orange) !important;
    color: var(--ow-black) !important;
    font-weight: 800 !important;
}