body {
    margin: 0;
    background: #1e1e1e;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* الشريط العلوي */
.topbar {
    background: #2d2d2d;
    padding: 10px 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    border-bottom: 1px solid #444;
    height: 50px;
}

button {
    padding: 8px 15px;
    background: #444;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}

button:hover { background: #555; }
.btn-green { background: #27ae60; }
.btn-green:hover { background: #2ecc71; }
.btn-blue { background: #2980b9; }
.btn-blue:hover { background: #3498db; }
.btn-red { background: #c0392b; }
.btn-red:hover { background: #e74c3c; }

/* أزرار الأدوات النشطة */
button.active-tool {
    background: #f39c12;
    color: #fff;
}

/* الحاوية الرئيسية */
.container {
    display: flex;
    flex: 1;
    height: calc(100vh - 72px);
}

/* الجوانب */
.sidebar {
    width: 200px;
    background: #252525;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    border-left: 1px solid #333;
    border-right: 1px solid #333;
}

.sidebar h3 { 
    margin-top: 0; 
    font-size: 16px; 
    color: #aaa; 
    border-bottom: 1px solid #444; 
    padding-bottom: 5px;
}

/* اختيار الألوان */
.color-picker-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #333;
    padding: 8px;
    border-radius: 5px;
}
#colorPicker {
    cursor: pointer;
    border: none;
    background: none;
    height: 30px;
    width: 50px;
}

/* مساحة العمل */
.workspace {
    flex: 1;
    background: #111; 
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
    position: relative;
    padding: 20px;
}

/* اللوحة نفسها */
.canvas-container-wrapper {
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    background: white !important; 
}

/* قائمة الطبقات */
#layerList {
    list-style: none;
    padding: 0;
    margin: 0;
}

#layerList li {
    background: #333;
    padding: 8px;
    margin-bottom: 5px;
    border-radius: 4px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#layerList li:hover { background: #444; }

/* تمييز الطبقة النشطة */
#layerList li.active-layer {
    background: #4a69bd;
    border-right: 3px solid #60a3bc;
}

.layer-text {
    cursor: pointer;
    flex: 1;
}

.layer-delete {
    cursor: pointer;
    color: #e74c3c;
    font-size: 14px;
    padding-left: 5px;
}
.layer-delete:hover { color: #c0392b; }
