﻿/* ============================================================
   MT3 - Neon Noir Dark Theme
   A sleek dark interface with neon violet accents on near-black
   ============================================================ */

/* --- CSS Variables --- */
:root {
    --mt3-bg: #0a0a12;
    --mt3-bg-secondary: #12121c;
    --mt3-bg-card: #181825;
    --mt3-bg-elevated: #232132;
    --mt3-bg-input: #0a0814;
    --mt3-accent: #b347ff;
    --mt3-accent-hover: #c870ff;
    --mt3-accent-dark: #7a1fd0;
    --mt3-accent-muted: rgba(179,71,255,0.12);
    --mt3-accent-glow: rgba(179,71,255,0.25);
    --mt3-gold: #ff2d95;
    --mt3-text: #e6e0f2;
    --mt3-text-secondary: #a090c0;
    --mt3-text-muted: #7d6d9e;
    --mt3-text-dim: #4a4068;
    --mt3-border: #2a2438;
    --mt3-border-light: #22203a;
    --mt3-shadow: 0 2px 12px rgba(0,0,0,0.5);
    --mt3-shadow-hover: 0 6px 20px rgba(179,71,255,0.15);
    --mt3-radius: 6px;
    --mt3-radius-lg: 10px;
    --mt3-font-heading: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
    --mt3-font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    --mt3-max-width: 1200px;
    --mt3-gutter: 20px;
    --mt3-header-bg: #08080f;
    --mt3-header-text: #e6e0f2;
    --mt3-nav-bg: #12121c;
    --mt3-footer-bg: #08080f;
    --mt3-footer-text: #7d6d9e;
    --mt3-nav-row-height: 40px;
    --mt3-nav-rows-m: 6;
    --mt3-nav-rows-pc: 3;
    --mt3-nav-item-width: 7rem;
    --mt3-nav-col-gap: 8px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.mt3-body {
    background-color: var(--mt3-bg);
    color: var(--mt3-text);
    font-family: var(--mt3-font-body);
    font-size: 15px;
    line-height: 1.6;
    min-width: 320px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--mt3-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--mt3-accent-hover);
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}

/* --- Scrollbar (dark theme) --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--mt3-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--mt3-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--mt3-text-dim);
}

/* --- Site Wrapper --- */
.mt3-site-wrapper {
    max-width: var(--mt3-max-width);
    margin: 0 auto;
    min-height: 100vh;
}

/* --- Site Header --- */
.mt3-site-header {
    position: relative;
    z-index: 100;
}

/* --- Header Bar --- */
.mt3-header-bar {
    background: var(--mt3-header-bg);
    padding: 0 var(--mt3-gutter);
    border-bottom: 1px solid var(--mt3-accent-glow);
}

.mt3-header-inner {
    max-width: var(--mt3-max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    height: 56px;
    gap: 16px;
}

.mt3-logo-wrap {
    flex-shrink: 0;
}

.mt3-logo {
    display: block;
    height: 36px;
    min-width: 120px;
}

.mt3-logo--text {
    display: flex;
    align-items: center;
}

.mt3-logo-text {
    font-family: var(--mt3-font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--mt3-header-text);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* --- Search Bar --- */
.mt3-search-bar {
    flex: 1;
    max-width: 400px;
}

.mt3-search-field {
    display: flex;
    align-items: center;
    background: var(--mt3-bg-input);
    border: 1px solid var(--mt3-border);
    border-radius: 24px;
    overflow: hidden;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.mt3-search-field:focus-within {
    background: var(--mt3-bg-secondary);
    border-color: var(--mt3-accent);
    box-shadow: 0 0 0 3px var(--mt3-accent-muted);
}

.mt3-search-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--mt3-text);
    padding: 8px 16px;
    font-size: 14px;
    outline: none;
}

.mt3-search-input::placeholder {
    color: var(--mt3-text-dim);
}

.mt3-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 36px;
    background: transparent;
    border: none;
    color: var(--mt3-text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.mt3-search-btn:hover {
    color: var(--mt3-accent);
}

/* --- Header Ads --- */
.mt3-header-ads {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: auto;
    overflow: visible;
}

.mt3-txt-ads {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    list-style: none;
    -webkit-overflow-scrolling: touch;
}

.mt3-txt-ads::-webkit-scrollbar {
    height: 4px;
}

.mt3-txt-ads::-webkit-scrollbar-thumb {
    background: var(--mt3-border);
    border-radius: 2px;
}

.mt3-txt-ad-item {
    flex-shrink: 0;
}

.mt3-txt-ad-item a {
    color: var(--mt3-accent);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
    padding: 4px 10px;
    border: 1px solid rgba(179, 71, 255, 0.3);
    border-radius: 14px;
    transition: all 0.2s;
}

.mt3-txt-ad-item a:hover {
    background: var(--mt3-accent);
    color: var(--mt3-bg);
    border-color: var(--mt3-accent);
}

/* --- Mobile Search --- */
.mt3-mobile-search {
    display: none;
    background: var(--mt3-header-bg);
    padding: 8px var(--mt3-gutter);
}

.mt3-mobile-search .mt3-search-bar {
    max-width: 100%;
}

/* --- Desktop Only --- */
.mt3-desktop-only {
    display: block;
}

/* --- Navigation --- */
.mt3-nav-bar {
    background: var(--mt3-nav-bg);
    border-bottom: 1px solid var(--mt3-border);
    padding: 0 var(--mt3-gutter);
}

.mt3-nav-inner {
    max-width: var(--mt3-max-width);
    margin: 0 auto;
    position: relative;
    contain: layout style;
}

.mt3-nav-inner:not(.mt3-nav--expanded):not(.mt3-nav--no-overflow) .mt3-nav-list {
    overflow: hidden;
    max-height: calc(var(--mt3-nav-rows-m) * var(--mt3-nav-row-height));
}

@media (min-width: 769px) {
    .mt3-nav-inner:not(.mt3-nav--expanded):not(.mt3-nav--no-overflow) .mt3-nav-list {
        max-height: calc(var(--mt3-nav-rows-pc) * var(--mt3-nav-row-height));
    }

    :root {
        --mt3-nav-item-width: 8.75rem;
    }
}

.mt3-nav-inner.mt3-nav--user-toggle:not(.mt3-nav--no-overflow) .mt3-nav-list {
    transition: max-height 0.28s ease;
}

.mt3-nav-inner.mt3-nav--expanded .mt3-nav-list {
    max-height: 3000px;
    overflow: visible;
}

.mt3-nav-inner.mt3-nav--no-overflow .mt3-nav-list {
    max-height: none !important;
    overflow: visible !important;
}

.mt3-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0;
}

.mt3-nav-list > .mt3-nav-item {
    flex: 1 1 var(--mt3-nav-item-width);
    min-width: 0;
    max-width: 14rem;
}

@media (max-width: 768px) {
    .mt3-nav-list {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        column-gap: var(--mt3-nav-col-gap);
        row-gap: 0;
    }

    .mt3-nav-list > .mt3-nav-item {
        flex: none;
        max-width: none;
        width: auto;
        min-width: 0;
    }

    .mt3-nav-list .mt3-nav-link {
        padding: 8px 4px;
        font-size: 12px;
    }
}

.mt3-nav-link {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 8px 12px;
    color: var(--mt3-text-secondary);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 16px;
    position: relative;
    transition: color 0.2s, background 0.2s;
}

.mt3-nav-link:hover {
    color: var(--mt3-accent);
    background: var(--mt3-accent-muted);
}

.mt3-nav-link--current {
    color: var(--mt3-accent);
    background: var(--mt3-accent-muted);
    font-weight: 600;
}

.mt3-nav-item--ad .mt3-nav-link--ad {
    color: var(--mt3-accent);
    font-weight: 600;
}

/* --- Nav Toggle --- */
.mt3-nav-toggle {
    width: 100%;
    margin: 8px 0 4px;
    padding: 6px 14px;
    background: var(--mt3-bg-card);
    border: 1px solid var(--mt3-border);
    border-radius: var(--mt3-radius);
    font-size: 13px;
    color: var(--mt3-text-muted);
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
}

.mt3-nav-toggle[hidden] {
    display: none;
}

.mt3-nav-toggle:hover {
    background: var(--mt3-accent);
    color: var(--mt3-bg);
    border-color: var(--mt3-accent);
}

/* --- Site Main --- */
.mt3-site-main {
    max-width: var(--mt3-max-width);
    margin: 0 auto;
    padding: var(--mt3-gutter);
    min-height: 60vh;
}

/* --- Breadcrumb (Terminal Style) --- */
.mt3-breadcrumb {
    padding: 14px 0;
    margin-bottom: 10px;
}

.mt3-breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    list-style: none;
    font-size: 13px;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    color: var(--mt3-text-muted);
    letter-spacing: 0.02em;
}

.mt3-breadcrumb-list::before {
    content: '~/';
    color: var(--mt3-accent);
    margin-right: 4px;
    font-weight: 600;
    opacity: 0.7;
}

.mt3-breadcrumb-item + .mt3-breadcrumb-item::before {
    content: '>';
    margin: 0 6px;
    color: var(--mt3-text-dim);
    font-size: 11px;
}

.mt3-breadcrumb-item a {
    color: var(--mt3-text-secondary);
    transition: color 0.2s;
    padding: 2px 0;
}

.mt3-breadcrumb-item a:hover {
    color: var(--mt3-accent);
    text-shadow: 0 0 8px var(--mt3-accent-glow);
}

.mt3-breadcrumb-item--active span {
    color: var(--mt3-accent);
    font-weight: 600;
    text-shadow: 0 0 6px var(--mt3-accent-glow);
}

/* --- Section Headers --- */
.mt3-section {
    margin-bottom: 28px;
}

.mt3-section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 0;
    border-bottom: none;
}

.mt3-section-title {
    font-family: var(--mt3-font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--mt3-text);
    margin: 0;
    position: relative;
    padding-left: 16px;
    letter-spacing: 0.01em;
}

.mt3-section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    min-height: 18px;
    background: var(--mt3-accent);
    border-radius: 3px;
    box-shadow: 0 0 8px var(--mt3-accent-glow), 0 0 16px rgba(179,71,255,0.1);
}

.mt3-section-accent {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--mt3-accent-glow), transparent 80%);
}

/* --- Video Card Grid (Glassmorphism Layout) --- */
.mt3-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 600px) {
    .mt3-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (min-width: 900px) {
    .mt3-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

@media (min-width: 1200px) {
    .mt3-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* --- Card (Glassmorphism + Horizontal on PC) --- */
.mt3-card {
    background: rgba(24,24,37,0.6);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-radius: 10px;
    border: 1px solid rgba(179,71,255,0.08);
    border-left: 3px solid var(--mt3-accent);
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.3);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

@media (min-width: 600px) {
    .mt3-card:not(.mt3-card--ad):not(.mt3-card--empty) {
        display: flex;
        flex-direction: row;
        align-items: stretch;
    }
}

.mt3-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(179,71,255,0.12), 0 2px 12px rgba(0,0,0,0.4);
    border-left-color: var(--mt3-accent-hover);
}

@media (min-width: 600px) {
    .mt3-card:hover {
        transform: translateX(4px);
    }
}

.mt3-card--empty {
    grid-column: 1 / -1;
    padding: 48px 20px;
    text-align: center;
    color: var(--mt3-text-muted);
    font-size: 15px;
    border-left: 3px solid var(--mt3-border);
    background: rgba(24,24,37,0.4);
}

/* --- Card Thumbnail (Glassmorphism) --- */
.mt3-card-thumb {
    display: block;
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
    background: var(--mt3-bg-elevated);
}

@media (min-width: 600px) {
    .mt3-card:not(.mt3-card--ad):not(.mt3-card--empty) .mt3-card-thumb {
        padding-top: 0;
        width: 42%;
        min-width: 42%;
        min-height: 120px;
        flex-shrink: 0;
    }
}

.mt3-card-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.mt3-card:hover .mt3-card-thumb img {
    transform: scale(1.06);
    filter: brightness(1.1);
}

/* --- Card Play Button --- */
.mt3-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.55);
    border: 2px solid rgba(179, 71, 255, 0.4);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.mt3-card-play::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 54%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 7px 0 7px 13px;
    border-color: transparent transparent transparent var(--mt3-accent);
}

.mt3-card:hover .mt3-card-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 0 20px rgba(179,71,255,0.3);
}

/* --- Card Body --- */
.mt3-card-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

@media (min-width: 600px) {
    .mt3-card:not(.mt3-card--ad):not(.mt3-card--empty) .mt3-card-body {
        flex: 1;
        padding: 14px 18px;
        justify-content: center;
    }
}

.mt3-card-title {
    font-family: var(--mt3-font-heading);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 600px) {
    .mt3-card-title {
        font-size: 15px;
        -webkit-line-clamp: 2;
        margin: 0 0 10px;
    }
}

.mt3-card-title a {
    color: var(--mt3-text);
    transition: color 0.2s;
}

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

/* --- Card Meta --- */
.mt3-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--mt3-text-muted);
    margin: 0;
}

.mt3-card-duration {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.mt3-meta-icon {
    flex-shrink: 0;
}

.mt3-card-views {
    font-weight: 500;
    color: var(--mt3-text-dim);
}

/* --- Ad Card --- */
.mt3-card.mt3-card--ad.banner-cover {
    aspect-ratio: unset !important;
    width: 100%;
    max-width: 100%;
}

.mt3-card--ad {
    border: 1px dashed var(--mt3-border);
    border-bottom: 2px solid var(--mt3-accent);
    box-sizing: border-box;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    align-self: stretch;
    min-height: 6.875rem;
}

.mt3-card--ad .mt3-card-thumb--ad {
    position: relative;
    flex: 1 1 auto;
    align-self: stretch;
    width: 100%;
    max-width: 100%;
    padding-top: 0 !important;
    height: auto;
}

/* Keep ad card layout consistent with common app.css .banner-cover-grid a */
.mt3-card.mt3-card--ad.banner-cover.banner-cover-grid .mt3-card-thumb--ad {
    height: auto !important;
    min-height: 6.875rem !important;
    margin-bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

.mt3-card--ad .mt3-card-thumb--ad img.lazy,
.mt3-card--ad .mt3-card-thumb--ad img {
    position: absolute;
    inset: 0;
    width: 100%;
    min-width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: fill;
    object-position: center;
}

@media (min-width: 769px) {
    .mt3-card--ad {
        grid-column: auto;
    }
}

/* --- Banner Ads --- */
.mt3-banner-ad {
    margin-bottom: 16px;
}

.mt3-banner-ad-inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mt3-banner-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: fill;
    border-radius: var(--mt3-radius);
}

.mt3-banner-ad--player {
    padding: 0 24px;
}

/* --- Pagination (Circular Buttons) --- */
.mt3-pagination-wrap {
    margin-top: 28px;
    padding: 20px 0;
}

.mt3-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mt3-pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    border: 1px solid var(--mt3-border);
    border-radius: 50%;
    background: rgba(24,24,37,0.6);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: var(--mt3-text-secondary);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.25s ease;
    text-decoration: none;
}

.mt3-pager-btn:hover {
    border-color: var(--mt3-accent);
    color: var(--mt3-accent);
    background: var(--mt3-accent-muted);
    box-shadow: 0 0 10px rgba(179,71,255,0.15);
}

.mt3-pager-btn--active {
    background: var(--mt3-accent);
    color: var(--mt3-bg);
    border-color: var(--mt3-accent);
    cursor: default;
    box-shadow: 0 0 14px var(--mt3-accent-glow);
    font-weight: 700;
}

.mt3-pager-btn--active:hover {
    background: var(--mt3-accent);
    color: var(--mt3-bg);
    border-color: var(--mt3-accent);
    box-shadow: 0 0 14px var(--mt3-accent-glow);
}

/* --- Player / Archive Page (Glassmorphism) --- */
.mt3-player-article {
    background: rgba(24,24,37,0.5);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: var(--mt3-radius-lg);
    border: 1px solid rgba(179,71,255,0.06);
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
    overflow: hidden;
}

.mt3-archive-content {
    padding: 0;
}

.mt3-player-section {
    background: #000;
    border-radius: 0;
}

.mt3-player-wrapper,
.mt3-player-wrapper #article-videos {
    border-radius: 0;
}

.mt3-player-main {
    position: relative;
}

.mt3-tips-bar {
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.5);
}

.mt3-tips-inner {
    max-width: var(--mt3-max-width);
    margin: 0 auto;
}

.mt3-tips-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
    color: var(--mt3-text-muted);
}

.mt3-tips-list li {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.mt3-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.mt3-badge--accent {
    background: var(--mt3-accent);
    color: var(--mt3-bg);
    box-shadow: 0 0 8px var(--mt3-accent-glow);
}

.mt3-player-wrapper {
    position: relative;
    background: #000;
}

.mt3-player-wrapper .dplayer {
    width: 100%;
}

.mt3-player-wrapper #article-videos {
    width: 100%;
    aspect-ratio: 1520 / 651;
}

.mt3-player-wrapper #article-videos .dplayer,
.mt3-player-wrapper #article-videos video {
    width: 100% !important;
    height: 100% !important;
}

@media (max-width: 768px) {
    .mt3-player-wrapper #article-videos {
        aspect-ratio: 16 / 9;
    }

    @supports not (aspect-ratio: 1 / 1) {
        .mt3-player-wrapper #article-videos {
            height: calc((100vw - 30px) * 9 / 16);
            max-height: 60vh;
        }
    }

    @supports (-webkit-touch-callout: none) {
        .mt3-player-wrapper #article-videos {
            aspect-ratio: auto;
            height: calc((100vw - 30px) * 9 / 16);
            max-height: 60vh;
        }
    }
}

/* DPlayer accent color override for Cyber Blue theme */
.mt3-player-wrapper .dplayer-thumb {
    background: var(--mt3-accent) !important;
}

.mt3-player-wrapper .dplayer-played .dplayer-played-bar {
    background: var(--mt3-accent) !important;
}

.mt3-player-wrapper .dplayer-loading-icon .dplayer-loading-dot {
    background: var(--mt3-accent) !important;
}

/* --- Video Info (Large Title + Inline Meta) --- */
.mt3-video-info {
    padding: 24px 28px;
}

.mt3-video-meta {
    margin-bottom: 18px;
}

.mt3-video-title {
    font-family: var(--mt3-font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--mt3-text);
    line-height: 1.4;
    margin: 0 0 12px;
    letter-spacing: 0.01em;
}

.mt3-video-stats {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: var(--mt3-text-muted);
    flex-wrap: wrap;
}

.mt3-view-count em {
    font-style: normal;
    font-weight: 600;
    color: var(--mt3-accent);
}

.mt3-likes-msg {
    color: var(--mt3-accent);
    font-size: 13px;
}

/* --- Video Tags (Pill Style with Glow) --- */
.mt3-video-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(179,71,255,0.08);
}

.mt3-tags-label {
    color: var(--mt3-text-muted);
    font-size: 13px;
}

.mt3-tag {
    display: inline-block;
    padding: 4px 14px;
    background: var(--mt3-accent-muted);
    border: 1px solid rgba(179,71,255,0.15);
    border-radius: 20px;
    font-size: 12px;
    color: var(--mt3-text-secondary);
    transition: all 0.25s ease;
}

.mt3-tag:hover {
    background: var(--mt3-accent);
    color: var(--mt3-bg);
    border-color: var(--mt3-accent);
    box-shadow: 0 0 12px var(--mt3-accent-glow);
}

.mt3-refresh-hint {
    font-size: 13px;
    margin-bottom: 16px;
}

.mt3-refresh-hint a {
    color: var(--mt3-text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.mt3-refresh-hint a:hover {
    color: var(--mt3-accent);
}

/* --- Related Section --- */
.mt3-related-section {
    border-top: 1px solid rgba(179,71,255,0.08);
}

/* --- Empty State --- */
.mt3-empty-state {
    padding: 64px 20px;
    text-align: center;
    color: var(--mt3-text-muted);
    font-size: 16px;
}

/* --- Footer (Three-Column Grid) --- */
.mt3-footer {
    background: linear-gradient(180deg, rgba(8,8,15,0.95) 0%, rgba(12,12,28,1) 100%);
    margin-top: 40px;
    border-top: 2px solid transparent;
    border-image: linear-gradient(90deg, transparent 5%, var(--mt3-accent) 50%, transparent 95%) 1;
    position: relative;
}

.mt3-footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: var(--mt3-accent);
    filter: blur(4px);
    opacity: 0.5;
}

.mt3-footer-inner {
    max-width: var(--mt3-max-width);
    margin: 0 auto;
    padding: 32px var(--mt3-gutter);
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
}

@media (min-width: 768px) {
    .mt3-footer-inner {
        grid-template-columns: auto 1fr auto;
        gap: 32px;
        text-align: left;
        align-items: start;
    }
}

.mt3-footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .mt3-footer-links {
        justify-content: center;
    }
}

.mt3-footer-link {
    color: var(--mt3-footer-text);
    font-size: 13px;
    padding: 4px 8px;
    transition: color 0.2s;
    position: relative;
}

.mt3-footer-link:hover {
    color: var(--mt3-accent);
}

.mt3-footer-sep {
    display: inline-block;
    width: 1px;
    height: 12px;
    background: rgba(125, 109, 158, 0.25);
}

.mt3-footer-disclaimer {
    color: rgba(125, 109, 158, 0.6);
    font-size: 12px;
    line-height: 1.7;
    margin: 0;
}

.mt3-footer-copy {
    color: var(--mt3-footer-text);
    font-size: 13px;
    margin: 0;
}

@media (min-width: 768px) {
    .mt3-footer-copy {
        text-align: right;
    }
}

.mt3-footer-copy a {
    color: var(--mt3-accent);
    transition: color 0.2s;
}

.mt3-footer-copy a:hover {
    text-shadow: 0 0 8px var(--mt3-accent-glow);
}

/* --- 404 Page (Terminal Style) --- */
.mt3-404-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 55vh;
    padding: 40px var(--mt3-gutter);
}

.mt3-404-card {
    background: rgba(24,24,37,0.6);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: var(--mt3-radius-lg);
    border: 1px solid rgba(179,71,255,0.1);
    box-shadow: 0 4px 32px rgba(0,0,0,0.4);
    padding: 52px 44px;
    text-align: center;
    max-width: 520px;
    width: 100%;
}

.mt3-404-code {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    font-size: 6rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #b347ff 0%, #7a1fd0 50%, #b347ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    filter: drop-shadow(0 0 20px rgba(179,71,255,0.3));
}

.mt3-404-title {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    font-size: 1.3rem;
    color: var(--mt3-text);
    margin-bottom: 12px;
}

.mt3-404-title::before {
    content: '$ ';
    color: var(--mt3-accent);
    opacity: 0.7;
}

.mt3-404-desc {
    color: var(--mt3-text-muted);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 28px;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
}

.mt3-404-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.mt3-404-btn {
    display: inline-block;
    padding: 10px 34px;
    background: var(--mt3-accent);
    color: var(--mt3-bg);
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.25s ease;
}

.mt3-404-btn:hover {
    background: var(--mt3-accent-hover);
    color: var(--mt3-bg);
    box-shadow: 0 0 20px var(--mt3-accent-glow);
    transform: translateY(-1px);
}

.mt3-404-search {
    display: flex;
    width: 100%;
    max-width: 360px;
    border: 1px solid var(--mt3-border);
    border-radius: 24px;
    overflow: hidden;
    background: rgba(10,8,20,0.8);
    transition: border-color 0.2s;
}

.mt3-404-search:focus-within {
    border-color: var(--mt3-accent);
    box-shadow: 0 0 12px rgba(179,71,255,0.15);
}

.mt3-404-input {
    flex: 1;
    border: none;
    padding: 10px 18px;
    font-size: 14px;
    outline: none;
    background: transparent;
    color: var(--mt3-text);
}

.mt3-404-input::placeholder {
    color: var(--mt3-text-dim);
}

.mt3-404-search-btn {
    padding: 10px 20px;
    background: var(--mt3-accent);
    color: var(--mt3-bg);
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.mt3-404-search-btn:hover {
    background: var(--mt3-accent-hover);
}

/* --- Static Pages (Left Accent Line + Glassmorphism) --- */
.mt3-static-page-wrap {
    margin-bottom: 28px;
}

.mt3-static-page {
    margin-bottom: 28px;
}

.mt3-article {
    background: rgba(24,24,37,0.5);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: var(--mt3-radius-lg);
    border: 1px solid rgba(179,71,255,0.06);
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
    overflow: hidden;
}

.mt3-static-card {
    padding: 0;
}

.mt3-static-header {
    padding: 32px 32px 20px;
    border-bottom: 1px solid rgba(179,71,255,0.08);
    border-left: 3px solid var(--mt3-accent);
    position: relative;
}

.mt3-static-header::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--mt3-accent);
    filter: blur(3px);
    opacity: 0.4;
}

.mt3-static-title {
    font-family: var(--mt3-font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--mt3-text);
    margin: 0;
}

.mt3-static-date {
    margin: 8px 0 0;
    font-size: 0.8125rem;
    color: var(--mt3-text-muted);
}

.mt3-static-body {
    padding: 28px 32px 36px;
    border-left: 3px solid rgba(179,71,255,0.2);
    position: relative;
}

.mt3-static-body p {
    margin-bottom: 14px;
    line-height: 1.8;
    color: var(--mt3-text-secondary);
}

.mt3-static-body a {
    color: var(--mt3-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.mt3-static-body a:hover {
    color: var(--mt3-accent-hover);
    text-shadow: 0 0 6px var(--mt3-accent-glow);
}

.mt3-blockquote {
    margin: 0 0 20px;
    padding: 18px 22px;
    border-left: 4px solid var(--mt3-accent);
    background: var(--mt3-accent-muted);
    border-radius: 0 var(--mt3-radius) var(--mt3-radius) 0;
    color: var(--mt3-text-secondary);
    font-style: italic;
    position: relative;
}

.mt3-blockquote::before {
    content: '\201C';
    position: absolute;
    top: -4px;
    left: 10px;
    font-size: 2.5rem;
    color: var(--mt3-accent);
    opacity: 0.25;
    font-family: Georgia, serif;
}

.mt3-static-section {
    margin-bottom: 24px;
}

.mt3-static-section-title {
    font-family: var(--mt3-font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--mt3-text);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(179,71,255,0.08);
}

.mt3-static-section-content {
    padding: 4px 0;
}

.mt3-link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.mt3-link-btn {
    display: inline-block;
    padding: 8px 22px;
    background: var(--mt3-accent);
    color: var(--mt3-bg) !important;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.25s ease;
}

.mt3-link-btn:hover {
    background: var(--mt3-accent-hover);
    color: var(--mt3-bg) !important;
    box-shadow: 0 0 16px var(--mt3-accent-glow);
    transform: translateY(-1px);
}

/* --- DPlayer overrides --- */
.dplayer-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    color: var(--mt3-text-muted);
    background: rgba(0,0,0,0.2);
}

.dplayer-loading-text {
    font-size: 14px;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

/* --- Search Page (Glassmorphism + Dark Chips) --- */
.mt3-search-page {
    max-width: var(--mt3-max-width);
    margin: 0 auto;
}

.mt3-search-panel {
    background: rgba(24,24,37,0.5);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: var(--mt3-radius-lg);
    border: 1px solid rgba(179,71,255,0.06);
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
    padding: 28px;
}

.mt3-search-section {
    margin-bottom: 28px;
}

.mt3-search-section:last-child {
    margin-bottom: 0;
}

.mt3-search-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--mt3-text);
}

.mt3-search-hot-title {
    font-family: var(--mt3-font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    position: relative;
    padding-left: 14px;
}

.mt3-search-hot-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    background: var(--mt3-accent);
    border-radius: 3px;
    box-shadow: 0 0 6px var(--mt3-accent-glow);
}

.mt3-search-clear {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 400;
    color: var(--mt3-text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.mt3-search-clear:hover {
    color: var(--mt3-accent);
}

.mt3-search-clear svg {
    width: 14px;
    height: 14px;
}

.mt3-search-history {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mt3-search-no-data {
    color: var(--mt3-text-muted);
    font-size: 13px;
    padding: 8px 0;
}

.mt3-history-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 16px;
    background: rgba(35,33,50,0.8);
    border: 1px solid var(--mt3-border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--mt3-text-secondary);
    transition: all 0.25s ease;
}

.mt3-history-tag:hover {
    background: var(--mt3-accent);
    color: var(--mt3-bg);
    border-color: var(--mt3-accent);
    box-shadow: 0 0 10px var(--mt3-accent-glow);
}

.mt3-search-ranks {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mt3-rank-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(35,33,50,0.4);
    border: 1px solid rgba(179,71,255,0.06);
    border-radius: var(--mt3-radius);
    transition: all 0.25s ease;
}

.mt3-rank-card:hover {
    background: var(--mt3-accent-muted);
    border-color: rgba(179,71,255,0.2);
    transform: translateX(4px);
}

.mt3-rank-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--mt3-text-muted);
    background: var(--mt3-border);
    flex-shrink: 0;
}

.mt3-rank-num--1 {
    background: linear-gradient(135deg, #ffd700, #e0a020);
    color: var(--mt3-bg);
    box-shadow: 0 0 8px rgba(255,215,0,0.3);
}

.mt3-rank-num--2 {
    background: linear-gradient(135deg, #c0d0e0, #8899aa);
    color: var(--mt3-bg);
    box-shadow: 0 0 6px rgba(192,208,224,0.2);
}

.mt3-rank-num--3 {
    background: linear-gradient(135deg, #cd7f32, #a0652a);
    color: #fff;
    box-shadow: 0 0 6px rgba(205,127,50,0.2);
}

.mt3-rank-title {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: var(--mt3-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mt3-rank-hot {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--mt3-accent);
    flex-shrink: 0;
}

.mt3-rank-hot svg {
    width: 14px;
    height: 14px;
}

/* --- Scroll to Top (Accent Circle + Glow) --- */
.mt3-scroll-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--mt3-accent);
    color: var(--mt3-bg);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px var(--mt3-accent-glow), 0 0 20px rgba(179,71,255,0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.25s, box-shadow 0.25s;
    z-index: 999;
}

.mt3-scroll-top--visible {
    opacity: 1;
    visibility: visible;
}

.mt3-scroll-top:hover {
    background: var(--mt3-accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 24px var(--mt3-accent-glow), 0 0 32px rgba(179,71,255,0.2);
}

.mt3-scroll-top svg {
    width: 20px;
    height: 20px;
}

/* ============================================================
   Responsive
   ============================================================ */

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

@media (max-width: 768px) {
    .mt3-desktop-only {
        display: none !important;
    }

    .mt3-mobile-search {
        display: block;
    }

    .mt3-mobile-search .mt3-search-field {
        border-color: var(--mt3-border);
    }

    .mt3-mobile-search .mt3-search-input {
        font-size: 15px;
    }

    .mt3-header-bar {
        border-bottom: 1px solid var(--mt3-accent-glow);
    }

    .mt3-header-inner {
        height: 50px;
    }

    .mt3-header-ads {
        flex: 1 1 auto;
        min-width: 0;
    }

    .mt3-txt-ad-item a,
    .mt3-txt-ad-item a span {
        max-width: 120px;
    }

    .mt3-nav-link {
        padding: 8px 10px;
        font-size: 13px;
    }

    .mt3-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .mt3-card:not(.mt3-card--ad):not(.mt3-card--empty) {
        display: flex;
        flex-direction: row;
        align-items: stretch;
    }

    .mt3-card:not(.mt3-card--ad):not(.mt3-card--empty) .mt3-card-thumb {
        padding-top: 0;
        width: 42%;
        min-width: 42%;
        min-height: 100px;
        flex-shrink: 0;
    }

    .mt3-card:not(.mt3-card--ad):not(.mt3-card--empty) .mt3-card-body {
        flex: 1;
        padding: 12px 14px;
    }

    .mt3-card--ad {
        grid-column: 1 / -1;
        min-height: 4rem;
    }

    .mt3-card.mt3-card--ad.banner-cover.banner-cover-grid .mt3-card-thumb--ad {
        min-height: 4rem !important;
    }

    .mt3-site-main {
        padding: 12px;
    }

    .mt3-section-title {
        font-size: 1.15rem;
    }

    .mt3-video-info {
        padding: 18px;
    }

    .mt3-video-title {
        font-size: 1.15rem;
    }

    .mt3-static-header {
        padding: 20px 16px 16px;
    }

    .mt3-static-title {
        font-size: 1.35rem;
    }

    .mt3-static-body {
        padding: 16px;
    }

    .mt3-404-card {
        padding: 32px 20px;
    }

    .mt3-404-code {
        font-size: 4rem;
    }

    .mt3-footer-inner {
        padding: 24px var(--mt3-gutter);
        grid-template-columns: 1fr;
    }

    .mt3-banner-ad--player {
        padding: 0 16px;
    }

    .mt3-search-panel {
        padding: 18px;
    }
}

@media (max-width: 599px) {
    .mt3-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .mt3-card:not(.mt3-card--ad):not(.mt3-card--empty) {
        flex-direction: column;
    }

    .mt3-card:not(.mt3-card--ad):not(.mt3-card--empty) .mt3-card-thumb {
        width: 100%;
        min-width: 100%;
        padding-top: 56.25%;
    }

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

    .mt3-card {
        border-left-width: 2px;
    }

    .mt3-card-body {
        padding: 8px 10px 10px;
    }

    .mt3-card-title {
        font-size: 13px;
    }

    .mt3-pager-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 12px;
    }

    .mt3-scroll-top {
        bottom: 16px;
        right: 16px;
        width: 36px;
        height: 36px;
    }
}

/* --- Selection highlight --- */
::selection {
    background: var(--mt3-accent-glow);
    color: var(--mt3-text);
}

::-moz-selection {
    background: var(--mt3-accent-glow);
    color: var(--mt3-text);
}
