:root {
    --player-color: #FF9900;
}

/*
 * Do not zero margin/padding on * — this sheet loads after Tailwind (app.css).
 * Tailwind v4 spacing utilities often use :where(), so they lose in cascade to a
 * later * { margin; padding } rule, which breaks the site header/footer layout.
 */
*,
*::before,
*::after {
    box-sizing: border-box;
}
body.player-download-page {
    background-color: #1c1c1c;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #fff;
}
.player-header {
    background-color: #1c1c1c;
    border-bottom: 1px solid #434645;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s;
}
.header-logo:hover {
    opacity: 0.8;
}
.header-logo img {
    height: 60px;
    width: auto;
    max-width: 300px;
    object-fit: contain;
}
@media (max-width: 768px) {
    .player-header {
        padding: 12px 0;
    }
    .header-container {
        padding: 0 15px;
    }
    .header-logo img {
        height: 50px;
        max-width: 250px;
    }
}
@media (max-width: 480px) {
    .player-header {
        padding: 10px 0;
    }
    .header-container {
        padding: 0 10px;
    }
    .header-logo img {
        height: 40px;
        max-width: 200px;
    }
}
@media (max-width: 360px) {
    .header-logo img {
        height: 35px;
        max-width: 180px;
    }
    .footer-logo img {
        height: 30px;
        max-width: 130px;
    }
    .footer-text {
        font-size: 10px;
        padding: 0 5px;
    }
}
.player-footer {
    background-color: #1c1c1c;
    border-top: 1px solid #434645;
    padding: 30px 0;
    margin-top: 40px;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}
.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}
.footer-logo img {
    height: 50px;
    width: auto;
    max-width: 250px;
    object-fit: contain;
    opacity: 0.9;
}
.footer-text {
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}
.footer-text p {
    margin: 0;
}
@media (max-width: 768px) {
    .player-footer {
        padding: 25px 0;
        margin-top: 30px;
    }
    .footer-container {
        padding: 0 15px;
    }
    .footer-content {
        gap: 12px;
    }
    .footer-logo img {
        height: 40px;
        max-width: 200px;
    }
    .footer-text {
        font-size: 12px;
    }
}
@media (max-width: 480px) {
    .player-footer {
        padding: 20px 0;
        margin-top: 20px;
    }
    .footer-container {
        padding: 0 10px;
    }
    .footer-content {
        gap: 10px;
    }
    .footer-logo img {
        height: 35px;
        max-width: 150px;
    }
    .footer-text {
        font-size: 11px;
        padding: 0 5px;
        word-wrap: break-word;
    }
    .footer-text p {
        line-height: 1.4;
    }
}
.ad-banner {
    background-color: #10b981;
    color: #fff;
    padding: 8px 16px;
    text-align: center;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.ad-banner svg {
    width: 16px;
    height: 16px;
}
@media (max-width: 768px) {
    .ad-banner {
        padding: 6px 12px;
        font-size: 11px;
        gap: 4px;
    }
    .ad-banner svg {
        width: 14px;
        height: 14px;
    }
}
@media (max-width: 480px) {
    .ad-banner {
        padding: 4px 8px;
        font-size: 10px;
        gap: 3px;
    }
    .ad-banner svg {
        width: 12px;
        height: 12px;
    }
}
.player-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 20px 20px;
    /* Below site header so in-player ads cannot stack over the header chrome */
    position: relative;
    z-index: 0;
}
.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) {
    .player-main {
        padding: 50px 10px 10px 10px;
    }
    .video-wrapper {
        border-radius: 0;
        margin-bottom: 15px;
        max-height: calc(100vh - 200px);
    }
    .custom-video-player {
        max-height: calc(100vh - 10px);
        min-height: 200px;
        width: 100%;
        max-width: 100vw;
    }
    .custom-video-player video {
        max-height: calc(100vh - 10px);
        width: 100%;
        height: 100%;
        max-width: 100%;
    }
}
/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .custom-video-player {
        max-height: calc(100vh - 10px);
        min-height: 180px;
    }
    .custom-video-player video {
        max-height: calc(100vh - 10px);
    }
}
video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    max-width: 100%;
    box-sizing: border-box;
}
/* Custom Video Player Controls - Monestream Style */
.custom-video-player {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    flex-direction: column;
    overflow: visible;
    box-sizing: border-box;
}
.custom-video-player video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    max-width: 100%;
    box-sizing: border-box;
}

/* Hide all default browser video controls */
.custom-video-player video::-webkit-media-controls {
    display: none !important;
}

.custom-video-player video::-webkit-media-controls-enclosure {
    display: none !important;
}

.custom-video-player video::-webkit-media-controls-panel {
    display: none !important;
}

.custom-video-player video::-webkit-media-controls-play-button {
    display: none !important;
}

.custom-video-player video::-webkit-media-controls-timeline {
    display: none !important;
}

.custom-video-player video::-webkit-media-controls-current-time-display {
    display: none !important;
}

.custom-video-player video::-webkit-media-controls-time-remaining-display {
    display: none !important;
}

.custom-video-player video::-webkit-media-controls-mute-button {
    display: none !important;
}

.custom-video-player video::-webkit-media-controls-volume-slider {
    display: none !important;
}

.custom-video-player video::-webkit-media-controls-fullscreen-button {
    display: none !important;
}

/* Firefox */
.custom-video-player video::-moz-media-controls {
    display: none !important;
}

/* IE/Edge */
.custom-video-player video::-ms-media-controls {
    display: none !important;
}

/* Ensure controls are hidden in fullscreen too */
.custom-video-player:fullscreen video::-webkit-media-controls,
.custom-video-player:-webkit-full-screen video::-webkit-media-controls,
.custom-video-player:-moz-full-screen video::-moz-media-controls,
.custom-video-player:-ms-fullscreen video::-ms-media-controls {
    display: none !important;
}

/* 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: var(--player-color);
    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 set dynamically in view */
}
.play-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}
.play-overlay:hover {
    background: var(--player-color);
    transform: translate(-50%, -50%) scale(1.1);
    /* box-shadow set dynamically in view */
}
.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;
}
/* Loading Indicator */
.seek-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    z-index: 15;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.seek-loading.active {
    display: flex;
}
.seek-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--player-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
@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: var(--player-color);
    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: var(--player-color);
}
.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;
    display: none;
    opacity: 0;
    transition: opacity 0.2s;
}
.volume-control.show-slider .volume-slider {
    display: block;
    opacity: 1;
}
.volume-fill {
    height: 100%;
    background: var(--player-color);
    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: var(--player-color);
    background: #434645;
}
@media (max-width: 768px) {
    .custom-controls {
        padding: 8px 6px 6px;
    }
    .controls-row {
        flex-wrap: wrap;
        gap: 4px;
    }
    .controls-left {
        gap: 2px;
        flex-wrap: wrap;
    }
    .controls-right {
        gap: 2px;
    }
    .control-btn {
        min-width: 32px;
        height: 32px;
        padding: 4px;
    }
    .control-btn svg {
        width: 14px;
        height: 14px;
    }
    .control-btn span {
        font-size: 9px;
    }
    .volume-slider {
        width: 40px;
        height: 4px;
    }
    .time-display {
        font-size: 10px;
        margin: 0 2px;
    }
    .speed-btn {
        padding: 4px 8px;
        font-size: 10px;
        min-width: 38px;
    }
    .speed-options {
        min-width: 60px;
        font-size: 11px;
    }
    .speed-option {
        padding: 5px 10px;
        font-size: 11px;
    }
    .progress-container {
        height: 6px;
        margin-bottom: 8px;
    }
    .progress-scrubber {
        width: 14px;
        height: 14px;
    }
}
@media (max-width: 480px) {
    body.player-download-page {
        padding: 3px;
    }
    .player-main {
        padding: 50px 3px 3px 3px;
    }
    .video-wrapper {
        margin-bottom: 10px;
    }
    .custom-video-player {
        max-height: calc(100vh - 6px);
        min-height: 150px;
        width: 100%;
        max-width: 100vw;
    }
    .custom-video-player video {
        max-height: calc(100vh - 6px);
        width: 100%;
        height: 100%;
        max-width: 100%;
    }
    .custom-controls {
        padding: 6px 4px 4px;
    }
    .controls-row {
        gap: 2px;
    }
    .controls-left {
        gap: 1px;
    }
    .controls-right {
        gap: 1px;
    }
    .control-btn {
        min-width: 28px;
        height: 28px;
        padding: 3px;
    }
    .control-btn svg {
        width: 12px;
        height: 12px;
    }
    .control-btn span {
        font-size: 8px;
    }
    .time-display {
        font-size: 9px;
        margin: 0 1px;
    }
    .volume-slider {
        width: 35px;
        height: 3px;
    }
    .speed-btn {
        padding: 3px 6px;
        font-size: 9px;
        min-width: 32px;
    }
    .speed-options {
        min-width: 55px;
        font-size: 10px;
    }
    .speed-option {
        padding: 4px 8px;
        font-size: 10px;
    }
    .progress-container {
        height: 5px;
        margin-bottom: 6px;
    }
    .progress-scrubber {
        width: 12px;
        height: 12px;
    }
}
/* Video Info Mobile Responsive Styles */
@media (max-width: 768px) {
    .video-info {
        padding: 15px;
        margin-bottom: 15px;
        border-radius: 6px;
    }
    .video-title {
        font-size: 16px;
        margin-bottom: 10px;
    }
    .video-meta {
        gap: 15px;
        margin-bottom: 15px;
        font-size: 12px;
    }
    .video-meta-item {
        gap: 4px;
    }
    .video-meta-item svg {
        width: 14px;
        height: 14px;
    }
    .export-tabs {
        gap: 5px;
        margin-bottom: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    .export-tabs::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    .export-tab {
        padding: 8px 12px;
        font-size: 12px;
        white-space: nowrap;
        flex-shrink: 0;
        background-color: #434645;
        color: #fff;
        border-radius: 6px 6px 0 0;
    }
    .export-tab:hover {
        background-color: #3a3a3a;
    }
    .export-tab.active {
        background-color: #1c1c1c;
        color: var(--player-color);
    }
    .url-field {
        flex-direction: column;
        gap: 8px;
    }
    .url-input {
        padding: 10px;
        font-size: 12px;
        width: 100%;
    }
    .copy-btn {
        padding: 10px 20px;
        font-size: 12px;
        width: 100%;
    }
    .download-btn {
        padding: 14px;
        font-size: 14px;
        margin-top: 15px;
    }
    .embed-code-textarea {
        padding: 10px;
        font-size: 12px;
        min-height: 70px;
    }
    .owner-note {
        font-size: 11px;
        text-align: center;
        margin-top: 8px;
    }
}
@media (max-width: 480px) {
    .video-info {
        padding: 12px;
        margin-bottom: 12px;
        border-radius: 4px;
    }
    .video-title {
        font-size: 14px;
        margin-bottom: 8px;
    }
    .video-meta {
        gap: 8px;
        margin-bottom: 12px;
        font-size: 11px;
        flex-wrap: wrap;
    }
    .video-meta-item {
        gap: 4px;
    }
    .video-meta-item svg {
        width: 12px;
        height: 12px;
    }
    .export-tabs {
        gap: 3px;
        margin-bottom: 10px;
    }
    .export-tab {
        padding: 6px 10px;
        font-size: 11px;
        background-color: #434645;
        color: #fff;
        border-radius: 6px 6px 0 0;
    }
    .export-tab:hover {
        background-color: #3a3a3a;
    }
    .export-tab.active {
        background-color: #1c1c1c;
        color: var(--player-color);
    }
    .url-field {
        gap: 6px;
    }
    .url-input {
        padding: 8px;
        font-size: 11px;
    }
    .copy-btn {
        padding: 8px 16px;
        font-size: 11px;
    }
    .download-btn {
        padding: 12px;
        font-size: 13px;
        margin-top: 12px;
    }
    .embed-code-textarea {
        padding: 8px;
        font-size: 11px;
        min-height: 60px;
    }
    .owner-note {
        font-size: 10px;
        margin-top: 6px;
    }
}
.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;
    flex-wrap: wrap;
    gap: 10px;
}
.video-title > div {
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.video-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    flex-direction: row;
    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: var(--player-color);
}
.export-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    border-bottom: 2px solid #434645;
}
.export-tab {
    padding: 10px 20px;
    background-color: #434645;
    border: none;
    border-radius: 6px 6px 0 0;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}
.export-tab:hover {
    background-color: #3a3a3a;
    color: #fff;
}
.export-tab.active {
    background-color: #1c1c1c;
    color: var(--player-color);
    border-bottom-color: var(--player-color);
}
.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;
    min-width: 0;
    word-break: break-all;
    overflow-wrap: break-word;
}
.url-input:focus {
    outline: none;
    border-color: var(--player-color);
}
.copy-btn {
    padding: 12px 24px;
    background-color: var(--player-color);
    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: var(--player-color);
}
.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: var(--player-color);
    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: var(--player-color);
}
.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: var(--player-color);
}
.lightbulb-icon {
    color: var(--player-color);
    cursor: pointer;
    margin-left: 10px;
}
.report-btn {
    padding: 8px 16px;
    background-color: #dc2626;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
    margin-top: 15px;
}
.report-btn:hover {
    background-color: #b91c1c;
}
#reportModal.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;
}
#reportModal.modal.active {
    display: flex;
}
#reportModal .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;
}
#reportModal .modal-header {
    margin-bottom: 20px;
}
#reportModal .modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 10px;
}
#reportModal .modal-close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    color: #9ca3af;
    cursor: pointer;
    line-height: 20px;
}
#reportModal .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: var(--player-color);
}
.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: var(--player-color);
}
.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: var(--player-color);
}
.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: var(--player-color);
    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 - 300x250 medium rectangle */
.ad-container.ad-banner {
    position: absolute;
    z-index: 100;
    width: 300px;
    height: 250px;
    max-width: 100%;
    max-height: 100%;
    box-sizing: border-box;
    overflow: visible !important;
}

/* Banner Ad Responsive Styles */
.ad-container.ad-banner .ad-content {
    width: 300px;
    height: 250px;
    max-width: 100%;
    max-height: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: visible !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.ad-container.ad-banner .ad-content img,
.ad-container.ad-banner .ad-content picture,
.ad-container.ad-banner .ad-content picture img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: 100% !important;
    height: 100% !important;
    display: block;
    object-fit: contain;
}

.ad-container.ad-banner .ad-content iframe {
    max-width: 100% !important;
    max-height: 100% !important;
    width: 100% !important;
    height: 250px !important;
    min-height: 0;
}

.ad-container.ad-banner .ad-content video {
    max-width: 100% !important;
    max-height: 100% !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
}

.ad-container.ad-banner .ad-content * {
    max-width: 100% !important;
    max-height: 100% !important;
    box-sizing: border-box;
}

.ad-container.ad-banner .ad-content div,
.ad-container.ad-banner .ad-content span,
.ad-container.ad-banner .ad-content a {
    max-width: 100% !important;
    max-height: 100% !important;
}

/* Center position banner - 300x250 */
.ad-container.ad-banner[style*="center"],
.ad-container.ad-banner[style*="translate(-50%, -50%)"] {
    width: 300px !important;
    max-width: 300px !important;
    height: 250px !important;
    max-height: 250px !important;
}

/* Top/Bottom position banner - 300x250 centered */
.ad-container.ad-banner[style*="width: 100%"] {
    width: 300px !important;
    max-width: 300px !important;
    height: 250px !important;
    max-height: 250px !important;
}

/* Banner close button */
.ad-container.ad-banner button {
    position: absolute !important;
    top: 5px !important;
    right: 5px !important;
    z-index: 1001 !important;
    background: var(--player-color) !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Banner "Ad" indicator label */
.banner-ad-indicator {
    position: absolute !important;
    top: 5px !important;
    left: 5px !important;
    z-index: 1001 !important;
    padding: 2px 6px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    color: #fff !important;
    background: rgba(0, 0, 0, 0.75) !important;
    border-radius: 2px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    pointer-events: none !important;
}

/* 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;
    transition: transform 0.3s ease;
}

.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;
    transition: transform 0.3s ease;
}


/* 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: var(--player-color);
    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;
    }
}

