:root{--primary:#7c4bf5;--dark:#151225;--muted:#6b6880;--bg:#f7f5ff;--card:#fff;--shadow:0 15px 45px rgba(31,22,70,.12)}
*{box-sizing:border-box}body{margin:0;font-family:Arial,'Noto Sans Bengali',sans-serif;background:linear-gradient(180deg,#f8f5ff,#fff);color:var(--dark)}a{text-decoration:none;color:inherit}.container{width:min(1160px,92%);margin:auto}.topbar{position:sticky;top:0;z-index:5;background:rgba(255,255,255,.9);backdrop-filter:blur(12px);border-bottom:1px solid #ece8ff}.nav{display:flex;align-items:center;gap:25px;padding:18px 0}.logo{font-size:26px;font-weight:900;color:var(--primary);letter-spacing:-1px}.search-wrap{flex:1;display:flex;justify-content:center}.search{width:min(520px,100%);padding:15px 20px;border:2px solid #e5ddff;border-radius:18px;outline:none;font-size:16px;box-shadow:0 10px 30px rgba(124,75,245,.08)}.search:focus{border-color:var(--primary)}.hero{padding:45px 0 20px}.hero-card{background:linear-gradient(135deg,var(--primary),#a98cff);border-radius:32px;color:#fff;padding:40px;box-shadow:var(--shadow);display:flex;align-items:center;justify-content:space-between;gap:20px}.hero h1{margin:0;font-size:42px}.hero p{opacity:.92;font-size:18px}.badge{background:#fff;color:var(--primary);padding:13px 18px;border-radius:999px;font-weight:800}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:24px;padding:25px 0 55px}.ebook-card{background:var(--card);border-radius:24px;box-shadow:var(--shadow);overflow:hidden;border:1px solid #f0ecff;transition:.25s}.ebook-card:hover{transform:translateY(-5px)}.cover{width:100%;height:280px;object-fit:cover;background:#eee}.info{padding:18px}.title{font-size:18px;font-weight:800;min-height:45px}.price{font-size:20px;color:var(--primary);font-weight:900;margin:12px 0}.btn{display:inline-flex;justify-content:center;align-items:center;border:0;background:var(--primary);color:#fff;padding:13px 18px;border-radius:14px;font-weight:800;cursor:pointer;box-shadow:0 10px 25px rgba(124,75,245,.28);width:100%}.btn:hover{filter:brightness(.95)}.form-page{padding:45px 0}.checkout{display:grid;grid-template-columns:340px 1fr;gap:28px;align-items:start}.panel{background:#fff;border-radius:26px;padding:24px;box-shadow:var(--shadow);border:1px solid #eee8ff}.panel img{width:100%;border-radius:18px;max-height:420px;object-fit:cover}.field{margin-bottom:16px}.field label{display:block;font-weight:800;margin-bottom:8px}.field input,.field textarea{width:100%;padding:14px 15px;border:1px solid #ddd6ff;border-radius:14px;font-size:15px;outline:none}.field input:focus{border-color:var(--primary)}.notice{background:#f1edff;border:1px solid #ded4ff;color:#3b2c75;padding:14px;border-radius:16px;margin-bottom:16px}.footer{text-align:center;padding:30px;color:var(--muted)}.admin-layout{display:grid;grid-template-columns:250px 1fr;min-height:100vh}.sidebar{background:#151225;color:#fff;padding:25px}.sidebar h2{color:#fff;margin:0 0 25px}.sidebar a{display:block;padding:13px 14px;border-radius:13px;margin:6px 0;color:#dcd6ff}.sidebar a:hover,.sidebar a.active{background:var(--primary);color:#fff}.admin-main{padding:28px;background:#f7f5ff}.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:18px;margin-bottom:25px}.stat{background:#fff;padding:22px;border-radius:22px;box-shadow:var(--shadow)}.stat b{font-size:30px;color:var(--primary)}.table{width:100%;border-collapse:collapse;background:#fff;border-radius:18px;overflow:hidden;box-shadow:var(--shadow)}.table th,.table td{padding:13px;border-bottom:1px solid #eee;text-align:left}.table th{background:#f0ebff}.thumb{width:55px;height:65px;object-fit:cover;border-radius:10px}.alert{padding:14px;border-radius:14px;margin-bottom:15px}.success{background:#eafaf0;color:#116631}.error{background:#ffecec;color:#a32020}@media(max-width:760px){.nav{flex-direction:column;align-items:flex-start}.hero-card{display:block}.hero h1{font-size:30px}.checkout,.admin-layout{grid-template-columns:1fr}.sidebar{position:relative}.cover{height:240px}}

:root {
  --primary: #7c4bf5;
  --primary-dark: #5f32d6;
  --dark: #111827;
  --text: #374151;
  --muted: #6b7280;
  --white: #ffffff;
  --bg: #f6f4ff;
  --border: #ebe7ff;
}

body {
  background: linear-gradient(180deg, #f8f6ff 0%, #ffffff 45%);
}

.topbar {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 99;
}

.nav {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

.logo {
  font-size: 26px;
  font-weight: 900;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.8px;
}

.search-box {
  width: 420px;
  max-width: 100%;
  background: #fff;
  border: 1px solid #ddd4ff;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  box-shadow: 0 12px 35px rgba(124,75,245,0.12);
}

.search-box input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 15px;
  background: transparent;
}

.hero {
  padding: 35px 0 25px;
}

.hero-card {
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.28), transparent 30%),
    linear-gradient(135deg, #7c4bf5, #4f24c9);
  border-radius: 30px;
  padding: 42px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(124,75,245,0.32);
}

.mini-badge {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  padding: 8px 14px;
  border-radius: 50px;
  font-size: 13px;
  margin-bottom: 14px;
}

.hero-card h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1.15;
}

.hero-card p {
  margin: 12px 0 0;
  max-width: 550px;
  opacity: 0.9;
}

.hero-stats {
  background: rgba(255,255,255,0.17);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 22px 28px;
  border-radius: 24px;
  text-align: center;
}

.hero-stats b {
  display: block;
  font-size: 36px;
}

.hero-stats span {
  font-size: 14px;
  opacity: .85;
}

.ebook-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 22px;
  padding: 25px 0 50px;
}

.ebook-card {
  background: #fff;
  border: 1px solid #eee9ff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(17,24,39,0.07);
  transition: 0.25s ease;
}

.ebook-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 22px 55px rgba(124,75,245,0.20);
  border-color: #cbbdff;
}

.cover-wrap {
  position: relative;
  height: 260px;
  background: #f1eeff;
  overflow: hidden;
}

.cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(124,75,245,0.95);
  color: #fff;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 30px;
}

.ebook-info {
  padding: 16px;
}

.ebook-info h3 {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--dark);
  line-height: 1.35;
  min-height: 42px;
}

.price-row {
  margin-bottom: 14px;
}

.price {
  font-size: 20px;
  font-weight: 900;
  color: var(--primary);
}

.buy-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 10px 25px rgba(124,75,245,0.28);
}

.buy-btn:hover {
  opacity: 0.92;
}

.notice {
  background: #fff;
  border: 1px dashed #cbbdff;
  color: var(--primary);
  padding: 22px;
  border-radius: 18px;
  text-align: center;
  margin: 25px 0;
  font-weight: 700;
}

@media (max-width: 1200px) {
  .ebook-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .ebook-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .search-box {
    width: 320px;
  }
}

@media (max-width: 650px) {
  .nav {
    height: auto;
    padding: 16px 0;
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    width: 100%;
  }

  .hero-card {
    padding: 28px;
  }

  .hero-card h1 {
    font-size: 28px;
  }

  .ebook-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .cover-wrap {
    height: 220px;
  }
}

@media (max-width: 420px) {
  .ebook-grid {
    grid-template-columns: 1fr;
  }
}