/**
 * Video Archive Page Styles
 */

/* --- 1. Hero Section --- */
.vp-hero {
    position: relative;
    padding: 6rem 0 4rem;
    background: radial-gradient(circle at center, rgba(30, 30, 35, 0.8) 0%, var(--color-bg, #0f0f12) 100%);
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.vp-hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.vp-hero__tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(220, 38, 38, 0.1);
    color: var(--color-primary, #dc2626);
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.vp-hero__title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    color: white;
}

.vp-hero__subtitle {
    font-size: 1.25rem;
    color: #999;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.vp-hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: #f00;
    color: white;
    text-decoration: none;
    border-radius: 3rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.vp-hero__cta:hover {
    background: #c00;
    transform: translateY(-2px);
}

/* --- 2. Featured Video --- */
.vp-featured {
    margin-top: -3rem;
    margin-bottom: 4rem;
}

.vp-featured__inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    background: #1a1a1e;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.vp-featured__inner:hover {
    border-color: rgba(220, 38, 38, 0.3);
}

.vp-featured__thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.vp-featured__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.vp-featured__inner:hover .vp-featured__thumb img {
    transform: scale(1.05);
}

.vp-featured__play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vp-featured__inner:hover .vp-featured__play-overlay {
    opacity: 1;
}

.vp-featured__play-btn {
    width: 80px;
    height: 80px;
    background: #dc2626;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.5);
}

.vp-featured__info {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.vp-featured__title {
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.vp-featured__desc {
    color: #999;
    margin-bottom: 2rem;
}

.vp-featured__meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #666;
}

/* --- 3. Tabs & Grid --- */
.vp-tabs {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 15, 18, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.vp-tabs__list {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    overflow-x: auto;
}

.vp-tabs__tab {
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem;
    background: transparent;
    color: #999;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

.vp-tabs__tab.active {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-color: rgba(255, 255, 255, 0.1);
}

.vp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.vp-card {
    background: #1a1a1e;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
}

.vp-card:hover {
    transform: translateY(-5px);
    border-color: rgba(220, 38, 38, 0.3);
}

.vp-card__thumb {
    position: relative;
    aspect-ratio: 16/9;
}

.vp-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vp-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.vp-card:hover .vp-card__overlay {
    opacity: 1;
}

.vp-card__share {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    z-index: 2;
}
.vp-card__share:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.vp-card__info {
    padding: 1.5rem;
}

.vp-card__info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.vp-card__info p {
    font-size: 0.9rem;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- 4. Badges & Indicators --- */
.vp-watched-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(34, 197, 94, 0.9);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.vp-card__badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: #dc2626;
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
}

.vp-card__duration-overlay {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background: rgba(0,0,0,0.8);
    color: white;
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
    border-radius: 0.2rem;
}

/* --- 5. Modal --- */
.vp-modal {
    border: none;
    background: rgba(0,0,0,0.95);
    color: white;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    padding: 0;
}

.vp-modal__container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.vp-modal__player-area {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: black;
}

.vp-modal__iframe-wrap {
    width: 100%;
    max-width: 1200px;
    aspect-ratio: 16/9;
    position: relative;
}

.vp-modal__iframe-wrap iframe {
    width: 100%;
    height: 100%;
}

.vp-modal__close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vp-modal__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.05);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.vp-modal__nav--prev { left: 2rem; }
.vp-modal__nav--next { right: 2rem; }

.vp-modal__info-area {
    background: #0f0f12;
    padding: 2rem 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* Watch Next Overlay */
.vp-modal__watch-next {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.vp-modal__watch-next-ring {
    transform: rotate(-90deg);
}

.vp-modal__watch-next-ring circle {
    fill: none;
    stroke: #dc2626;
    stroke-width: 3;
    stroke-dasharray: 113.1;
    stroke-dashoffset: 0;
}

.vp-modal__watch-next-timer {
    position: relative;
    width: 40px;
    height: 40px;
    margin: 1rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vp-modal__watch-next-timer span {
    position: absolute;
    font-weight: bold;
}

/* --- Video Search Bar --- */
.vp-search-bar {
    padding: 0.75rem 0 0;
}

.vp-search-bar__inner {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 480px;
    margin: 0 auto;
}

.vp-search-bar__icon {
    position: absolute;
    left: 1rem;
    color: rgba(255,255,255,0.4);
    pointer-events: none;
    flex-shrink: 0;
}

.vp-search-bar__input {
    width: 100%;
    padding: 0.65rem 2.5rem 0.65rem 2.8rem;
    border-radius: 50px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.vp-search-bar__input:focus {
    border-color: rgba(220,38,38,0.5);
    background: rgba(255,255,255,0.09);
}

.vp-search-bar__input::placeholder { color: rgba(255,255,255,0.35); }

.vp-search-bar__input::-webkit-search-cancel-button { display: none; }

.vp-search-bar__clear {
    position: absolute;
    right: 0.8rem;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.15s;
}

.vp-search-bar__clear:hover { color: #fff; }

.vp-search-noresults {
    text-align: center;
    color: rgba(255,255,255,0.5);
    padding: 3rem 0;
    font-size: 1rem;
}

/* Keyboard shortcuts overlay */
.vp-shortcuts-overlay {
    position: absolute;
    inset: 0;
    z-index: 30;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.vp-shortcuts-panel {
    background: rgba(18,18,26,0.95);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    max-width: 320px;
    width: 90%;
}
.vp-shortcuts-panel h3 {
    font-size: 0.95rem;
    margin: 0 0 1rem;
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.vp-shortcuts-panel dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
    margin: 0;
}
.vp-shortcuts-panel dt { text-align: right; }
.vp-shortcuts-panel kbd {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.08);
    font-size: 0.75rem;
    font-family: inherit;
    color: rgba(255,255,255,0.8);
}
.vp-shortcuts-panel dd {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

/* Responsive */
@media (max-width: 768px) {
    .vp-featured__inner { grid-template-columns: 1fr; }
    .vp-modal__nav { display: none !important; }
    .vp-search-bar__inner { max-width: 100%; }
}
