:root {
  --clr-primary   : #229ED9;
  --clr-primary-2 : #1c91cb;
  --clr-text      : #222;
  --clr-text-soft : #555;
  --clr-bg-grad: linear-gradient(135deg, #f2f3ff, #ecebfa, #f9f9ff);
  --clr-card      : #ffffff;
  --clr-border    : #e0e0e0;
}

[data-theme="dark"] {
  --clr-primary   : #82b1ff;
  --clr-primary-2 : #4e8cff;
  --clr-text      : #f1f1f1;
  --clr-text-soft : #bdbdbd;
  --clr-bg-grad   : linear-gradient(135deg, #0f172a, #1e293b 60%, #000);
  --clr-card      : #1d1d1d;
  --clr-border    : #2b2b2b;
}

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

body {
  font-family: 'Segoe UI', sans-serif;
  min-height: 100vh;
  background: var(--clr-bg-grad) fixed;
  color: var(--clr-text);
  line-height: 1.6;
  transition: color 0.3s, background 0.6s;
}
html {
  scroll-behavior: smooth;
}


/* ───────── NAVBAR ───────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px clamp(5vw, 60px, 10vw);
  background: var(--clr-card);
  border-bottom: 1px solid var(--clr-border);
  backdrop-filter: blur(10px);
}

/* ───── SITE LOGO IMAGE ───── */
.site-logo {
  height: 38px;
  width: auto;
  display: inline-block;
  margin-right: 0.6rem;
  vertical-align: middle;
  object-fit: contain;
  transition: filter 0.3s ease;
}

/* Optional: Adjust for dark mode */
[data-theme="dark"] .site-logo {
  filter: brightness(0.9) contrast(1.1);
}


.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.3rem;
}

.logo-icon {
  width: 36px;
  height: 36px;
  color: var(--clr-primary);
}

.nav-links {
  display: flex;
  gap: 50px;
}

.nav-links a {
  color: var(--clr-text);
  text-decoration: none;
  font-weight: 500;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--clr-primary);
  transform: scaleX(0);
  transition: transform 0.3s;
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.3s;
  color: var(--clr-text);
}

.theme-btn:hover {
  transform: rotate(20deg);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--clr-text);
  transition: background 0.3s;
}


/* ───────── MOBILE DRAWER ───────── */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 70%;
  height: 100%;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: -4px 0 10px rgba(0, 0, 0, 0.15);
  padding: 90px 30px;
  display: flex;
  flex-direction: column;
  gap: 25px;
  transition: right 0.3s, background 0.4s ease-in-out;
  z-index: 999;
}
[data-theme="dark"] .mobile-menu {
  background: rgba(20, 20, 20, 0.6);
}

.mobile-menu a {
  color: var(--clr-text);
  text-decoration: none;
  font-size: 1.1rem;
}

/* ───────── HERO ───────── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 180px);
  text-align: center;
  padding: 0 6vw;
}

.hero h1 {
  font-size: clamp(2.3rem, 4.5vw + 1rem, 3.8rem);
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.15rem;
  color: var(--clr-text-soft);
  max-width: 600px;
  margin-bottom: 35px;
}

.telegram-button {
  padding: 12px 24px;
  background: linear-gradient(135deg, #4e54c8, #8f94fb);
  color: white;
  font-weight: bold;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
}
.telegram-button:hover {
  transform: scale(1.05);
}


/* ───────── BOOK PREVIEW GRID ───────── */
.book-link {
  text-decoration: none;
  color: inherit; /* keeps it the same color as surrounding text */
}

.book-link:hover {
  text-decoration: underline; /* optional: add hover effect if you want */
}

.book-grid {
  width: 100%;
  max-width: 900px;
  display: grid;
  gap: 1.5rem;
  margin: 2.2rem 0 2.8rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.book-card {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s; 
  color: inherit;
}

.book-card:hover {
  transform: translateY(-6px);
}

.book-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
h3{
  text-decoration: none;
  color: inherit;
}
.book-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  padding: 0.75rem 0.5rem 1rem;
  color: var(--clr-text);
  text-decoration: none;
  font-style: normal;
}

/* ───────── FOOTER ───────── */
.footer {
  text-align: center;
  padding: 25px 0;
  color: var(--clr-text-soft);
}

/* ───────── RESPONSIVE ───────── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .hamburger {
    display: flex;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
  }
}

/* ===== GENRE FILTER BUTTONS ===== */
.genre-filters{
  display:flex;
  flex-wrap:wrap;
  gap:.75rem;
  justify-content:center;
  margin:2rem 0 1.5rem;
}
.filter-btn{
  padding:.55rem 1.1rem;
  border-radius:20px;
  border:1px solid var(--clr-primary);
  background:transparent;
  color:var(--clr-primary);
  font-size:.9rem;
  cursor:pointer;
  transition:background .25s,color .25s;
}
.filter-btn:hover,
.filter-btn.active{
  background:var(--clr-primary);
  color:#fff;
}

/* ===== GENRE TAG PILL ===== */
.genre-tag{
  position:absolute;
  top:8px;
  left:8px;
  padding:2px 8px;
  font-size:.7rem;
  font-weight:600;
  color:#fff;
  background:var(--clr-primary-2);
  border-radius:12px;
}
.gradient-btn {
  background: linear-gradient(135deg, #6a5acd, #7baceb);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 500;
  transition: background 0.3s ease;
  display: inline-block;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.gradient-btn:hover {
  background: linear-gradient(135deg, #5a4fcf, #6ab5f5);
}


/* Ensure book-card is relative for tag position */
.book-card{
  position:relative;
}
/* ───── VISITOR COUNTER ───── */
.visitor-counter{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  font-size:.95rem;
  font-weight:600;
  color:var(--clr-text);
  background:rgba(0,0,0,0.04);
  padding:.4rem .8rem;
  border-radius:999px;
}
[data-theme="dark"] .visitor-counter{
  background:rgba(255,255,255,0.06);
}
.visitor-icon{
  width:20px;
  height:20px;
  color:var(--clr-primary);
}


/* (the rest of your existing CSS stays unchanged) */
