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

body{
  margin:0;
  font-family:sans-serif;
  background:#0b0b0b;
  color:#FFD700;
}

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

.container{
  max-width:1100px;
  margin:auto;
  padding:20px;
  display:flex;
  flex-wrap:wrap;
  gap:20px;
}
.header{
  width:100%;
  display:flex;
  flex-direction:row-reverse;
  gap:20px;
  align-items:center;
  flex-wrap:wrap;
}
.header img{
  width:120px;
  height:120px;
  border-radius:50%;
  object-fit:cover;
  border:3px solid #FFD700;
  cursor:pointer;
}
.card{
  background:#111;
  padding:15px;
  border-radius:12px;
  width:480px;
  flex:1 1 480px;
  text-align:right;
  direction:rtl;
}
h1{margin:0;font-size:36px;font-family:'Nastaliq', serif;}
h2{margin-top:0;}
.list-item{
  border-bottom:1px solid #333;
  padding:10px 0;
  display:flex;
  flex-direction:column;
}
.list-item:last-child{border:none;}
input[type=file]{display:none;}
.stat{
  display:flex;
  justify-content:space-between;
  margin-top:10px;
}
.empty{color:#888;text-align:center;padding:15px;}
.pay-btn{
  padding:7px 32px;
  border:none;
  border-radius:5px;
  cursor:pointer;
  font-weight:bold;
  color:#fff;
  margin-top:5px;
}
.cancel-btn{
  padding:7px 32px;
  border:none;
  border-radius:5px;
  cursor:pointer;
  font-weight:bold;
  color:#fff;
  margin-top:5px;
  background:#FF4500;
}
.logout-buttons {
  margin-top:10px;
  display:flex;
  justify-content:center;
}
.logout-buttons button{
  padding:7px 32px;
  background:#FF4500;
  border:none;
  border-radius:6px;
  color:#fff;
  font-weight:bold;
  cursor:pointer;
  transition:0.3s;
}
.logout-buttons button:hover{background:#FF6347;}

.art-modal{
  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;
}
.art-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;
}
.art-modal-content img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:10px;
}
#closeModal{
  position:absolute;
  top:10px;
  left:15px;
  cursor:pointer;
  font-size:22px;
  color:#FFD700;
}
#prevImg, #nextImg{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  background:rgba(0,0,0,0.5);
  color:#FFD700;
  border:none;
  padding:10px;
  cursor:pointer;
  border-radius:50%;
  font-size:22px;
}
#prevImg{ left:10px; }
#nextImg{ right:10px; }
.hidden{display:none;}

.art-title{cursor:pointer;color:#FFD700;}
.art-title:hover{text-decoration:underline;}

.art-view-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 10px;

  display: none;
}

.art-view-modal:not(.hidden) {
  display: flex;
}

.hidden {
  display: none !important;
}

.art-view-content {
  width: 100%;
  max-width: 52vw;
  max-height: 90vh;
  background: #111;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
  overflow: hidden;
  justify-content: center;
  align-items: center;
}

.view-carousel {
  width: 100%;
  max-height: 60vh;
  aspect-ratio: 1 / 1;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.view-carousel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.view-carousel button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: #FFD700;
  border: none;
  font-size: 18px;
  padding: 8px;
  cursor: pointer;
  border-radius: 50%;
}

#viewPrev { left: 8px; }
#viewNext { right: 8px; }

.art-details {
  color: #FFD700;
  text-align: right;
  width: 100%;
  max-height: calc(90vh - 60vh - 40px);
  overflow: hidden;
}

.art-details h3,
.art-details p {
  word-break: break-word;
  margin: 4px 0;
  line-height: 1.4;
}

#closeArtView {
  align-self: flex-start;
  cursor: pointer;
  font-size: 22px;
  color: #FFD700;
}

@media (max-width: 600px) {

  .art-view-content {
    max-width: 95vw;
    max-height: 95vh;
    padding: 8px;
  }

  .view-carousel {
    max-height: 50vh;
  }

  .art-details {
    max-height: calc(95vh - 50vh - 30px);
  }

}
