.pst-container {
    background: none;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.pst-window {
    width: 90vw;
    max-width: 900px;
    background: #FFFFFF;
    border-radius: 20px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.pst-header {
    background: #282828;
    color: #FFFFFF;
    padding: 15px;
    text-align: center;
    border-radius: 20px 20px 0 0;
    position: relative;
}

.pst-header h1 {
    margin: 0;
    font-size: 24px;
    color: #FFFFFF;
}

.pst-traffic-lights {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
}

.pst-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.red { background: #ff5f57; }
.yellow { background: #ffbc2f; }
.green { background: #28c941; }

.pst-content {
    padding: 20px;
    background: #FFFFFF;
    border-radius: 0 0 20px 20px;
}

.upload-section {
    margin-bottom: 20px;
    text-align: center;
    padding: 20px;
    border: 2px dashed #ccc;
    border-radius: 10px;
    background: #f9f9f9;
}

.preview-section {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.page-preview {
    border: 1px solid #ddd;
    padding: 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 5px;
}

.page-preview:hover {
    background-color: #eef;
}

.page-preview.selected {
    background-color: #d0e3ff;
    border-color: #4a90e2;
}

.page-preview canvas {
    max-width: 100px;
    height: auto;
}

.controls {
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

button {
    background: linear-gradient(to bottom, #D3D3D3 0%, #A9A9A9 100%); /* MacBook-style gradient */
    border: 1px solid #888; /* Subtle border for definition */
    border-radius: 15px;
    padding: 10px 15px;
    color: #333; /* Dark text for contrast */
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.5); /* Diffused shadow with inner highlight */
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0)); /* Subtle glass-like sheen */
    pointer-events: none;
}

button:hover {
    background: linear-gradient(to bottom, #C0C0C0 0%, #969696 100%); /* Slightly darker gradient on hover */
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

button:disabled {
    background: linear-gradient(to bottom, #E0E0E0 0%, #C0C0C0 100%);
    color: #666;
    border-color: #aaa;
    cursor: not-allowed;
    box-shadow: none;
}

button:disabled::before {
    background: none;
}

.range-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

input[type="number"] {
    width: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #282828;
}

.status {
    margin-top: 20px;
    padding: 10px;
    border-radius: 4px;
}

.success {
    background-color: #d4edda;
    color: #155724;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
}

.loading {
    display: none;
    text-align: center;
    margin: 20px 0;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid #A9A9A9; /* Match the button gradient */
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 600px) {
    .pst-window {
        width: 100%;
        max-width: 100%;
    }
    .controls {
        flex-direction: column;
    }
    .range-input {
        flex-direction: column;
        align-items: stretch;
    }
    button {
        width: 100%;
    }
}