@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;700&display=swap');

.prompt-studio-wrapper {
    background-color: #1a1a24;
    color: #ffffff;
    font-family: 'Tajawal', sans-serif;
    padding: 35px;
    border-radius: 16px;
    max-width: 650px;
    margin: 20px auto;
    box-shadow: 0 15px 45px rgba(0,0,0,0.6);
    direction: rtl;
    border: 1px solid #2a2a35;
    box-sizing: border-box;
}

.ps-header {
    border-bottom: 2px solid #ffcc00;
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.ps-header h2 {
    color: #ffffff;
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.ps-row {
    margin-bottom: 20px;
    width: 100%;
}

.ps-input-group {
    background-color: #12121a;
    border: 1px solid #3d3d4d;
    border-radius: 8px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.ps-input-group:focus-within {
    border-color: #ffcc00;
    box-shadow: 0 0 8px rgba(255, 204, 0, 0.2);
}

.ps-label {
    font-weight: bold;
    margin-left: 15px;
    min-width: 110px;
    color: #ffffff;
}

.ps-control {
    background: transparent;
    color: #ffcc00;
    border: none;
    width: 100%;
    outline: none;
    font-size: 15px;
    font-family: 'Tajawal', sans-serif;
}

.ps-control option {
    background-color: #1a1a24;
    color: #ffffff;
}

.ps-control::placeholder {
    color: #666677;
}

/* المعرض والصور المرجعية */
.ps-image-gallery {
    background-color: #12121a;
    border: 1px solid #3d3d4d;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.ps-gallery-header {
    margin-bottom: 15px;
}

.ps-thumbnails {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.ps-thumb-container {
    width: 80px;
    height: 80px;
    border: 2px solid #3d3d4d;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #1a1a24;
    position: relative;
}

.ps-thumb-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
    box-sizing: border-box;
}

.ps-thumb-container:hover {
    border-color: #888899;
}

.ps-thumb-container.selected {
    border-color: #ffcc00;
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.5);
    transform: scale(1.05);
}

.ps-hidden-file {
    display: none;
}

.ps-btn-secondary {
    background: rgba(255, 204, 0, 0.05);
    color: #ffcc00;
    border: 1px dashed #ffcc00;
    padding: 12px 15px;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    font-family: 'Tajawal', sans-serif;
    font-size: 15px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.ps-btn-secondary:hover {
    background: rgba(255, 204, 0, 0.15);
}

/* شرائط التمرير */
.ps-slider-container {
    margin-bottom: 25px;
    background-color: #12121a;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #2a2a35;
}

.ps-slider-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-weight: bold;
    color: #ffffff;
}

.ps-val-display {
    color: #ffcc00;
    font-weight: bold;
}

.ps-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: #3d3d4d;
    border-radius: 5px;
    outline: none;
    margin-bottom: 5px;
}

.ps-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background: #ffcc00;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(255, 204, 0, 0.4);
    transition: transform 0.1s;
}

.ps-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* زر الاستخراج وصندوق النتيجة */
.ps-submit-btn {
    background: linear-gradient(90deg, #ffcc00, #ffaa00);
    color: #111;
    border: none;
    width: 100%;
    padding: 18px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 18px;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.ps-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 204, 0, 0.3);
}

.ps-result-box {
    margin-top: 25px;
    background: #0d0d14;
    padding: 20px;
    border-radius: 8px;
    border-right: 4px solid #ffcc00;
    display: none;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.ps-result-box code {
    color: #a0a0b0;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.6;
    display: block;
    text-align: left;
    direction: ltr;
    white-space: pre-wrap;
}