/* ============================================================
   X9Z7 YouTube Page CSS — Mobile First
   ============================================================ */

.yt-page {
    padding-top: 0;
    min-height: 100vh;
}

/* ===== BANNER ===== */
.yt-banner {
    background: linear-gradient(180deg, rgba(0,0,0,0.97) 0%, rgba(0,10,0,0.9) 100%);
    border-bottom: 1px solid rgba(0,255,65,0.2);
    padding-top: calc(var(--nav-height) + 1.2rem);
    padding-bottom: 1.2rem;
    padding-left: 1rem;
    padding-right: 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.yt-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(0,255,65,0.05) 0%, transparent 70%);
    pointer-events: none;
}

.yt-banner-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.yt-banner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.yt-yt-icon {
    width: 34px;
    height: 34px;
    fill: #00ff41;
    filter: drop-shadow(0 0 10px rgba(0,255,65,0.6));
}

.yt-banner-title {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 4vw, 2rem);
    font-weight: 900;
    color: var(--matrix-green);
    letter-spacing: 0.08em;
    text-shadow: 0 0 20px rgba(0,255,65,0.5), 0 0 40px rgba(0,255,65,0.2);
}

.yt-banner-sub {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: rgba(0,255,65,0.5);
    letter-spacing: 0.15em;
    margin: 0;
}

/* ===== TABS ===== */
.yt-tabs-wrap {
    position: sticky;
    top: var(--nav-height);
    z-index: 100;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0,255,65,0.15);
    padding: 0.6rem 0;
}

.yt-tabs-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: center;
}

.cyber-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.cyber-tab {
    background: transparent;
    border: 1px solid rgba(0,255,65,0.25);
    color: rgba(0,255,65,0.6);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    padding: 0.35rem 1.2rem;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.cyber-tab:hover {
    border-color: var(--matrix-green);
    color: var(--matrix-green);
}

.cyber-tab.active {
    background: var(--matrix-green);
    border-color: var(--matrix-green);
    color: #000;
    font-weight: 700;
}

/* ===== GRID WRAP ===== */
.yt-grid-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.yt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    justify-items: center;
}

.yt-loading {
    grid-column: 1/-1;
    text-align: center;
    padding: 4rem 1rem;
    color: rgba(0,255,65,0.5);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* ===== VIDEO CARD ===== */
.yt-card {
    background: #000;
    border: 1px solid rgba(0,255,65,0.18);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
    text-decoration: none;
}

.yt-card:hover {
    border-color: rgba(0,255,65,0.5);
    transform: translateY(-4px);
    box-shadow: 0 6px 24px rgba(0,255,65,0.14);
}

/* Thumbnail */
.yt-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #0a0a0a;
}

.yt-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.yt-card:hover .yt-thumb-wrap img {
    transform: scale(1.04);
}

.yt-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0);
    transition: background 0.25s ease;
}

.yt-card:hover .yt-play-overlay {
    background: rgba(0,0,0,0.4);
}

.yt-play-icon {
    width: 48px;
    height: 48px;
    background: rgba(0,255,65,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.yt-card:hover .yt-play-icon {
    opacity: 1;
    transform: scale(1);
}

.yt-play-icon i {
    color: #000;
    font-size: 1.2rem;
    margin-left: 3px;
}

/* Duration badge */
.yt-duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0,0.85);
    color: var(--matrix-green);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    padding: 2px 6px;
    border-radius: 2px;
    border: 1px solid rgba(0,255,65,0.3);
}

/* Short badge */
.yt-short-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--matrix-green);
    color: #000;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 2px;
    letter-spacing: 0.05em;
}

/* Card body */
.yt-card-body {
    padding: 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.yt-card-title {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: rgba(255,255,255,0.9);
    line-height: 1.4;
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.yt-card-meta {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.35);
    font-family: var(--font-mono);
    margin-top: auto;
}

/* Shorts: portrait ratio */
.yt-card.is-short .yt-thumb-wrap {
    aspect-ratio: 9/16;
    max-height: 320px;
}

/* Load more */
.load-more-wrap {
    text-align: center;
    padding: 2.5rem 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.load-more-status {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: rgba(0,255,65,0.5);
}

.yt-empty {
    grid-column: 1/-1;
    text-align: center;
    padding: 4rem 1rem;
    color: rgba(0,255,65,0.4);
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

/* Responsive */
@media (max-width: 768px) {
    .yt-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.75rem; }
    .yt-banner { padding: 2rem 1rem 1.5rem; }
    .yt-yt-icon { width: 36px; height: 36px; }
    .yt-grid-wrap { padding: 1rem 0.75rem 3rem; }
}
