/* Contenedor de notas */
.notes-container {
  max-width: 850px;
  margin: 50px auto 0;
  padding: 0 12px;
}

.notes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.notes-title {
  font-size: 30px;
  font-weight: 700;
}

.notes-counter {
  font-size: 16px;
  color: var(--text-secondary);
  background: var(--card-background);
  padding: 8px 16px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.notes-counter .current {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 20px;
}

.add-note-btn {
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

.add-note-btn:hover {
  background: #0056CC;
  transform: scale(1.05);
}

.add-note-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Grid de notas */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.note-card {
  background: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  min-height: 280px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: all 0.2s;
  padding: 18px 18px 55px;
  cursor: pointer;
}

.note-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.note-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 12px;
  margin-top: 0;
  outline: none;
  cursor: pointer;
  overflow: hidden;
  word-break: break-word;
  color: var(--primary-color);
}

.note-content {
  font-size: 15px;
  color: var(--text-secondary);
  outline: none;
  min-height: 180px;
  max-height: 300px;
  white-space: pre-wrap;
  cursor: pointer;
  overflow: hidden;
  overflow-y: auto;
  word-break: break-word;
  padding-bottom: 10px;
  line-height: 1.6;
  flex: 1;
}

.note-content h1,
.note-content h2,
.note-content h3,
.note-content h4 {
  margin: 8px 0;
  color: var(--text-primary);
}

.note-content ul,
.note-content ol {
  margin-left: 20px;
  margin: 8px 0;
}

.note-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 10px 0;
  font-size: 14px;
}

.note-content table td,
.note-content table th {
  border: 1px solid var(--border-color);
  padding: 6px 8px;
}

.note-content p {
  margin: 6px 0;
}

.note-actions {
  position: absolute;
  bottom: 15px;
  right: 15px;
  display: flex;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.3s;
}

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

.note-actions button {
  background: var(--background);
  border: none;
  border-radius: 6px;
  font-size: 16px;
  padding: 6px 10px;
  color: var(--primary-color);
  cursor: pointer;
  transition: background 0.2s;
}

.note-actions button:hover {
  background: var(--primary-color);
  color: #fff;
}
