.p371-media-box {
    position: relative;
    max-width: 100%;
    margin: 20px auto;
}

.p371-pdf-box,
.custom-pdf-box {
    position: relative;
    width: 100%;
    min-height: 400px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.p371-pdf-box.p371-pdf-box-auto,
.custom-pdf-box.p371-pdf-box-auto,
.p371-pdf-box.p371-pdf-box-viewer,
.custom-pdf-box.p371-pdf-box-viewer {
    min-height: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    display: flex;
    justify-content: center;
}

.p371-pdf-box iframe,
.custom-pdf-box iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 600px;
    border: none;
    background: #f1f5f9;
}

.video-tracker-container,
.p371-video-container {
    position: relative;
    max-width: 100%;
    margin: 20px auto;
    border-radius: 8px;
    overflow: hidden;
    background: #000000;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

.video-tracker-container .video-js {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

.video-tracker-notice,
.p371-notice {
    padding: 14px 18px;
    border-radius: 6px;
    margin: 16px 0;
    font-size: 14px;
    line-height: 1.5;
}

.video-tracker-notice p,
.p371-notice p {
    margin: 0;
}

.p371-notice-warning {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

.p371-notice-error {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.p371-notice-info {
    background: #f0f9ff;
    border-left: 4px solid #0ea5e9;
    color: #0369a1;
}

.video-timestamp-list {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 16px 20px;
    max-height: 240px;
    overflow-y: auto;
}

.video-timestamp-list h4 {
    margin: 0 0 12px 0;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.video-timestamp-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.video-timestamp-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    color: #334155;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.video-timestamp-item:hover,
.video-timestamp-item:focus {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
    text-decoration: none;
}

.video-timestamp-item .timestamp {
    font-family: monospace;
    font-weight: 600;
    color: #2563eb;
    background: #dbeafe;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.video-timestamp-item:hover .timestamp {
    background: #2563eb;
    color: #ffffff;
}

.video-timestamp-label {
    flex: 1;
}

.video-js .custom-marker,
.p371-vjs-marker {
    position: absolute;
    top: 0;
    width: 3px;
    height: 100%;
    background: #f59e0b;
    cursor: pointer;
    z-index: 10;
    border-radius: 2px;
    transition: all 0.2s ease;
    pointer-events: auto;
}

.video-js .custom-marker:hover,
.p371-vjs-marker:hover {
    width: 5px;
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.7);
}

.video-js .custom-marker.active {
    width: 4px;
    background: #dc2626;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.8);
}

.video-js .custom-marker:focus {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
}

.video-js .custom-marker::after {
    content: attr(data-label);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    margin-bottom: 8px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 20;
}

.video-js .custom-marker:hover::after,
.video-js .custom-marker:focus::after {
    opacity: 1;
}

.video-js .vjs-progress-control:hover .custom-marker {
    opacity: 0.85;
}

.p371-image-box img {
    user-select: none;
    -webkit-user-drag: none;
}

@media (max-width: 768px) {
    .video-timestamp-list {
        padding: 12px;
        max-height: 200px;
    }

    .video-timestamp-item {
        padding: 6px 10px;
        font-size: 12px;
    }

    .custom-pdf-box,
    .p371-pdf-box {
        min-height: 400px;
    }

    .custom-pdf-box.p371-pdf-box-auto,
    .p371-pdf-box.p371-pdf-box-auto {
        min-height: 0;
    }

    .custom-pdf-box iframe,
    .p371-pdf-box iframe {
        min-height: 450px;
    }
}

.video-tracker-caption,
.p371-video-caption {
    padding: 12px 18px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.p371-gms-downloads-accordion {
    width: 100%;
    max-width: 100%;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
}

.p371-gms-downloads-accordion * {
    box-sizing: border-box;
}

.p371-gms-downloads-main-title {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.p371-gms-accordion-group {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.p371-gms-accordion-group.p371-gms-active {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.p371-gms-accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: #f8fafc;
    border: none;
    border-bottom: 1px solid transparent;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease;
}

.p371-gms-accordion-group.p371-gms-active .p371-gms-accordion-header {
    background: #f1f5f9;
    border-bottom-color: #e2e8f0;
}

.p371-gms-accordion-header:hover {
    background: #edf2f7;
}

.p371-gms-header-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
}

.p371-gms-folder-icon,
.p371-gms-lock-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #e0f2fe;
    color: #0284c7;
    flex-shrink: 0;
}

.p371-gms-header-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.p371-gms-group-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.p371-gms-group-desc {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.p371-gms-chevron-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.p371-gms-accordion-group.p371-gms-active .p371-gms-chevron-icon {
    transform: rotate(180deg);
}

.p371-gms-accordion-body {
    padding: 0;
}

.p371-gms-accordion-content {
    display: flex;
    flex-direction: column;
}

.p371-gms-download-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 18px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

.p371-gms-download-row:last-child {
    border-bottom: none;
}

.p371-gms-download-row:hover {
    background: #f8fafc;
}

.p371-gms-file-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
}

.p371-gms-file-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    flex-shrink: 0;
}

.p371-gms-type-pdf .p371-gms-file-icon {
    background: #fee2e2;
    color: #dc2626;
}

.p371-gms-type-video .p371-gms-file-icon {
    background: #ede9fe;
    color: #7c3aed;
}

.p371-gms-type-audio .p371-gms-file-icon {
    background: #fef3c7;
    color: #d97706;
}

.p371-gms-type-archive .p371-gms-file-icon {
    background: #fef9c3;
    color: #ca8a04;
}

.p371-gms-type-doc .p371-gms-file-icon {
    background: #dbeafe;
    color: #2563eb;
}

.p371-gms-type-spreadsheet .p371-gms-file-icon {
    background: #dcfce7;
    color: #16a34a;
}

.p371-gms-type-presentation .p371-gms-file-icon {
    background: #ffedd5;
    color: #ea580c;
}

.p371-gms-type-image .p371-gms-file-icon {
    background: #f0fdf4;
    color: #15803d;
}

.p371-gms-file-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.p371-gms-file-title {
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
    word-break: break-word;
}

.p371-gms-file-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
    flex-wrap: wrap;
}

.p371-gms-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    background: #e2e8f0;
    color: #475569;
}

.p371-gms-badge-ext {
    background: #e0e7ff;
    color: #4338ca;
}

.p371-gms-badge-size {
    background: #f1f5f9;
    color: #64748b;
}

.p371-gms-badge-rem,
.p371-gms-badge-exp {
    background: #fef3c7;
    color: #92400e;
}

.p371-gms-badge-locked {
    background: #fee2e2;
    color: #b91c1c;
}

.p371-gms-file-right {
    flex-shrink: 0;
}

.p371-gms-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    background: #2563eb;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    transition: background 0.15s ease, transform 0.1s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.p371-gms-download-btn:hover {
    background: #1d4ed8;
    color: #ffffff !important;
}

.p371-gms-download-btn:active {
    transform: scale(0.97);
}

.p371-gms-btn-icon svg {
    display: block;
}

.p371-gms-accordion-empty {
    padding: 24px;
    text-align: center;
    color: #64748b;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
}

.p371-gms-theme-dark .p371-gms-accordion-group {
    background: #1e293b;
    border-color: #334155;
}

.p371-gms-theme-dark .p371-gms-accordion-header {
    background: #0f172a;
}

.p371-gms-theme-dark .p371-gms-group-title {
    color: #f1f5f9;
}

.p371-gms-theme-dark .p371-gms-download-row {
    border-bottom-color: #334155;
}

.p371-gms-theme-dark .p371-gms-file-title {
    color: #f8fafc;
}

@media (max-width: 640px) {
    .p371-gms-download-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px 14px;
    }

    .p371-gms-download-btn {
        width: 100%;
        padding: 10px;
    }
}

.p371-gms-bulk-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.p371-gms-bulk-left {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.p371-gms-select-all-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.p371-gms-select-all-checkbox,
.p371-gms-item-checkbox {
    width: 17px;
    height: 17px;
    border-radius: 4px;
    border: 1.5px solid #94a3b8;
    cursor: pointer;
    margin: 0;
    accent-color: #2563eb;
    transition: all 0.15s ease;
}

.p371-gms-select-all-text {
    font-size: 13.5px;
    font-weight: 600;
}

.p371-gms-selected-count-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 12px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.p371-gms-bulk-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.p371-gms-bulk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.p371-gms-bulk-btn-icon svg {
    display: block;
    width: 15px;
    height: 15px;
}

.p371-gms-btn-selected {
    background: #2563eb;
    color: #ffffff;
    border-color: #1d4ed8;
}

.p371-gms-btn-selected:hover:not(:disabled) {
    background: #1d4ed8;
}

.p371-gms-btn-selected:disabled {
    background: #94a3b8;
    border-color: #94a3b8;
    color: #f1f5f9;
    cursor: not-allowed;
    opacity: 0.65;
}

.p371-gms-btn-all {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.p371-gms-btn-all:hover:not(:disabled) {
    background: #1e293b;
    border-color: #1e293b;
}

.p371-gms-btn-all:disabled {
    background: #94a3b8;
    border-color: #94a3b8;
    color: #f1f5f9;
    cursor: not-allowed;
    opacity: 0.65;
}

.p371-gms-row-select {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-right: 6px;
    flex-shrink: 0;
}

.p371-gms-download-row.p371-gms-row-selected {
    background: #eff6ff;
}

.p371-gms-theme-dark .p371-gms-bulk-bar {
    background: #1e293b;
    border-color: #334155;
}

.p371-gms-theme-dark .p371-gms-select-all-text {
    color: #f1f5f9;
}

.p371-gms-theme-dark .p371-gms-selected-count-badge {
    background: #1e3a8a;
    color: #93c5fd;
}

.p371-gms-theme-dark .p371-gms-btn-all {
    background: #334155;
    border-color: #475569;
    color: #ffffff;
}

.p371-gms-theme-dark .p371-gms-btn-all:hover:not(:disabled) {
    background: #475569;
}

.p371-gms-theme-dark .p371-gms-download-row.p371-gms-row-selected {
    background: rgba(30, 58, 138, 0.2);
}

@media (max-width: 640px) {
    .p371-gms-bulk-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .p371-gms-bulk-left {
        justify-content: space-between;
    }

    .p371-gms-bulk-actions {
        flex-direction: column;
        width: 100%;
    }

    .p371-gms-bulk-btn {
        width: 100%;
        padding: 10px;
    }
}



