/* --- Page layout --- */
.notebooks-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 6rem 2rem 2rem;
}

.notebooks-container h1 {
  font-size: 24px;
  font-weight: 500;
  color: #f0f0f0;
  margin: 0 0 2rem;
}

/* --- Notebook grid --- */
.notebook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

/* --- Notebook card --- */
.notebook-card {
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border: 0.5px solid #3a3a3a;
  background-color: #2b2b2b;
  transition: transform 0.15s, border-color 0.15s;
  position: relative;
  min-height: 140px;
}

.notebook-card:hover {
  transform: translateY(-2px);
  border-color: #555;
}

.notebook-color-bar {
  width: 36px;
  height: 4px;
  border-radius: 2px;
}

.notebook-name {
  font-size: 15px;
  font-weight: 500;
  color: #e0e0e0;
  margin: 0;
  line-height: 1.4;
}

.notebook-meta {
  font-size: 12px;
  color: #666;
  margin: 0;
}

.notebook-actions {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  gap: 0.4rem;
  opacity: 0;
  transition: opacity 0.15s;
}

.notebook-card:hover .notebook-actions {
  opacity: 1;
}

.notebook-action-btn {
  background: none;
  border: none;
  color: #666;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background-color 0.15s, color 0.15s;
}

.notebook-action-btn:hover {
  background-color: #3a3a3a;
  color: #e0e0e0;
}

.notebook-action-btn.delete:hover {
  color: #e07070;
}

/* --- New notebook card --- */
.notebook-card.new-card {
  border-style: dashed;
  align-items: center;
  justify-content: center;
  color: #555;
  font-size: 13px;
  gap: 0.5rem;
}

.notebook-card.new-card:hover {
  color: #aaa;
  border-color: #666;
}

.new-card-icon {
  font-size: 24px;
  line-height: 1;
}

/* --- Modal --- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.visible {
  display: flex;
}

.modal {
  background-color: #2b2b2b;
  border: 0.5px solid #3a3a3a;
  border-radius: 14px;
  width: 100%;
  max-width: 460px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  font-size: 17px;
  font-weight: 500;
  color: #f0f0f0;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: #666;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
}

.modal-close:hover {
  color: #e0e0e0;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* --- Color row --- */
.color-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

input[type="color"] {
  width: 48px;
  height: 36px;
  border: 0.5px solid #555;
  border-radius: 6px;
  background: none;
  cursor: pointer;
  padding: 2px;
}

.color-preview {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  flex: 1;
  transition: background-color 0.15s;
}

/* --- Small drop zone --- */
.drop-zone-sm {
  padding: 1.5rem 1rem;
  border-radius: 8px;
}

.file-selected {
  font-size: 12px;
  color: #888;
  margin: 0.25rem 0 0;
  min-height: 1rem;
}