:root {
    --bg-primary: #0f1117;
    --bg-secondary: #171b26;
    --bg-card: #1f2433;
    --bg-input: #131722;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent-color: #6366f1;
    --accent-hover: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.35);
    --success: #10b981;
    --danger: #ef4444;
    --border-color: #2e384d;
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header */
header {
    background: rgba(23, 27, 38, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--accent-color), #ec4899);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.logo-icon svg {
    width: 22px;
    height: 22px;
    fill: white;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.badge {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    margin-left: 6px;
}

/* Main Container */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem 1.5rem;
    width: 100%;
    flex: 1;
}

/* Input Section */
.hero-section {
    text-align: center;
    margin-bottom: 2.5rem;
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #ffffff 40%, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto 1.75rem auto;
}

.input-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 2.5rem;
}

.input-group {
    display: flex;
    gap: 12px;
}

.input-box {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.input-box:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn {
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: #283042;
    box-shadow: none;
}

.sample-links {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.sample-btn {
    background: none;
    border: none;
    color: #818cf8;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.85rem;
}

.sample-btn:hover {
    color: white;
}

/* Player Area */
.player-container {
    display: none;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.video-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    aspect-ratio: 16 / 9;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Plyr Customization Overrides */
.plyr--video {
    border-radius: 0;
}
.plyr--full-ui input[type=range] {
    color: var(--accent-color);
}
.plyr__control--overlaid {
    background: var(--accent-color);
}
.plyr--video .plyr__control.plyr__tab-focus,
.plyr--video .plyr__control:hover,
.plyr--video .plyr__control[aria-expanded=true] {
    background: var(--accent-color);
}

/* Meta Details Card */
.video-meta-bar {
    padding: 1.25rem 1.5rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.video-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.video-subtext {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Action Grids */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.25rem;
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.card-header svg {
    width: 20px;
    height: 20px;
    stroke: var(--accent-color);
}

.code-field {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.code-text {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    color: #e2e8f0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.copy-btn:hover {
    background: var(--accent-color);
}

/* Shortcut keys grid */
.shortcut-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.shortcut-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 6px 10px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.key {
    background: #2a3142;
    border: 1px solid #475569;
    color: #f8fafc;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: monospace;
    font-weight: 700;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--success);
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    font-size: 0.9rem;
    font-weight: 600;
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Standalone Player page styling */
.standalone-body {
    background: #000;
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.standalone-wrapper {
    width: 100%;
    height: 100%;
}

.standalone-wrapper .plyr {
    width: 100%;
    height: 100%;
}

/* In-Player Video Ad Layer */
.inplayer-ad-layer {
    position: absolute;
    inset: 0;
    z-index: 80;
    background: #000;
    display: none;
    flex-direction: column;
    justify-content: space-between;
}

.inplayer-ad-video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.inplayer-ad-top {
    position: relative;
    z-index: 10;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, rgba(0,0,0,0.75) 0%, transparent 100%);
}

.ad-pill-badge {
    background: #f59e0b;
    color: #000;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.inplayer-ad-bottom {
    position: relative;
    z-index: 10;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, transparent 100%);
}

.ad-sponsor-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ad-sponsor-btn:hover {
    background: white;
    color: black;
}

.ad-skip-btn {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ad-skip-btn:not(:disabled) {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.ad-skip-btn:not(:disabled):hover {
    background: var(--accent-hover);
    transform: scale(1.03);
}

.ad-skip-btn:disabled {
    opacity: 0.85;
    cursor: default;
}

/* In-Player Overlay Banner (Bottom of Video) */
.inplayer-overlay-banner {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    max-width: 90%;
    box-shadow: 0 12px 30px rgba(0,0,0,0.6);
    animation: slideUpAd 0.4s ease forwards;
}

@keyframes slideUpAd {
    from { opacity: 0; transform: translate(-50%, 20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.overlay-banner-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.overlay-banner-content {
    flex: 1;
    overflow: hidden;
}

.overlay-banner-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.overlay-banner-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.overlay-banner-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 8px;
}

.overlay-banner-close:hover {
    color: white;
}

/* Dynamic In-Player Watermark (Still & Floating) */
.dynamic-watermark {
    position: absolute;
    z-index: 45;
    pointer-events: none;
    user-select: none;
    transition: opacity 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dynamic-watermark.text-badge {
    padding: 5px 12px;
    border-radius: 6px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0,0,0,0.4);
    letter-spacing: 0.3px;
}

.dynamic-watermark.top-right {
    top: 20px;
    right: 20px;
}

.dynamic-watermark.top-left {
    top: 20px;
    left: 20px;
}

.dynamic-watermark.bottom-right {
    bottom: 60px;
    right: 20px;
}

.dynamic-watermark.bottom-left {
    bottom: 60px;
    left: 20px;
}

.dynamic-watermark.center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .inplayer-overlay-banner {
        width: 95%;
        bottom: 50px;
        padding: 8px 10px;
    }
}

/* Modals & Overlays */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
    position: relative;
    animation: modalPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
    padding: 2px 6px;
    border-radius: 4px;
}

.close-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
    box-sizing: border-box;
}

.form-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ============================================================== */
/* 🛑 DRM ANTI-SCREEN RECORDING & SCREENSHOT BLACKOUT SHIELD       */
/* ============================================================== */
.drm-blackout-shield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000000 !important;
    z-index: 9999999 !important;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.5rem;
    box-sizing: border-box;
    user-select: none;
    pointer-events: all;
}

.drm-blackout-shield.active {
    display: flex !important;
}

.drm-shield-box {
    max-width: 600px;
    background: #09090b;
    border: 2px solid #ef4444;
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: 0 0 50px rgba(239, 68, 68, 0.4);
    text-align: center;
}

.drm-shield-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: drmPulse 1.2s infinite ease-in-out;
}

@keyframes drmPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(239,68,68,0.7)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 25px rgba(239,68,68,1)); }
}

.drm-shield-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ef4444;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.drm-shield-message {
    color: #f8fafc;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.drm-shield-student {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    display: inline-block;
}

.drm-shield-sub {
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* ============================================================== */
/* ⏱️ IDLE INACTIVITY POPUP MODAL                                  */
/* ============================================================== */
.idle-modal-card {
    background: #0f172a !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9) !important;
    text-align: center;
    padding: 2.5rem 2rem !important;
    max-width: 480px !important;
}

.idle-pulse-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    display: inline-block;
    animation: idleBounce 2s infinite ease-in-out;
}

@keyframes idleBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.idle-modal-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
    margin-bottom: 10px;
}

.idle-modal-desc {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.75rem;
}

.idle-resume-btn {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 1.05rem;
    font-weight: 700;
    box-shadow: 0 6px 20px var(--accent-glow);
}


