/* Hide default video.js junk */
.video-js.vjs-nexus-native .vjs-control-bar,
.video-js.vjs-nexus-native .vjs-big-play-button,
.video-js.vjs-nexus-native .vjs-loading-spinner {
    display: none !important;
}

.nexus-player-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
    cursor: pointer;
}

/* Hero/Panoramic Override */
.nexus-player-container.nexus-cover {
    aspect-ratio: auto;
    height: 100%;
}

/* Force video to fill container */
.vjs-nexus-native, 
.vjs-nexus-native .vjs-tech,
.vjs-nexus-native video {
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    top: 0;
    left: 0;
    object-fit: contain !important;
}

/* Fill completely (Hero slides) */
.nexus-player-container.nexus-cover .vjs-tech,
.nexus-player-container.nexus-cover video {
    object-fit: cover !important;
}

/* Glassmorphic Controls Group */
.nexus-controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    height: 54px; /* Rigid height */
    background: rgba(15, 15, 20, 0.7);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    gap: 12px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 100;
}

.nexus-player-container:hover .nexus-controls,
.nexus-player-container.active .nexus-controls {
    transform: translateY(0);
    opacity: 1;
}

.nexus-controls.idle {
    transform: translateY(100px);
    opacity: 0;
}

/* Quality Menu */
.nexus-quality-menu {
    position: absolute;
    bottom: 80px;
    right: 20px;
    background: rgba(15, 15, 20, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px;
    display: none;
    flex-direction: column;
    gap: 5px;
    min-width: 120px;
}

.nexus-quality-menu.show {
    display: flex;
}

.nexus-quality-item {
    padding: 8px 12px;
    border-radius: 6px;
    color: #fff;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s;
}

.nexus-quality-item:hover {
    background: rgba(145, 71, 255, 0.2);
}

.nexus-quality-item.active {
    background: var(--accent);
    font-weight: 700;
}

/* Accent Buttons */
.nexus-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nexus-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.nexus-btn svg {
    fill: currentColor;
    width: 18px;
    height: 18px;
    display: block;
}

/* Live Badge */
.nexus-live-badge {
    background: #ff4b4b;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nexus-live-badge::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

/* Progress/Seek Bar (VODs) */
.nexus-progress {
    flex-grow: 1;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.nexus-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #9147ff, #00d2ff);
    border-radius: 2px;
}

/* --- PROFESSIONAL UI: CONTEXT MENU & DM TASKBAR --- */
.nexus-ctx-menu {
    position: absolute;
    z-index: 10000;
    background: rgba(18, 18, 21, 0.9);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    padding: 6px;
    min-width: 170px;
    display: none;
    animation: nexusCtxIn 0.15s ease-out;
}

@keyframes nexusCtxIn {
    from { opacity: 0; transform: scale(0.95) translateY(-5px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.nexus-ctx-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.nexus-ctx-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent);
}

.nexus-ctx-item.mod-action {
    color: #ff6b6b;
}

.nexus-ctx-item.mod-action:hover {
    background: rgba(255, 107, 107, 0.12);
}

.nexus-ctx-sep {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 4px 6px;
}

/* --- DM TASKBAR --- */
.nexus-dm-taskbar {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: flex;
    gap: 12px;
    z-index: 9999;
}

.nexus-dm-chip {
    background: rgba(25, 25, 30, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(145, 71, 255, 0.3);
    padding: 10px 20px;
    border-radius: 30px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.nexus-dm-chip.unread {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(145, 71, 255, 0.4);
    animation: nexusGlow 2s infinite;
}

@keyframes nexusGlow {
    0% { box-shadow: 0 0 5px rgba(145, 71, 255, 0.2); }
    50% { box-shadow: 0 0 20px rgba(145, 71, 255, 0.5); }
    100% { box-shadow: 0 0 5px rgba(145, 71, 255, 0.2); }
}

/* --- DM WINDOW --- */
.nexus-dm-window {
    position: fixed;
    bottom: 85px;
    right: 25px;
    width: 320px;
    height: 450px;
    background: rgba(18, 18, 21, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    z-index: 9998;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    overflow: hidden;
}

.dm-head {
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dm-title {
    font-weight: 800;
    color: var(--accent);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.dm-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dm-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.dm-msg.received {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-bottom-left-radius: 2px;
}

.dm-msg.sent {
    align-self: flex-end;
    background: var(--accent);
    color: white;
    border-bottom-right-radius: 2px;
}

.dm-foot {
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
}

.dm-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    color: white;
    outline: none;
}

.dm-input:focus {
    border-color: var(--accent);
}
