:root {
    --detail-primary: #5b4bdb;
    --detail-primary-dark: #4334b3;
    --detail-navy: #15213d;
    --detail-text: #27324a;
    --detail-muted: #737d91;
    --detail-border: #e4e7ef;
    --detail-background: #f6f7fb;
    --detail-white: #ffffff;
    --detail-success: #14815d;
    --detail-success-bg: #e2f7ef;
    --detail-danger: #dc3545;
    --detail-danger-dark: #bb2433;
    --detail-danger-bg: #fff0f1;
    --detail-shadow: 0 10px 30px rgba(29, 39, 68, 0.08);
}

.video-detail-page {
    min-height: 100vh;
    padding: 42px 20px 80px;
    color: var(--detail-text);
    background:
        radial-gradient(
            circle at 80% 10%,
            rgba(91, 75, 219, 0.08),
            transparent 28%
        ),
        var(--detail-background);
}

.video-detail-container {
    width: min(1060px, 100%);
    margin: 0 auto;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 22px;
    color: var(--detail-muted);
    font-size: 0.86rem;
}

.breadcrumb a {
    color: var(--detail-primary);
    font-weight: 600;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--detail-primary-dark);
}

.video-detail-message {
    margin: 0 0 22px;
    padding: 14px 17px;
    color: #126847;
    background: #e5f8ef;
    border: 1px solid #bde9d4;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
}

.video-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 26px;
}

.video-detail-heading {
    min-width: 0;
}

.video-detail-header h1 {
    margin: 0 0 17px;
    color: var(--detail-navy);
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.video-meta__item {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 12px;
    color: var(--detail-muted);
    background: var(--detail-white);
    border: 1px solid var(--detail-border);
    border-radius: 999px;
    font-size: 0.79rem;
    line-height: 1.5;
}

.video-meta__access {
    color: #8b5c08;
    background: #fff7e6;
    border-color: #f2dfb8;
    font-weight: 600;
}

.video-meta__access--public {
    color: var(--detail-success);
    background: var(--detail-success-bg);
    border-color: #c7ebdd;
}

.video-meta__approval {
    color: #9a5c00;
    background: #fff4d8;
    border-color: #f0d797;
    font-weight: 700;
}

.back-to-videos {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: var(--detail-primary);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.back-to-videos:hover {
    color: var(--detail-primary-dark);
    transform: translateX(3px);
}

/* بخش مدیریت */

.video-management {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
    padding: 18px 20px;
    background: var(--detail-white);
    border: 1px solid var(--detail-border);
    border-radius: 16px;
    box-shadow: var(--detail-shadow);
}

.video-management__info {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.video-management__icon {
    display: grid;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    place-items: center;
    color: var(--detail-primary);
    background: #efedff;
    border-radius: 12px;
    font-size: 1.1rem;
}

.video-management__info div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}

.video-management__info strong {
    color: var(--detail-navy);
    font-size: 0.9rem;
}

.video-management__info small {
    color: var(--detail-muted);
    font-size: 0.74rem;
    line-height: 1.8;
}

.video-management__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.video-action-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 15px;
    border-radius: 11px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.video-action-button:hover {
    transform: translateY(-1px);
}

.video-action-button--edit {
    color: #ffffff;
    background: var(--detail-primary);
    border: 1px solid var(--detail-primary);
}

.video-action-button--edit:hover {
    color: #ffffff;
    background: var(--detail-primary-dark);
    border-color: var(--detail-primary-dark);
}

.video-action-button--delete {
    color: var(--detail-danger);
    background: var(--detail-danger-bg);
    border: 1px solid #f4c9ce;
}

.video-action-button--delete:hover {
    color: #ffffff;
    background: var(--detail-danger);
    border-color: var(--detail-danger);
}

/* پخش‌کننده */

.video-player-card {
    overflow: hidden;
    margin-bottom: 22px;
    background:
        radial-gradient(
            circle at center,
            #202342,
            #0c1021 70%
        );
    border: 1px solid rgba(20, 27, 54, 0.12);
    border-radius: 20px;
    box-shadow: 0 18px 45px rgba(17, 23, 48, 0.18);
}

.video-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #090d1b;
    object-fit: contain;
}

.video-file-missing {
    display: grid;
    min-height: 360px;
    place-items: center;
    color: #cbd0df;
    font-size: 0.9rem;
}

/* توضیحات */

.video-description-card {
    margin-bottom: 38px;
    padding: 27px 30px;
    background: var(--detail-white);
    border: 1px solid var(--detail-border);
    border-radius: 16px;
    box-shadow: var(--detail-shadow);
}

.video-description-card h2 {
    position: relative;
    margin: 0 0 14px;
    padding-right: 16px;
    color: var(--detail-navy);
    font-size: 1.25rem;
}

.video-description-card h2::before {
    position: absolute;
    top: 4px;
    right: 0;
    width: 5px;
    height: 22px;
    background: var(--detail-primary);
    border-radius: 999px;
    content: "";
}

.video-description {
    color: #59647a;
    font-size: 0.96rem;
    line-height: 2.1;
}

.video-description p {
    margin: 0;
}

.video-description p + p {
    margin-top: 12px;
}

.video-description--empty {
    color: var(--detail-muted);
}

/* پنجره حذف */

.video-delete-dialog {
    width: min(92%, 480px);
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 20px;
}

.video-delete-dialog::backdrop {
    background: rgba(13, 20, 42, 0.68);
    backdrop-filter: blur(4px);
}

.video-delete-dialog__content {
    position: relative;
    padding: 34px 30px 28px;
    text-align: center;
    background: #ffffff;
    border: 1px solid #f0d6d9;
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(12, 20, 46, 0.28);
}

.video-delete-dialog__close {
    position: absolute;
    top: 13px;
    left: 13px;
    display: grid;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    color: #70798d;
    background: #f4f5f8;
    border: 0;
    border-radius: 9px;
    font-family: inherit;
    font-size: 1.3rem;
    cursor: pointer;
}

.video-delete-dialog__close:hover {
    color: var(--detail-danger);
    background: var(--detail-danger-bg);
}

.video-delete-dialog__icon {
    display: grid;
    width: 60px;
    height: 60px;
    margin: 0 auto 18px;
    place-items: center;
    color: var(--detail-danger);
    background: var(--detail-danger-bg);
    border: 1px solid #f4c9ce;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 900;
}

.video-delete-dialog h2 {
    margin: 0 0 12px;
    color: var(--detail-navy);
    font-size: 1.35rem;
}

.video-delete-dialog p {
    margin: 0 0 10px;
    color: #4f5a70;
    font-size: 0.9rem;
    line-height: 2;
}

.video-delete-dialog p strong {
    color: var(--detail-navy);
}

.video-delete-dialog small {
    display: block;
    color: #9299a9;
    font-size: 0.74rem;
    line-height: 1.8;
}

.video-delete-dialog__actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
}

.video-delete-dialog__actions form {
    margin: 0;
}

.video-confirm-delete,
.video-cancel-delete {
    min-height: 43px;
    padding: 9px 17px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
}

.video-confirm-delete {
    color: #ffffff;
    background: var(--detail-danger);
    border: 1px solid var(--detail-danger);
}

.video-confirm-delete:hover {
    background: var(--detail-danger-dark);
    border-color: var(--detail-danger-dark);
}

.video-cancel-delete {
    color: #4f5a70;
    background: #ffffff;
    border: 1px solid #dce0e9;
}

.video-cancel-delete:hover {
    color: var(--detail-navy);
    background: #f5f6fa;
}

/* دسترس‌پذیری */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

/* واکنش‌گرا */

@media (max-width: 800px) {
    .video-detail-page {
        padding-top: 30px;
    }

    .video-detail-header {
        flex-direction: column;
        gap: 16px;
    }

    .back-to-videos {
        margin-top: 0;
    }

    .video-management {
        align-items: stretch;
        flex-direction: column;
    }

    .video-management__actions {
        width: 100%;
    }

    .video-action-button {
        flex: 1;
    }

    .video-description-card {
        padding: 23px;
    }
}

@media (max-width: 560px) {
    .video-detail-page {
        padding: 24px 14px 55px;
    }

    .breadcrumb {
        font-size: 0.78rem;
    }

    .video-detail-header h1 {
        font-size: 1.65rem;
    }

    .video-meta {
        gap: 7px;
    }

    .video-meta__item {
        min-height: 31px;
        padding: 5px 9px;
        font-size: 0.72rem;
    }

    .video-management {
        padding: 16px;
    }

    .video-management__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .video-player-card {
        border-radius: 13px;
    }

    .video-file-missing {
        min-height: 230px;
    }

    .video-description-card {
        margin-bottom: 30px;
        padding: 20px 18px;
        border-radius: 13px;
    }

    .video-description-card h2 {
        font-size: 1.1rem;
    }

    .video-delete-dialog__content {
        padding: 31px 20px 23px;
    }

    .video-delete-dialog__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .video-delete-dialog__actions form,
    .video-confirm-delete,
    .video-cancel-delete {
        width: 100%;
    }
}