/* Custom Pantone-Inspired Color Palette */
:root {
  --transparent-yellow: #F5EFC6;
  --sceptre-red: #4D0E12;
  --cerulean-blue: #A5BCD6;
  --potting-soil: #4A2E27;
  --java-brown: #231815;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background-color: #7f7f7f;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  padding: 20px;
}

/* CARD CONTAINER */
.ebook-card {
  background: #ffffff;
  border: 1px solid rgba(165, 188, 214, 0.6);
  width: 100%;
  max-width: 860px;
  border-radius: 28px;
  padding: 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

/* HEADER & BACK BUTTON */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid #d0e0f0;
  border-radius: 12px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--java-brown);
  cursor: pointer;
  transition: all 0.2s ease;
}

.back-btn:hover {
  background: var(--transparent-yellow);
  border-color: #e2d9a3;
  color: var(--sceptre-red);
}

.back-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--sceptre-red);
  background: var(--transparent-yellow);
  padding: 6px 14px;
  border-radius: 16px;
}

.close-icon {
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--java-brown);
  cursor: pointer;
}

.card-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--java-brown);
  margin-bottom: 8px;
  line-height: 1.25;
}

.card-desc {
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--potting-soil);
  margin-bottom: 20px;
  opacity: 0.9;
}

/* ACTION CONTROLS BAR */
.action-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-box {
  flex: 1.5;
  min-width: 200px;
}

.custom-input,
.custom-select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #c8d8e8;
  background: #ffffff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--java-brown);
  outline: none;
}

.custom-select {
  flex: 2;
  min-width: 220px;
}

.btn-yellow {
  background: var(--transparent-yellow);
  color: var(--java-brown);
  border: 1px solid #e2d9a3;
  border-radius: 14px;
  padding: 12px 20px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.btn-dark {
  background: var(--sceptre-red);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  padding: 12px 20px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

/* READER CANVAS */
.reader-container {
  background: linear-gradient(135deg, #fbf8e6 0%, #e8f0f8 100%);
  border: 1px solid #d0e0f0;
  border-radius: 20px;
  padding: 24px;
  min-height: 200px;
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: 20px;
}

.reader-text h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--java-brown);
  margin-bottom: 12px;
}

.reader-text p {
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--potting-soil);
  margin-bottom: 10px;
}

/* HIGHLIGHT MARK STYLE */
mark.highlight {
  background-color: #fce881;
  color: var(--sceptre-red);
  font-weight: 700;
  padding: 2px 4px;
  border-radius: 4px;
}

/* NOTE TAKING WORKSPACE */
.notes-workspace {
  background: #f4f8fc;
  border: 1px solid #d0e0f0;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--sceptre-red);
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}

.notes-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.notes-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notes-list li {
  background: #ffffff;
  border: 1px solid #e0ecf8;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--java-brown);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.delete-note {
  color: var(--sceptre-red);
  cursor: pointer;
  font-weight: 800;
  margin-left: 10px;
}

/* FOOTER STATUS */
.card-footer {
  display: flex;
  align-items: center;
}

.status-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--potting-soil);
}