body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  background: #f9f9fb;
  color: #333;
}

header {
  background: #333;
  color: white;
  padding: 1em 2em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  margin: 0;
}

header h1 a,
.menu-links a {
  color: white;
  text-decoration: none !important;
  font-weight: bold;
}

header h1 a:hover,
.menu-links a:hover {
  text-decoration: none !important;
  color: #f0c040;
}

.menu-links a {
  margin-left: 1.5em;
}

main {
  padding: 2em 4em;
}

.search-bar {
  display: flex;
  gap: 0.5em;
}

.search-bar input {
  padding: 0.5em;
  width: 250px;
}

.search-bar button {
  padding: 0.5em 1em;
}

.link-list {
  margin-top: 2em;
}

/* Tarjetas en cuadrícula */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5em;
  width: 100%;
}

.link-card {
  background: white;
  border-radius: 8px;
  padding: 1.2em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.1s ease;
}

.link-card:hover {
  transform: translateY(-2px);
}

.link-card h3 {
  font-size: 1.1em;
  margin: 0 0 0.3em 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.link-card h3 a {
  text-decoration: none;
  color: #4a4a4a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  transition: color 0.2s ease;
}

.link-card h3 a:hover {
  color: #007bff;
}

.tags {
  font-size: 0.9em;
  color: #666;
  margin-top: 0.5em;
}

.add-form input,
.add-form textarea {
  width: 100%;
  margin-bottom: 1em;
  padding: 0.5em;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.add-form button {
  padding: 0.7em 1.5em;
  background: #333;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.actions {
  margin-top: 0.8em;
}

.actions a,
.actions button {
  margin-right: 1em;
  font-size: 0.9em;
  text-decoration: none;
  background: none;
  border: none;
  color: #333;
  cursor: pointer;
}

.actions button:hover,
.actions a:hover {
  text-decoration: underline;
}

/* Tags */
.tag-section {
  margin-bottom: 3em;
}

.tag-header {
  font-size: 1.3em;
  color: #444;
  margin-bottom: 0.5em;
  border-left: 5px solid #aaa;
  padding-left: 0.5em;
}

.tag-header a {
  text-decoration: none;
  color: #4a4a4a;
  font-weight: bold;
  transition: color 0.2s ease;
}

.tag-header a:hover {
  color: #007bff;
}

.link-summary {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-size: 0.95em;
  color: #555;
  background: #f3f3f7;
  padding: 0.7em 1em;
  border-left: 4px solid #888;
  border-radius: 6px;
  width: fit-content;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

