* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #020617 0, #020617 40%, #020617 70%, #020617 100%);
  color: #e5e7eb;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  padding: 1.4rem 2.4rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  background: linear-gradient(90deg, #020617, #020617 55%, #020617 100%);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: radial-gradient(circle at 20% 0, #38bdf8, #0f172a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.brand-text h1 {
  font-size: 1.7rem;
  font-weight: 700;
}

.brand-text p {
  margin-top: 0.1rem;
  font-size: 0.85rem;
  color: #9ca3af;
}

.main {
  flex: 1;
  padding: 2.4rem 2.4rem 2.2rem;
  display: flex;
  justify-content: center;
}

.panel {
  width: 100%;
  max-width: 1200px;
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.9));
  border-radius: 1.25rem;
  padding: 1.7rem 1.9rem 2.1rem;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.hero {
  background: linear-gradient(90deg, #0b5ed7, #0d6efd);
  border-radius: 1rem;
  padding: 1.4rem 1.6rem;
  color: #f9fafb;
  margin-bottom: 1.4rem;
}

.hero-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.hero-content p {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  opacity: 0.95;
}

.hero-search {
  margin-top: 1rem;
}

.hero-search .hero-select {
  width: 100%;
}

.hero-select {
  width: 100%;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: none;
  font-size: 0.9rem;
  color: #111827;
}

.panel-layout {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1.5rem;
}

.sidebar {
  background: #020617;
  border-radius: 0.9rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-size: 0.85rem;
}

.sidebar h3 {
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}

.sidebar ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar li {
  padding: 0.25rem 0;
  color: #cbd5f5;
}

.content-area {
  display: flex;
  flex-direction: column;
}

.panel h2 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.panel-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.panel-header h2 {
  margin-bottom: 0.15rem;
}

.panel-header p {
  font-size: 0.85rem;
  color: #9ca3af;
}

.ebooks-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.category-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.category-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}

.category-empty {
  font-size: 0.85rem;
  color: #9ca3af;
}

.category-card {
  cursor: pointer;
}

.back-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.back-bar h3 {
  font-size: 1rem;
  font-weight: 600;
}

.back-button {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 0.8rem;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.back-button:hover {
  border-color: #38bdf8;
  color: #f9fafb;
}

.ebook-item {
  display: flex;
  flex-direction: column;
  border-radius: 1.1rem;
  overflow: hidden;
  background: #020617;
  border: 1px solid rgba(30, 64, 175, 0.45);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.9);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.ebook-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 45px rgba(15, 23, 42, 1);
  border-color: rgba(56, 189, 248, 0.8);
  background-color: #020617;
}

.ebook-thumb {
  position: relative;
  height: 120px;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.35), rgba(15, 23, 42, 0.96));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ebook-thumb span {
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(248, 250, 252, 0.9);
  text-align: center;
  padding: 0 0.5rem;
}

.ebook-body {
  padding: 0.9rem 1rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ebook-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.ebook-subtitle {
  font-size: 0.8rem;
  color: #9ca3af;
}

.ebook-footer {
  padding: 0 1rem 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ebook-tag {
  font-size: 0.7rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.5);
}

.ebook-actions {
  display: flex;
  gap: 0.5rem;
}

.button-link {
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.15s ease;
}

.button-link:hover {
  border-color: #38bdf8;
  color: #f9fafb;
  transform: translateY(-1px);
}

.footer {
  padding: 1rem 2rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 0.8rem;
  color: #6b7280;
}
