/* متغیرها و ریست پایه */
:root {
  --primary: #0097ce;
  --bg-color: #000000;
  --surface: #111111;
  --text-light: #ffffff;
  --text-muted: #aaaaaa;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-color);
  color: var(--text-light);
  font-family: Tahoma, Arial, sans-serif;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== استایل‌های پیش‌خرید ===== */
.preorder-section {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.05), rgba(255, 53, 94, 0.05));
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 107, 53, 0.2);
}

.preorder-section .section-header h2 {
  background: linear-gradient(135deg, #ff6b35, #ff355e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.preorder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 0;
  overflow-x: visible;
}

.preorder-card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg, #1e1e1e);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 107, 53, 0.3);
  position: relative;
  text-decoration: none;
  color: inherit;
}

.preorder-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 107, 53, 0.2);
  border-color: #ff6b35;
}

.preorder-card-img {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.preorder-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.preorder-card:hover .preorder-card-img img {
  transform: scale(1.05);
}

.preorder-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #ff6b35, #ff355e);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  z-index: 2;
}

.discount-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: #4caf50;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  z-index: 2;
}

.preorder-card-content {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.preorder-card-content h3 {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
  color: var(--text-color, #fff);
}

.preorder-chapters {
  color: var(--muted-text, #999);
  font-size: 13px;
  margin: 0;
}

.preorder-prices {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.original-price {
  color: var(--muted-text, #999);
  text-decoration: line-through;
  font-size: 13px;
}

.preorder-price {
  color: #ff6b35;
  font-weight: bold;
  font-size: 15px;
}

.preorder-time {
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #ff6b35;
  font-size: 12px;
  font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
  .preorder-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .preorder-card-img {
    height: 150px;
  }
}

.empty-state {
  padding: 20px;
  font-family: 'Lalezar';
  color: var(--text-muted);
  text-align: center;
  width: 100%;
}

/* ================== Slider ================== */
.slider-wrapper {
  position: relative;
  width: 100%;
  height: 50vh;
  min-height: 400px;
  background-color: var(--surface);
  overflow: hidden;
  margin-top: -80px;
}

.slider-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.slider-slide {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  z-index: 1;
}

.slider-slide.active {
  opacity: 1;
  z-index: 2;
}

.slider-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.slider-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #000000 0%, rgba(0,0,0,0.7) 40%, transparent 100%);
}

.slider-content {
  position: absolute;
  bottom: 10%;
  left: 0; right: 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
}

.slider-info {
  max-width: 600px;
}

.slider-genres {
  display: flex;
  gap: 8px; /* فاصله بین باکس‌ها */
  flex-wrap: wrap;
}
.genre-box {
    background-color: rgb(0 0 0 / 25%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    color: #fff;
    font-family: 'Lemonada';
}
.slider-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: #fff;
  font-family: 'Trade Winds';
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.slider-desc {
  font-size: 1rem;
  color: #ddd;
  margin-bottom: 20px;
  line-height: 1.6;
  font-family: Playpen Sans Arabic;
}

.btn-read {
    display: inline-block;
    background-color: #28282869;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 100;
    transition: background 0.3s;
    font-size: 13px;
    border: 1px solid #2b2b2b;
        font-family: Lalezar;
}

.btn-read:hover {
  background-color: #c1c1c18f;
}

.slider-controls {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 7px;
}

.slider-dot {
    width: 15px;
    height: 2px;
    background-color: rgb(64 64 64 / 40%);
    border-radius: 15%;
    cursor: pointer;
    transition: all 0.3s;
}

.slider-dot.active {
  background-color: var(--primary);
  transform: scale(1.2);
}

/* ================== Sections & Headers ================== */
.page-section {
  padding: 40px 15px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-right: 4px solid var(--primary);
  padding-right: 15px;
  margin-bottom: 20px;
  background: linear-gradient(to left, rgba(0, 151, 206, 0.1) 0%, transparent 100%);
  padding-top: 5px;
  padding-bottom: 5px;
  border-radius: 0 4px 4px 0;
  font-family: 'Playpen Sans Arabic';
}

.section-header h2 {
  font-size: 1.5rem;
  color: #fff;
}

.view-all {
    color: #c3c3c3;
    font-size: 13px;
    transition: color 0.3s;
    font-weight: bolder;
    background: #4c4c4c45;
    padding: 8px 10px;
    border-radius: 5px;
}

.view-all:hover {
  color: #fff;
}

/* ================== Horizontal Lists & Cards ================== */
.manga-section, .search-result-container {
  margin-bottom: 40px;
}

.horizontal-list {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  padding-bottom: 15px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--surface);
}

.horizontal-list::-webkit-scrollbar {
  height: 6px;
}
.horizontal-list::-webkit-scrollbar-track {
  background: var(--surface);
  border-radius: 4px;
}
.horizontal-list::-webkit-scrollbar-thumb {
  background-color: var(--primary);
  border-radius: 4px;
}

.manga-card {
  flex: 0 0 auto;
  width: 180px;
  background-color: var(--surface);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.manga-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 151, 206, 0.3);
}

.card-image-wrapper {
  width: 100%;
  height: 250px;
  position: relative;
}

.manga-type-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.3);
  z-index: 2;
  font-family: 'Lemonada';
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-content {
  padding: 10px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.manga-title-eng {
  font-size: 0.95rem;
  color: #fff;
  text-align: left; /* Left align for English */
  direction: ltr;
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: Sniglet;
  font-weight: 100;
}

.card-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--primary);
  background: rgba(0, 151, 206, 0.1);
  padding: 4px 6px;
  border-radius: 4px;
}

/* ================== Search Box ================== */
.search-section {
  margin-bottom: 30px;
}
/* ============ Announcements ============ */
.announcements-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 18px 0;
}

.announcement-card {
  position: relative;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-right: 4px solid #6366f1;
  border-radius: 12px;
  padding: 16px 18px;
  color: #e2e8f0;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  animation: annSlideIn 0.35s ease-out;
}

.announcement-card .ann-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 10px;
}

.announcement-card .ann-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #c7d2fe;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.announcement-card .ann-title::before {
  content: "📢";
  font-size: 1.1rem;
}

.announcement-card .ann-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
  padding: 2px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.announcement-card .ann-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.announcement-card .ann-content {
  font-size: 0.95rem;
  line-height: 1.9;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
}

.announcement-card .ann-meta {
  margin-top: 10px;
  font-size: 0.75rem;
  color: #64748b;
}

@keyframes annSlideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.search-box input {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid #333;
    background-color: #060606;
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.3s;
    font-family: 'Playpen Sans Arabic';
}

.search-box input:focus {
  border-color: var(--primary);
}

.search-result-container {
  margin-top: 20px;
  background-color: #0a0a0a;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #222;
}

/* ================== Blog Grid ================== */
.blog-grid-custom {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-gap: 15px;
}

.blog-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  display: block;
  height: 200px;
}

.blog-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.blog-card:hover img {
  transform: scale(1.05);
}

.blog-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  padding: 20px 10px 10px;
}

.blog-overlay h3 {
  color: #fff;
  font-size: 1.1rem;
  text-shadow: 1px 1px 3px #000;
}

/* چیدمان 5 تایی (2 تا بالا، 3 تا پایین) در دسکتاپ */
.item-1 { grid-column: span 3; }
.item-2 { grid-column: span 3; }
.item-3 { grid-column: span 2; }
.item-4 { grid-column: span 2; }
.item-5 { grid-column: span 2; }


/* ================== Responsive ================== */
@media (max-width: 992px) {
  .slider-title { font-size: 2rem; }
  .manga-card { width: 150px; }
  .card-image-wrapper { height: 210px; }
}

@media (max-width: 768px) {
  .slider-title { font-size: 20px; }
  .slider-desc { font-size: 13px; }
  .genre-box { font-size: 9px; }
  .section-header h2 { font-size: 16px; }

  /* تبدیل وبلاگ به لیست افقی در تبلت و موبایل */
  .blog-grid-custom {
    display: flex;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--surface);
    padding-bottom: 15px;
  }
  .blog-card {
    flex: 0 0 auto;
    width: 260px;
  }
}

@media (max-width: 480px) {
  .manga-card { width: 130px; }
  .card-image-wrapper { height: 180px; }
  .slider-wrapper { min-height: 300px; height: 40vh; }
  .card-stats {
    font-size: 0.65rem;
    padding: 4px;
    flex-direction: row-reverse;
    align-items: flex-start;
    gap: 2px;
    display: flex;
  }
}
