* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    background-color: #434645;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #fff;
}
.ad-banner {
    background-color: #10b981;
    color: #fff;
    padding: 12px 20px;
    text-align: center;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.ad-banner svg {
    width: 20px;
    height: 20px;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
.video-wrapper {
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 100vh;
}
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    .video-wrapper {
        border-radius: 0;
        margin-bottom: 15px;
        max-height: calc(100vh - 200px);
    }
}
video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}
/* Custom Video Player Controls - Monestream Style */
.custom-video-player {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
}
.custom-video-player video {
    width: 100%;
    height: 100%;
    display: block;
}
/* Logo Control */
.logo-control {
    display: flex;
    align-items: center;
    margin-right: 8px;
}
.logo-control img {
    height: 28px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    opacity: 0.9;
    transition: opacity 0.2s;
}
.logo-control:hover img {
    opacity: 1;
}
@media (max-width: 768px) {
    .logo-control {
        margin-right: 4px;
    }
    .logo-control img {
        height: 24px;
        max-width: 100px;
    }
}
@media (max-width: 480px) {
    .logo-control {
        margin-right: 2px;
    }
    .logo-control img {
        height: 20px;
        max-width: 80px;
    }
}
/* Large Centered Play Button Overlay */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: #f90;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    opacity: 1;
    pointer-events: auto;
    box-shadow: 0 4px 15px rgba(255, 153, 0, 0.4);
}
.play-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}
.play-overlay:hover {
    background: #ff9900;
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 153, 0, 0.6);
}
.play-overlay:active {
    transform: translate(-50%, -50%) scale(0.95);
}
.play-overlay svg {
    width: 40px;
    height: 40px;
    fill: #fff;
    margin-left: 4px;
}
.custom-video-player.playing .play-overlay {
    opacity: 0;
    pointer-events: none;
}
@media (max-width: 768px) {
    .play-overlay {
        width: 70px;
        height: 70px;
    }
    .play-overlay svg {
        width: 35px;
        height: 35px;
    }
}
@media (max-width: 480px) {
    .play-overlay {
        width: 60px;
        height: 60px;
    }
    .play-overlay svg {
        width: 30px;
        height: 30px;
    }
}
.custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    padding: 15px 10px 10px;
    opacity: 0;
    transition: opacity 0.3s;
    touch-action: none;
}
.custom-video-player:hover .custom-controls,
.custom-video-player.controls-visible .custom-controls,
.custom-video-player.touching .custom-controls {
    opacity: 1;
}
.progress-container {
    position: relative;
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.2);
    margin-bottom: 10px;
    cursor: pointer;
    border-radius: 3px;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
}
.progress-bar {
    height: 100%;
    background: #f90;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s;
}
.progress-scrubber {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    pointer-events: none;
}
.progress-container:hover .progress-scrubber,
.progress-container.dragging .progress-scrubber {
    display: block;
}
@media (max-width: 768px) {
    .progress-container {
        height: 8px;
        margin-bottom: 12px;
    }
    .progress-scrubber {
        width: 18px;
        height: 18px;
    }
}
.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.controls-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}
.controls-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.control-btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: color 0.2s;
    min-width: 36px;
    height: 36px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.control-btn:hover {
    color: #f90;
}
.control-btn:active {
    transform: scale(0.95);
}
.control-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    pointer-events: none;
}
.time-display {
    color: #fff;
    font-size: 14px;
    font-family: monospace;
    white-space: nowrap;
    margin: 0 5px;
    user-select: none;
}
.volume-control {
    display: flex;
    align-items: center;
    gap: 5px;
}
.volume-slider {
    width: 80px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}
.volume-fill {
    height: 100%;
    background: #f90;
    border-radius: 2px;
    width: 100%;
}
.speed-menu {
    position: relative;
}
.speed-btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px 12px;
    font-size: 14px;
    min-width: 50px;
}
.speed-options {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: #1c1c1c;
    border: 1px solid #434645;
    border-radius: 6px;
    padding: 5px 0;
    margin-bottom: 5px;
    display: none;
    min-width: 80px;
    z-index: 100;
}
.speed-options.show {
    display: block;
}
.speed-option {
    padding: 8px 15px;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}
.speed-option:hover {
    background: #434645;
}
.speed-option.active {
    color: #f90;
    background: #434645;
}
@media (max-width: 768px) {
    .custom-controls {
        padding: 12px 8px 8px;
    }
    .controls-row {
        flex-wrap: wrap;
        gap: 6px;
    }
    .controls-left {
        gap: 4px;
        flex-wrap: wrap;
    }
    .controls-right {
        gap: 4px;
    }
    .control-btn {
        min-width: 40px;
        height: 40px;
        padding: 6px;
    }
    .control-btn svg {
        width: 18px;
        height: 18px;
    }
    .volume-slider {
        width: 50px;
        height: 5px;
    }
    .time-display {
        font-size: 11px;
        margin: 0 3px;
    }
    .speed-btn {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 45px;
    }
    .speed-options {
        min-width: 70px;
        font-size: 12px;
    }
    .speed-option {
        padding: 6px 12px;
        font-size: 12px;
    }
}
@media (max-width: 480px) {
    .container {
        padding: 5px;
    }
    .video-wrapper {
        margin-bottom: 10px;
        max-height: calc(100vh - 150px);
    }
    .custom-controls {
        padding: 10px 6px 6px;
    }
    .controls-left {
        gap: 2px;
    }
    .control-btn {
        min-width: 36px;
        height: 36px;
        padding: 4px;
    }
    .control-btn svg {
        width: 16px;
        height: 16px;
    }
    .time-display {
        font-size: 10px;
        margin: 0 2px;
    }
    .volume-slider {
        width: 40px;
    }
    .speed-btn {
        padding: 4px 8px;
        font-size: 11px;
        min-width: 40px;
    }
}
.video-info {
    background-color: #1c1c1c;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #434645;
}
.video-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.video-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    font-size: 14px;
    color: #9ca3af;
}
.video-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.video-meta-item svg {
    width: 16px;
    height: 16px;
    fill: #f90;
}
.export-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    border-bottom: 2px solid #434645;
}
.export-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}
.export-tab:hover {
    color: #fff;
}
.export-tab.active {
    color: #f90;
    border-bottom-color: #f90;
}
.export-content {
    display: none;
}
.export-content.active {
    display: block;
}
.url-field {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
.url-input {
    flex: 1;
    padding: 12px;
    background-color: #434645;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
}
.url-input:focus {
    outline: none;
    border-color: #f90;
}
.copy-btn {
    padding: 12px 24px;
    background-color: #f90;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}
.copy-btn:hover {
    background-color: #ff9900;
}
.copy-btn.copied {
    background-color: #10b981;
}
.owner-note {
    font-size: 12px;
    color: #6b7280;
    margin-top: 5px;
    text-align: right;
}
.download-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background-color: #f90;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s;
    margin-top: 20px;
}
.download-btn:hover:not(:disabled) {
    background-color: #ff9900;
}
.download-btn:disabled {
    background-color: #666;
    cursor: not-allowed;
    opacity: 0.7;
}
.countdown-text {
    display: inline-block;
    margin-left: 8px;
    font-weight: 500;
}
.embed-code-textarea {
    width: 100%;
    padding: 12px;
    background-color: #434645;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    font-family: monospace;
    resize: vertical;
    min-height: 80px;
}
.embed-code-textarea:focus {
    outline: none;
    border-color: #f90;
}
.lightbulb-icon {
    color: #f90;
    cursor: pointer;
    margin-left: 10px;
}
.report-btn {
    padding: 8px 16px;
    background-color: #f90;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}
.report-btn:hover {
    background-color: #ff9900;
}
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
}
.modal.active {
    display: flex;
}
.modal-content {
    background-color: #1c1c1c;
    border: 1px solid #434645;
    border-radius: 8px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-header {
    margin-bottom: 20px;
}
.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 10px;
}
.modal-close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    color: #9ca3af;
    cursor: pointer;
    line-height: 20px;
}
.modal-close:hover {
    color: #fff;
}
.form-group {
    margin-bottom: 20px;
}
.form-label {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}
.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px;
    background-color: #434645;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #f90;
}
.form-textarea {
    resize: vertical;
    min-height: 100px;
}
.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}
.btn-cancel {
    padding: 12px 24px;
    background-color: #434645;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}
.btn-cancel:hover {
    background-color: #3a3a3a;
}
.btn-submit {
    padding: 12px 24px;
    background-color: #dc2626;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}
.btn-submit:hover:not(:disabled) {
    background-color: #b91c1c;
}
.btn-submit:disabled {
    background-color: #666;
    cursor: not-allowed;
    opacity: 0.7;
}
.captcha-container {
    background-color: #2a2a2a;
    border: 1px solid #434645;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}
.captcha-image-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}
.captcha-image {
    border: 1px solid #434645;
    border-radius: 4px;
    background-color: #1c1c1c;
    width: 150px;
    height: 60px;
    object-fit: contain;
}
.captcha-refresh {
    padding: 10px 15px;
    background-color: #434645;
    color: #fff;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.captcha-refresh:hover {
    background-color: #3a3a3a;
    border-color: #f90;
}
.captcha-refresh svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}
.captcha-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}
.captcha-input {
    flex: 1;
    padding: 12px;
    background-color: #434645;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: #fff;
    font-size: 16px;
    text-align: center;
    font-weight: 600;
}
.captcha-input:focus {
    outline: none;
    border-color: #f90;
}
.alert {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}
.alert-success {
    background-color: #10b981;
    color: #fff;
}
.alert-error {
    background-color: #dc2626;
    color: #fff;
}
.ad-container {
    margin: 20px 0;
}
.ad-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.ad-content-wrapper {
    text-align: center;
    padding: 20px;
    max-width: 90%;
    max-height: 90%;
}
.ad-content {
    margin-bottom: 10px;
}
.ad-link {
    display: inline-block;
}
.ad-link img {
    max-width: 100%;
    height: auto;
}
.skip-ad-btn {
    padding: 8px 16px;
    background-color: #f90;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s;
}
.skip-ad-btn:hover {
    background-color: #ffaa00;
}
/* Ad Container Styles - All ads are inside the video player container */
.ad-container {
    position: absolute;
    pointer-events: auto;
}

/* Popup Ad Styles - Transparent wrapper, ad code handles its own styling */
.popup-ad {
    position: absolute;
    z-index: 999;
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}

/* Roll Ad Styles (pre_roll, mid_roll, post_roll) */
.roll-ad {
    position: absolute;
    z-index: 1000;
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}

/* Banner Ad Styles */
.ad-container.ad-banner {
    position: absolute;
    z-index: 100;
}

/* Social Bar Ad Styles */
.ad-container.ad-social_bar {
    position: absolute;
    z-index: 100;
}

/* Ensure ads work in fullscreen mode */
.custom-video-player:fullscreen .ad-container,
.custom-video-player:-webkit-full-screen .ad-container,
.custom-video-player:-moz-full-screen .ad-container,
.custom-video-player:-ms-fullscreen .ad-container {
    position: absolute;
}

/* Ensure video player container maintains relative positioning in fullscreen */
.custom-video-player:fullscreen,
.custom-video-player:-webkit-full-screen,
.custom-video-player:-moz-full-screen,
.custom-video-player:-ms-fullscreen {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-video-player:fullscreen video,
.custom-video-player:-webkit-full-screen video,
.custom-video-player:-moz-full-screen video,
.custom-video-player:-ms-fullscreen video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 404 Error Overlay */
.error-404-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    pointer-events: none;
}

.error-404-content {
    text-align: center;
    color: #fff;
}

.error-404-number {
    font-size: 120px;
    font-weight: 700;
    line-height: 1;
    color: #f90;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(255, 153, 0, 0.5);
}

.error-404-message {
    font-size: 24px;
    font-weight: 500;
    color: #fff;
    opacity: 0.9;
    margin-bottom: 15px;
}

.error-404-submessage {
    font-size: 16px;
    font-weight: 400;
    color: #9ca3af;
    opacity: 0.8;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .error-404-number {
        font-size: 80px;
        margin-bottom: 15px;
    }
    .error-404-message {
        font-size: 18px;
        margin-bottom: 12px;
    }
    .error-404-submessage {
        font-size: 14px;
        max-width: 400px;
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .error-404-number {
        font-size: 60px;
        margin-bottom: 10px;
    }
    .error-404-message {
        font-size: 16px;
        margin-bottom: 10px;
    }
    .error-404-submessage {
        font-size: 12px;
        max-width: 300px;
        padding: 0 15px;
    }
}

