.photo-restoration-body {
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.98), rgba(248, 244, 239, 0.92) 42%, rgba(240, 235, 228, 0.88) 100%);
    color: #1d1d1f;
    margin: 0;
    padding: 0;
    font-family: 'Manrope', sans-serif;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Hide header/footer if they exist in layout */
.photo-restoration-header,
.photo-restoration-footer {
    display: none !important;
}

.eden-back-btn {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(29, 29, 31, 0.1);
    color: #1d1d1f;
    padding: 10px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.eden-back-btn:hover {
    background: rgba(255, 255, 255, 0.9);
}

.pr-workspace {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 0;
    box-sizing: border-box;
    gap: 30px;
}

/* Main Viewport */
.pr-main-view {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pr-zoom-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: 0 0;
}

.pr-main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
    transition: opacity 0.3s, filter 0.3s ease;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}
.pr-main-image.processing {
    opacity: 0.8;
}
.pr-main-view.has-image .pr-main-image {
    display: block;
}

.pr-empty-state {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    cursor: pointer;
}
.pr-main-view.has-image .pr-empty-state {
    display: none;
}

.pr-upload-box {
    width: 320px;
    height: 240px;
    background: transparent;
    border: 2px dashed rgba(29, 29, 31, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.pr-upload-box:hover {
    border-color: rgba(29, 29, 31, 0.6);
    background: rgba(29, 29, 31, 0.03);
}

.pr-upload-placeholder {
    color: rgba(29, 29, 31, 0.5);
    font-weight: 500;
    font-size: 16px;
}

/* Bottom Controls */
.pr-controls {
    position: absolute;
    bottom: 40px;
    left: 40px;
    right: 40px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none; /* Let clicks pass through to the image */
}

.pr-controls-left, .pr-controls-right, .pr-dock-container {
    pointer-events: auto; /* Re-enable clicks for actual UI elements */
}

.pr-controls-left {
    display: flex;
    gap: 20px;
}

.pr-mode-select {
    appearance: none;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(29, 29, 31, 0.1);
    border-radius: 12px;
    padding: 10px 36px 10px 16px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%231d1d1f%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 14px top 50%;
    background-size: 10px auto;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.pr-mode-select:hover {
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.pr-mode-select:focus {
    outline: none;
    border-color: #1d1d1f;
}

.pr-controls-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pr-status-text {
    font-size: 14px;
    font-weight: 500;
    color: rgba(29, 29, 31, 0.6);
}

.pr-btn-run, .pr-btn-download, .pr-btn-run-all {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(29, 29, 31, 0.1);
    color: #1d1d1f;
    padding: 12px 28px;
    border-radius: 999px;
    font-weight: 700;
    font-family: inherit;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.pr-btn-run:hover, .pr-btn-download:hover, .pr-btn-run-all:hover {
    transform: scale(1.05);
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}
.pr-btn-run:disabled, .pr-btn-run-all:disabled {
    background: rgba(255, 255, 255, 0.5);
    color: rgba(29, 29, 31, 0.4);
    border-color: transparent;
    backdrop-filter: blur(10px);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* macOS Dock styles */
.pr-dock-container {
    display: flex;
    align-items: flex-end;
    transition: opacity 0.3s, transform 0.3s;
    /* Removed absolute positioning so it acts as the center flex item */
}

.pr-dock-container.d-none {
    display: none;
}

.pr-dock-item-wrap {
    padding: 0 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
    transform-origin: bottom center;
}

.pr-dock-item {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: #f0f0f0;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pr-dock-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pr-dock-item.active {
    border-color: #1d1d1f;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Dock Hover Magnification */
.pr-dock-item-wrap:hover {
    transform: scale(1.4) translateY(-10px);
    z-index: 2;
}
.pr-dock-item-wrap:hover .pr-dock-item {
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Adjacent sibling scaling approx */
.pr-dock-item-wrap:hover + .pr-dock-item-wrap,
.pr-dock-item-wrap:has(+ .pr-dock-item-wrap:hover) {
    transform: scale(1.15) translateY(-5px);
    z-index: 1;
}

.d-none {
    display: none !important;
}

/* Result Overlay */
.pr-result-overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none;
}
.pr-result-overlay.active {
    display: flex;
}
.pr-result-overlay img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.pr-spoiler-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.5s ease;
}

@media (max-width: 768px) {
    .pr-workspace {
        padding: 0;
    }
    
    .pr-controls {
        bottom: 24px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .pr-dock-container {
        order: 1; /* Top */
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 8px;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .pr-dock-container::-webkit-scrollbar {
        display: none;
    }
    
    .pr-dock-container::before,
    .pr-dock-container::after {
        content: '';
        flex: 0 0 10px;
    }
    
    .pr-controls-left {
        order: 2; /* Middle */
        flex-direction: column;
        gap: 12px;
        padding: 0 16px;
    }
    
    .pr-controls-right {
        order: 3; /* Bottom */
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 12px;
        padding: 16px 0 24px 0; /* vertical only */
        margin: -16px 0 -24px 0; /* vertical only */
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .pr-controls-right::-webkit-scrollbar {
        display: none;
    }
    
    .pr-controls-right::before,
    .pr-controls-right::after {
        content: '';
        flex: 0 0 4px;
    }
    
    .pr-btn-run, .pr-btn-download, .pr-btn-run-all {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}
