/* ===========================
   Book & Show Tracker - Styles
   =========================== */

:root {
  --color-book: #4a90e2;  /* blue */
  --color-show: #34c759;  /* green */
}

body {
  font-family: sans-serif;
  margin: 0;
  padding: 40px 20px;
  background-color: #f2e9d8;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 27px,
    rgba(120, 90, 50, 0.08) 28px
  );
  color: #3a2f22;
}

.page-layout {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto;
}

.app-column {
  flex: 1;
  min-width: 0;
}

@media (max-width: 860px) {
  .page-layout {
    flex-direction: column;
  }
}

header {
  margin-bottom: 40px;
}

header h1 {
  font-size: 28px;
  margin-bottom: 4px;
}

header p {
  color: #666;
  margin: 0;
}

h2 {
  font-size: 20px;
  margin-bottom: 16px;
}

/* ===========================
   Add Item Form
   =========================== */

#form-section {
  background: #fffaf0;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 2px;
}

.form-group small {
  display: block;
  color: #888;
  font-size: 13px;
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  background-color: #fff;
  font-family: sans-serif;
}

.form-group textarea {
  height: 70px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74,144,226,0.15);
}

.form-group select {
  cursor: pointer;
}

button[type="submit"] {
  background-color: #4a90e2;
  color: #fff;
  border: none;
  padding: 12px 24px;
  font-size: 15px;
  border-radius: 6px;
  cursor: pointer;
}

button[type="submit"]:hover {
  background-color: #357abd;
}

/* ===========================
   Filter Buttons
   =========================== */

#type-filter-section,
#status-filter-section {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

#status-filter-section {
  margin-bottom: 24px;
}

.filter-btn {
  background-color: #fff;
  border: 1px solid #ccc;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 20px;
  cursor: pointer;
  color: #555;
}

.filter-btn:hover {
  border-color: #4a90e2;
  color: #4a90e2;
}

.filter-btn.active {
  background-color: #4a90e2;
  border-color: #4a90e2;
  color: #fff;
}

#listCount {
  font-size: 14px;
  font-weight: normal;
  color: #888;
  margin-left: 4px;
}

/* ===========================
   Item Cards
   =========================== */

.item-card {
  background: #fffaf0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  border-left: 4px solid #ccc;
}

.item-card.type-book { border-left-color: var(--color-book); }
.item-card.type-show { border-left-color: var(--color-show); }

.item-card.status-finished {
  opacity: 0.85;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.type-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  color: #fff;
}

.type-badge.type-book { background-color: var(--color-book); }
.type-badge.type-show { background-color: var(--color-show); }

.card-title {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  word-break: break-word;
}

.card-title.finished {
  text-decoration: line-through;
  color: #888;
}

/* Status badge — also acts as a button to toggle status */
.status-badge {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: bold;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid #ccc;
  background-color: #fff;
  color: #555;
  cursor: pointer;
  white-space: nowrap;
}

.status-badge.status-want {
  border-color: #4a90e2;
  color: #4a90e2;
}

.status-badge.status-want:hover {
  background-color: #eef4fc;
}

.status-badge.status-finished {
  border-color: #34c759;
  background-color: #34c759;
  color: #fff;
}

.status-badge.status-finished:hover {
  opacity: 0.85;
}

.card-label {
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  color: #888;
  margin: 12px 0 4px;
}

.card-text {
  margin: 0;
  line-height: 1.5;
}

.learnings-input {
  width: 100%;
  padding: 8px 10px;
  font-size: 16px;
  font-family: sans-serif;
  line-height: 1.5;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  resize: vertical;
  min-height: 60px;
}

.learnings-input:focus {
  outline: none;
  border-color: #34c759;
  box-shadow: 0 0 0 3px rgba(52,199,89,0.15);
}

.rating-row {
  display: flex;
  gap: 2px;
}

.star-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 22px;
  line-height: 1;
  color: #f5a623;
  cursor: pointer;
}

.star-btn:hover {
  transform: scale(1.1);
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

.card-date {
  font-size: 12px;
  color: #aaa;
  margin: 0;
}

.delete-btn {
  background: none;
  border: none;
  color: #bbb;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.delete-btn:hover {
  background-color: #fff0f0;
  color: #e74c3c;
}

/* Empty state */
.empty-message {
  text-align: center;
  color: #aaa;
  padding: 40px 0;
  margin: 0;
}

/* ===========================
   How-to Guide Panel
   =========================== */

.guide-panel {
  width: 260px;
  flex-shrink: 0;
  background: #fffaf0;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  position: sticky;
  top: 40px;
}

@media (max-width: 860px) {
  .guide-panel {
    width: 100%;
    position: static;
  }
}

.guide-panel h2 {
  font-size: 17px;
  margin-bottom: 16px;
}

.guide-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.guide-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.guide-step + .guide-step {
  margin-top: 20px;
}

.guide-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #f5e9cf;
  color: #a0672c;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide-title {
  font-size: 14px;
  font-weight: bold;
  margin: 0 0 4px;
}

.guide-text {
  font-size: 13px;
  color: #7a6b54;
  line-height: 1.5;
  margin: 0;
}
