/* ========== Episode Overlay - Font 10px គ្មាន Background ========== */
.khflix-short-drama-episode-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
    color: #fff;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: bold;
    z-index: 100;
    pointer-events: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 0, 0, 0.7);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 0.5px;
}

.khflix-short-drama-episode-overlay span {
    display: block;
    line-height: 1;
}

/* ========== ប៊ូតុងប្តូរភាគលើវីដេអូ - ស្អាត ស្មូត ========== */
.khflix-short-drama-nav-buttons {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 99;
}

.khflix-short-drama-nav-overlay {
    position: relative;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.35);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: auto;
    -webkit-user-select: none;
    user-select: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    backdrop-filter: blur(8px);
    opacity: 0;
    transform: scale(0.85);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

#khflix-short-drama-player:hover .khflix-short-drama-nav-overlay {
    opacity: 1;
    transform: scale(1);
}

.khflix-short-drama-nav-overlay::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, #e74c3c, #f39c12);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
    z-index: -1;
}

.khflix-short-drama-nav-overlay:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 25px rgba(231, 76, 60, 0.6);
}

.khflix-short-drama-nav-overlay:hover::before {
    opacity: 1;
}

.khflix-short-drama-nav-overlay:active {
    transform: scale(1.05);
}

.khflix-short-drama-nav-overlay svg {
    width: 22px;
    height: 22px;
    stroke: #fff;
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.3s ease;
    z-index: 1;
}

.khflix-short-drama-nav-overlay:hover svg {
    transform: scale(1.1);
}

.khflix-short-drama-nav-overlay.khflix-short-drama-hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

/* ========== Khflix Short Drama Styles ========== */
.khflix-short-drama-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 25px;
    margin-left: auto;
    margin-right: auto;
}

.khflix-short-drama-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    width: 100%;
    min-height: 40px;
    gap: 10px;
}

.khflix-short-drama-title {
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    margin: 0;
    padding: 0;
    line-height: 1;
    white-space: nowrap;
}

.khflix-short-drama-title span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
}

.khflix-short-drama-badge {
    background: linear-gradient(135deg, #e74c3c, #f39c12);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 1;
}

.khflix-short-drama-scroll-container {
    position: relative;
    display: flex;
    align-items: center;
}

.khflix-short-drama-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 8px 4px;
    cursor: grab;
    scrollbar-width: thin;
    scrollbar-color: #e74c3c #1a1a2e;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}

.khflix-short-drama-scroll:active {
    cursor: grabbing;
}

.khflix-short-drama-scroll::-webkit-scrollbar {
    height: 5px;
}

.khflix-short-drama-scroll::-webkit-scrollbar-track {
    background: #1a1a2e;
    border-radius: 10px;
}

.khflix-short-drama-scroll::-webkit-scrollbar-thumb {
    background: #e74c3c;
    border-radius: 10px;
}

.khflix-short-drama-button {
    box-sizing: border-box;
    position: relative;
    -webkit-user-select: none;
    user-select: none;
    cursor: pointer;
    outline: none;
    border: none;
    -webkit-tap-highlight-color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    text-decoration: none;
    vertical-align: baseline;
    text-align: center;
    margin: 0;
    min-width: 48px;
    height: 36px;
    line-height: 30px;
    padding: 4px 10px;
    border-radius: 6px;
    overflow: hidden;
    transform: translate3d(0, 0, 0);
    transition: background 400ms cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s ease;
    flex-shrink: 0;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-family: inherit;
}

.khflix-short-drama-button:hover {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-color: #e74c3c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.khflix-short-drama-button:active {
    transform: translateY(0px);
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
}

.khflix-short-drama-button.khflix-short-drama-active {
    background: linear-gradient(135deg, #e74c3c, #f39c12);
    border-color: #f39c12;
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.5);
}

.khflix-short-drama-number {
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    display: block;
}

.khflix-short-drama-indicator {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 5px;
    height: 5px;
    background: #2ecc71;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
}

.khflix-short-drama-button.khflix-short-drama-active .khflix-short-drama-indicator {
    opacity: 1;
    animation: khflix-short-drama-blink 1s infinite;
}

@keyframes khflix-short-drama-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.khflix-short-drama-nav {
    box-sizing: border-box;
    position: relative;
    -webkit-user-select: none;
    user-select: none;
    cursor: pointer;
    outline: none;
    border: none;
    -webkit-tap-highlight-color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    text-decoration: none;
    vertical-align: baseline;
    text-align: center;
    margin: 0;
    min-width: 32px;
    width: 32px;
    height: 32px;
    line-height: 32px;
    padding: 0;
    border-radius: 50%;
    overflow: hidden;
    transform: translate3d(0, 0, 0);
    transition: background 400ms cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s ease;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 14px;
    z-index: 10;
}

.khflix-short-drama-nav:hover {
    background: #e74c3c;
    border-color: #e74c3c;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.khflix-short-drama-nav:active {
    transform: scale(0.95);
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
}

.khflix-short-drama-nav.khflix-short-drama-left {
    margin-right: 4px;
}

.khflix-short-drama-nav.khflix-short-drama-right {
    margin-left: 4px;
}

.jw-related-btn,
.jw-related,
.jw-overlay.jw-related,
.jw-card-container.jw-related,
.jw-nextup-container,
.jw-nextup,
.jw-related-shelf,
.jw-shelf-widget,
.jw-icon-rewind,
.jw-icon-next {
    display: none !important;
}

@media (max-width: 768px) {
    .khflix-short-drama-nav-overlay {
        opacity: 0.85;
        transform: scale(1);
    }
}

@media (max-width: 600px) {
    .khflix-short-drama-button {
        min-width: 42px;
        height: 32px;
        padding: 3px 8px;
    }
    .khflix-short-drama-number {
        font-size: 12px;
    }
    .khflix-short-drama-nav {
        min-width: 28px;
        width: 28px;
        height: 28px;
        line-height: 28px;
        font-size: 12px;
    }
    .khflix-short-drama-section {
        padding: 15px;
    }
    .khflix-short-drama-title {
        font-size: 16px;
    }
    .khflix-short-drama-badge {
        font-size: 11px;
        padding: 5px 10px;
    }
    .khflix-short-drama-episode-overlay {
        top: 10px;
        left: 10px;
        padding: 3px 6px;
        font-size: 8px;
    }
    .khflix-short-drama-nav-buttons {
        padding: 0 12px;
    }
    .khflix-short-drama-nav-overlay {
        width: 36px;
        height: 36px;
        background: rgba(0, 0, 0, 0.4);
        opacity: 0.8;
    }
    .khflix-short-drama-nav-overlay svg {
        width: 18px;
        height: 18px;
    }
}