* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Tahoma, Arial, sans-serif;
  background: #f7fbff;
  color: #17233c;
}

.page {
  min-height: 100vh;
  direction: rtl;
}

.sidebar {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 210px;
  height: 100vh;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 0 0 0 28px;
  padding: 24px 18px;
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.08);
  overflow-y: auto;
}

.main {
  padding: 34px;
  margin-right: 210px;
  overflow: hidden;
}

.logo-box {
  text-align: center;
  padding-bottom: 22px;
  border-bottom: 1px solid #edf2f7;
}

.logo-box img {
  width: 78px;
  height: 78px;
  object-fit: contain;
}

.logo-box h2 {
  margin: 8px 0 0;
  font-size: 23px;
  color: #0f2d5c;
}

.menu {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.menu a {
  height: 52px;
  padding: 0 15px;
  border-radius: 16px;
  color: #334155;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 17px;
  font-weight: 700;
  transition: 0.25s;
}

.menu a i {
  font-size: 23px;
}

.menu a:hover,
.menu a.active {
  background: #eaf3ff;
  color: #2563eb;
}

.menu a.active {
  box-shadow: inset 0 0 0 1px #dbeafe;
}

.menu .logout {
  margin-top: 18px;
  color: #ef4444;
}

.page-title {
  margin-bottom: 28px;
}

.page-title h1 {
  margin: 0;
  font-size: 38px;
  color: #0f2d5c;
}

.page-title p {
  margin: 10px 0 0;
  color: #64748b;
  font-size: 18px;
}

.stories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.story-card {
  background: white;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid #e6ecf5;
  transition: 0.25s;
}

.story-card:hover {
  transform: translateY(-6px);
}

.story-card img {
  width: 100%;
  height: 170px;
  display: block;
  object-fit: cover;
}

.story-info {
  padding: 18px;
  text-align: center;
}

.story-info h3 {
  margin: 0 0 16px;
  font-size: 21px;
  color: #0f172a;
}

.story-info button {
  border: none;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
  padding: 11px 28px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: bold;
  font-size: 15px;
}

@media (max-width: 1100px) {
  .stories {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 800px) {
  .page {
    display: flex;
    flex-direction: column;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    min-height: auto;
    border-radius: 0;
  }

  .menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .main {
    padding: 22px;
    margin-right: 0;
  }

  .stories {
    grid-template-columns: 1fr;
  }
}
.favorite-btn {
  width: 100%;
  height: 52px;
  margin: 14px 0;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #e2e8f0, #cbd5f5);
  color: #334155;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: 0.3s;
}

.favorite-btn i {
  font-size: 22px;
  transition: 0.3s;
}

/* 🔥 لما تكون مفضلة */
.favorite-btn.active {
  background: linear-gradient(135deg, #f43f5e, #ec4899);
  color: white;
}

.favorite-btn.active i {
  transform: scale(1.2);
}

/* ✨ حركة الضغط */
.favorite-btn:active {
  transform: scale(0.95);
}
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 28px;
}

.filter-btn {
  border: none;
  padding: 12px 18px;
  border-radius: 14px;
  background: white;
  color: #2563eb;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.07);
  transition: 0.25s;
}

.filter-btn:hover,
.filter-btn.active {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
  transform: translateY(-2px);
}