

.pv-page {
    margin-top: 60px;
    padding-top: 60px !important;
    padding-bottom: 48px;
}

.pv-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--brd);
}

.pv-page-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pv-page-title i {
    color: var(--blue);
    width: 22px;
    height: 22px;
}

.pv-page-title h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--txt);
    margin: 0;
}

.res-label {
    font-size: 13px;
    color: var(--txt2);
    font-weight: 500;
}

.res-label span {
    color: var(--cyan);
    font-weight: 700;
}

.pv-main {
    display: grid;
    grid-template-columns: 300px 1fr 320px;
    gap: 16px;
    min-height: 600px;
}

.pv-left {
    background: var(--card);
    border: 1px solid var(--brd);
    border-radius: var(--r);
    padding: 16px;
    overflow-y: auto;
    max-height: 75vh;
}

.pv-left::-webkit-scrollbar {
    width: 4px;
}

.pv-left::-webkit-scrollbar-track {
    background: transparent;
}

.pv-left::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, .2);
    border-radius: 4px;
}

.dev-section {
    margin-bottom: 20px;
}

.dev-section:last-child {
    margin-bottom: 0;
}

.dev-section h3 {
    font-size: 13px;
    font-weight: 700;
    color: var(--txt2);
    margin-bottom: 8px;
    padding-right: 2px;
}

.dev-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dev-btn {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 8px;
    padding: 7px 14px;
    color: var(--txt);
    font-family: 'Tajawal', sans-serif;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--t);
    white-space: nowrap;
}

.dev-btn:hover {
    border-color: rgba(245, 158, 11, .3);
    background: var(--surface2);
}

.dev-btn.on {
    background: rgba(245, 158, 11, .12);
    border-color: var(--blue);
    color: var(--cyan);
    box-shadow: 0 0 8px rgba(245, 158, 11, .15);
}

.pv-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.pv-drop {
    width: 100%;
    background: var(--card);
    border: 2px dashed var(--brd);
    border-radius: var(--r);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 300ms ease;
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.pv-drop:hover {
    border-color: var(--blue);
    background: rgba(245, 158, 11, .02);
}

.pv-drop.drag-over {
    border-color: var(--blue);
    background: rgba(245, 158, 11, .05);
    box-shadow: 0 0 24px rgba(245, 158, 11, .08);
}

.pv-drop.has-content {
    border: 1px solid var(--brd);
    cursor: default;
}

.pv-drop .drop-icon {
    color: var(--blue);
    opacity: .5;
}

.pv-drop .drop-text {
    font-size: 14px;
    color: var(--txt2);
    text-align: center;
}

.pv-drop .drop-text strong {
    color: var(--blue);
    display: block;
    font-size: 15px;
    margin-bottom: 4px;
}

.pv-drop .drop-formats {
    font-size: 11px;
    color: var(--txt3);
}

.pv-canvas-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pv-canvas-wrap canvas,
.pv-canvas-wrap video,
.pv-canvas-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.pv-colors {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pv-color {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--t);
}

.pv-color:hover {
    transform: scale(1.12);
}

.pv-color.on {
    border-color: var(--blue);
    box-shadow: 0 0 8px rgba(245, 158, 11, .3);
}

.pv-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    max-height: 75vh;
}

.pv-right::-webkit-scrollbar {
    width: 4px;
}

.pv-right::-webkit-scrollbar-track {
    background: transparent;
}

.pv-right::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, .2);
    border-radius: 4px;
}

.info-section {
    background: var(--card);
    border: 1px solid var(--brd);
    border-radius: var(--r);
    padding: 14px;
}

.info-section h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--txt2);
    margin-bottom: 10px;
}

.meta-block {
    background: rgba(0, 0, 0, .3);
    border-radius: 8px;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--txt2);
    direction: ltr;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 300px;
    overflow-y: auto;
    line-height: 1.6;
}

.meta-block .key {
    color: var(--cyan);
}

.meta-block .val {
    color: var(--txt);
}

.info-thumb {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.info-thumb .placeholder {
    color: var(--txt3);
    font-size: 13px;
    text-align: center;
}

.frame-list {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.frame-item {
    font-size: 12px;
    color: var(--txt2);
    padding: 6px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, .2);
    direction: ltr;
    text-align: left;
    font-family: 'Courier New', monospace;
}

.pv-empty-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--txt3);
    font-size: 13px;
    text-align: center;
    background: var(--card);
    border: 1px solid var(--brd);
    border-radius: var(--r);
    padding: 40px 16px;
}

/* =============================================
   MOBILE RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .pv-page {
        margin-top: 50px;
        padding-top: 16px !important;
        padding-bottom: 90px;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .pv-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin-bottom: 12px;
        padding-bottom: 12px;
    }
    .pv-page-title h1 {
        font-size: 17px;
    }
    .res-label {
        font-size: 11px;
    }

    /* Stack everything vertically */
    .pv-main {
        display: flex;
        flex-direction: column;
        gap: 12px;
        min-height: auto;
    }

    /* Device selector — collapsible horizontal scroll */
    .pv-left {
        max-height: none;
        padding: 12px;
        overflow: visible;
    }
    .dev-section {
        margin-bottom: 12px;
    }
    .dev-section h3 {
        font-size: 12px;
        margin-bottom: 6px;
    }
    .dev-grid {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 6px;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }
    .dev-grid::-webkit-scrollbar {
        height: 0;
        display: none;
    }
    .dev-btn {
        padding: 5px 10px;
        font-size: 11px;
        flex-shrink: 0;
    }

    /* Upload / Preview area */
    .pv-center {
        gap: 10px;
    }
    .pv-drop {
        min-height: 280px;
    }
    .pv-drop .drop-text {
        font-size: 13px;
    }
    .pv-drop .drop-text strong {
        font-size: 14px;
    }
    .pv-drop .drop-formats {
        font-size: 10px;
        padding: 0 8px;
        text-align: center;
    }

    /* Color picker */
    .pv-colors {
        gap: 6px;
        justify-content: center;
    }
    .pv-color {
        width: 24px;
        height: 24px;
    }

    /* Right panel — below content */
    .pv-right {
        max-height: none;
    }
    .info-thumb {
        aspect-ratio: 16/9;
    }
}

