@font-face {
  font-family: 'Nastaliq';
  src: url('/fonts/IranNastaliq.ttf') format('truetype');
}

body { margin:0; font-family:sans-serif; background:#0b0b0b; color:#FFD700; }
.container { max-width:1200px; margin:0 auto; padding:20px; }

.background-pic{
  position:fixed; inset:0;
  background:#000 url('/images/background.webp') center/cover no-repeat;
  z-index:-1;
}

.header { display:flex; align-items:flex-start; gap:20px; margin-bottom:20px; }
.header img { width:150px; height:150px; border-radius:50%; object-fit:cover; border:3px solid #FFD700; cursor:pointer; }
.header-info { text-align:right; direction:rtl; }
.header-info h1 { margin:0; font-size:36px; font-family:'Nastaliq', serif; }
.header-info p { margin:5px 0 10px; font-size:18px; color:#FFA500; }
.stats { display:flex; gap:30px; margin-top:10px; }
.stats div { font-size:16px; }

.avatar-section{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
}

.avatar-buttons{
  display:flex;
  gap:8px;
}

.header-btn{
  padding:7px 32px;
  background:#32c24a;
  border:none;
  border-radius:6px;
  cursor:pointer;
  font-weight:bold;
  color:#0b0b0b;
  transition:0.3s;
}

.header-btn:hover{
  background:#28a745;
  color:#fff;
}

.header-btn.danger{
  background:#FF4500;
  color:#fff;
}

.header-btn.danger:hover{
  background:#FF6347;
}

#artModal {
  display:none;
  position:fixed;
  top:0; left:0;
  width:100%; height:100%;
  background:rgba(0,0,0,0.9);
  justify-content:center;
  align-items:center;
  z-index:1000;
}
#artModal .modal-content {
  position:relative;
  max-width:900px;
  width:90%;
  background:#111;
  padding:20px;
  border-radius:10px;
  direction:rtl;
  text-align:right;
}
#artModal label { display:block; margin-top:10px; color:#FFA500; font-weight:bold; }
#artModal input, #artModal textarea { width:100%; margin-bottom:10px; padding:8px; border-radius:5px; border:none; background:#222; color:#FFD700; text-align:right; }
#artModal .save-btn {
  padding:6px 12px;
  font-size:14px;
  background:#FFD700;
  border:none;
  border-radius:8px;
  cursor:pointer;
  color:#0b0b0b;
  font-weight:bold;
  transition:0.3s;
}
#artModal .save-btn:hover { background:#FF8C00; }
#artModal .modal-close { position:absolute; top:10px; right:10px; font-size:28px; color:#FFD700; cursor:pointer; }

.gallery { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:20px; direction:ltr; }
.art-card { background:#111; border-radius:15px; overflow:hidden; position:relative; transition:transform 0.3s, box-shadow 0.3s; display:flex; flex-direction:column; direction:rtl; }
.art-card:hover { transform:scale(1.03); box-shadow:0 10px 25px rgba(255,215,0,0.6); }
.art-info { padding:10px; flex-grow:1; display:flex; flex-direction:column; }
.art-title { font-weight:bold; font-size:18px; margin:5px 0; }
.art-price { color:#FFD700; font-weight:bold; margin-bottom:5px; }
.actions { display:flex; justify-content:space-between; align-items:center; margin-top:5px; }
.actions button { padding:7px 32px; border:none; border-radius:5px; cursor:pointer; font-weight:bold; transition:0.3s; }
.actions .edit-btn { background:#FFA500; color:#0b0b0b; }
.actions .edit-btn:hover { background:#FF8C00; color:#fff; }
.actions .delete-btn { background:#FF4500; color:#fff; }
.actions .delete-btn:hover { background:#FF6347; }

.carousel { position:relative; overflow:hidden; height:200px; margin-bottom:10px; }
.carousel img { width:100%; height:200px; object-fit:cover; display:none; border-radius:10px; }
.carousel img.active { display:block; }
.carousel button { position:absolute; top:50%; transform:translateY(-50%); background:rgba(0,0,0,0.5); color:#FFD700; border:none; padding:7px 32px; cursor:pointer; font-weight:bold; }
.carousel .prev { left:5px; }
.carousel .next { right:5px; }

#imageModal { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.9); justify-content:center; align-items:center; z-index:1000; }

#imageModal .modal-content {
  position: relative;
  max-width: 90vw;      
  max-height: 90vh;     
  width: 800px;         
  height: 600px;        
  background: #111;
  padding: 0;           
  border-radius: 10px;
  overflow: hidden;     
  display: flex;
  justify-content: center;
  align-items: center;
}

#imageModal .modal-prev,
#imageModal .modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  
  background: rgba(0, 0, 0, 0.5);
  color: #FFD700;
  border: none;
  padding: 7px 32px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  transition: 0.3s;
}

#imageModal .modal-prev:hover,
#imageModal .modal-next:hover {
  background: rgba(0, 0, 0, 0.7);
  color: #FFD700;
}

#imageModal .modal-prev { left: 20px; }
#imageModal .modal-next { right: 20px; }

#imageModal img {
  width: 100%;
  height: 100%;
  object-fit: cover;    
  border-radius: 10px;
}

#imageModal .modal-close { position:absolute; top:10px; right:10px; font-size:28px; color:#FFD700; cursor:pointer; }

.pagination { margin-top:25px; display:flex; justify-content:center; gap:10px; }
.page-btn { padding:7px 32px; background:#FFD700; color:#0b0b0b; border:none; border-radius:6px; cursor:pointer; }
.page-btn.active { background:#FF8C00; }

.editable{
  position:relative;
  cursor:pointer;
  padding:8px 28px 8px 8px;
  min-height:28px;
  border-radius:6px;
  transition:background 0.3s;
}
.editable:hover{
  background:rgba(255,215,0,0.1);
}
.editable:focus{
  background:rgba(255,215,0,0.2);
  outline:none;
}
.edit-icon{
  position:absolute;
  right:6px;
  top:50%;
  transform:translateY(-50%);
  font-size:14px;
  color:#FFD700;
  opacity:0.7;
  pointer-events:none;
}
.editable:hover .edit-icon { opacity: 1; }

@media (max-width:768px){
  .header { flex-direction:column; text-align:center; align-items:center; }
  .stats { justify-content:center; }
  .art-card img{height:180px;}
  .carousel img{height:180px;}
}
