/* Short Video Detail Page - PHP Version */
/* Matches the Next.js ShortVideoDetailPage.module.css */

html,
body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #000;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    box-sizing: border-box;
}

.sv-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: 450px;
    margin: 0 auto;
    background: #000;
    overflow: hidden;
}

.sv-video-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.sv-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sv-youtube-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Three-dot menu button */
.sv-dots {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    cursor: pointer;
    z-index: 20;
}

/* Play/Pause indicator */
.sv-play-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    z-index: 15;
    pointer-events: none;
}

/* Bottom overlay gradient */
.sv-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: -moz-linear-gradient(
        top,
        rgba(0, 0, 0, 0) 0,
        rgba(0, 0, 0, 0.6) 26%,
        rgba(0, 0, 0, 1) 100%
    );
    background: -webkit-linear-gradient(
        top,
        rgba(0, 0, 0, 0) 0,
        rgba(0, 0, 0, 0.6) 26%,
        rgba(0, 0, 0, 1) 100%
    );
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0,
        rgba(0, 0, 0, 0.6) 26%,
        rgba(0, 0, 0, 1) 100%
    );
    z-index: 10;
}

.sv-overlay-icons {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.sv-icon {
    display: flex;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
}

.sv-overlay-title h1 {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Navigation arrows */
.sv-nav {
    position: absolute;
    right: 16px;
    z-index: 15;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    cursor: pointer;
}

.sv-nav-up {
    top: 50%;
    margin-top: -44px;
}

.sv-nav-down {
    top: 50%;
    margin-top: 8px;
}

/* Detail panel - slides up from bottom */
.sv-detail-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.92);
    padding: 20px 16px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 30;
    max-height: 60vh;
    overflow-y: auto;
    border-radius: 16px 16px 0 0;
}

.sv-detail-panel.open {
    transform: translateY(0);
}

.sv-detail-close {
    position: absolute;
    top: 12px;
    right: 16px;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
}

.sv-detail-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px;
    line-height: 1.5;
    padding-right: 30px;
}

.sv-detail-desc {
    font-size: 0.875rem;
    color: #ccc;
    line-height: 1.6;
    margin: 0 0 14px;
}

.sv-detail-meta {
    font-size: 0.8rem;
    color: #888;
    display: flex;
    gap: 12px;
}

/* Mobile responsive */
@media (max-width: 767px) {
    .sv-page {
        max-width: 100%;
    }
    .sv-nav {
        /*display: none;*/
        display: block;
    }
}

/* ─── Interstitial Ad Overlay ─── */
.sv-ad-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sv-ad-container {
    position: relative;
    width: 100%;
    max-width: 450px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.sv-ad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.8);
}

.sv-ad-label {
    font-size: 0.75rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
}

.sv-ad-close {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.sv-ad-close:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sv-ad-close:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.25);
}

.sv-ad-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

#sv-ad-slot {
    width: 100%;
    max-width: 400px;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

#div-gpt-ad-short-video-interstitial {
    width: 300px;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}