*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-size: 16px;
  font-family: 'Courier New', Courier, monospace;
  color: #0ceefa;
  background-color: #0a0a0f;
  line-height: 1.6;
  min-height: 100vh;
}

#main {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

/* --- Header --- */
.site-header {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(12, 238, 250, 0.15);
  margin-bottom: 2rem;
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(12, 238, 250, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse at 20% 50%, rgba(255, 0, 153, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(0, 255, 100, 0.03) 0%, transparent 60%);
  pointer-events: none;
}

.header-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #ff0099;
  text-shadow:
    0 0 10px rgba(255, 0, 153, 0.6),
    0 0 30px rgba(255, 0, 153, 0.3);
  margin-bottom: 0.15rem;
  line-height: 1.1;
}

.header-title a {
  color: inherit;
  text-decoration: none;
}

.header-subtitle {
  font-size: clamp(0.9rem, 2.5vw, 1.3rem);
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #0ceefa;
  text-shadow:
    0 0 8px rgba(12, 238, 250, 0.5),
    0 0 20px rgba(12, 238, 250, 0.2);
  margin-bottom: 1rem;
}

.header-line {
  width: 60%;
  max-width: 20rem;
  height: 2px;
  margin: 0 auto 1rem;
  background: linear-gradient(90deg, transparent, #0ceefa, #ff0099, #0ceefa, transparent);
  border: none;
  opacity: 0.6;
}

/* --- Navigation --- */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1rem;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.site-nav a {
  color: #0ceefa;
  text-decoration: none;
  padding: 0.2rem 0;
  transition: color 0.2s, text-shadow 0.2s;
  opacity: 0.7;
}

.site-nav a:hover,
.site-nav a.active {
  color: #ff0099;
  opacity: 1;
  text-shadow: 0 0 8px rgba(255, 0, 153, 0.4);
}

.nav-sep {
  color: rgba(12, 238, 250, 0.25);
  user-select: none;
}

/* --- Tag Cloud --- */
.tag-cloud {
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-link {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: rgba(255, 0, 153, 0.08);
  border: 1px solid rgba(255, 0, 153, 0.2);
  border-radius: 3px;
  color: #ff0099;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.tag-link:hover {
  background: rgba(255, 0, 153, 0.15);
  border-color: rgba(255, 0, 153, 0.4);
}

/* --- Search --- */
.search-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.search-form input[type="text"] {
  flex: 1;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  color: #0ceefa;
  background: rgba(12, 238, 250, 0.04);
  border: 1px solid rgba(12, 238, 250, 0.15);
  border-radius: 3px;
  padding: 0.5rem 0.75rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-form input[type="text"]:focus {
  border-color: rgba(12, 238, 250, 0.4);
}

.search-form input[type="text"]::placeholder {
  color: rgba(12, 238, 250, 0.3);
}

.search-form button {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 0, 153, 0.3);
  border-radius: 3px;
  background: rgba(255, 0, 153, 0.06);
  color: #ff0099;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.search-form button:hover {
  border-color: rgba(255, 0, 153, 0.6);
  background: rgba(255, 0, 153, 0.12);
}

/* --- Bookmark Cards --- */
.bookmark-card {
  border: 1px solid rgba(12, 238, 250, 0.12);
  border-radius: 4px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  background: rgba(12, 238, 250, 0.02);
  transition: border-color 0.3s, background 0.3s;
}

.bookmark-card:hover {
  border-color: rgba(12, 238, 250, 0.25);
  background: rgba(12, 238, 250, 0.04);
}

.bookmark-card.is-read {
  opacity: 0.7;
}

.bookmark-card.is-unread {
  border-left: 3px solid #ff0099;
}

.bookmark-card.has-screenshot {
  display: flex;
  gap: 1rem;
}

.bookmark-screenshot {
  flex-shrink: 0;
  width: 200px;
  height: 125px;
  overflow: hidden;
  border-radius: 3px;
  border: 1px solid rgba(12, 238, 250, 0.1);
}

.bookmark-screenshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.bookmark-screenshot:hover img {
  transform: scale(1.05);
}

.bookmark-content {
  flex: 1;
  min-width: 0;
}

@media (max-width: 600px) {
  .bookmark-card.has-screenshot {
    flex-direction: column;
  }
  
  .bookmark-screenshot {
    width: 100%;
    height: 150px;
  }
}

.bookmark-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.bookmark-favicon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.unread-badge {
  font-size: 0.6rem;
  padding: 0.1rem 0.4rem;
  background: rgba(255, 0, 153, 0.2);
  border: 1px solid rgba(255, 0, 153, 0.4);
  border-radius: 3px;
  color: #ff0099;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bookmark-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ff0099;
  margin: 0;
  text-shadow: 0 0 6px rgba(255, 0, 153, 0.2);
  flex: 1;
}

.bookmark-title a {
  color: inherit;
  text-decoration: none;
}

.bookmark-title a:hover {
  text-shadow: 0 0 12px rgba(255, 0, 153, 0.5);
}

.bookmark-url {
  font-size: 0.75rem;
  color: rgba(12, 238, 250, 0.5);
  margin-bottom: 0.5rem;
  word-break: break-all;
}

.bookmark-url a {
  color: inherit;
  text-decoration: none;
}

.bookmark-url a:hover {
  color: #0ceefa;
}

.archive-link {
  margin-left: 0.5rem;
  font-size: 0.7rem;
  color: rgba(12, 238, 250, 0.4);
}

.archive-link:hover {
  color: #0ceefa;
}

.bookmark-snippet {
  font-size: 0.9rem;
  color: rgba(12, 238, 250, 0.8);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.bookmark-tags {
  font-size: 0.75rem;
}

.bookmark-tags a {
  text-decoration: none;
}

.bookmark-tags span {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  margin-right: 0.25rem;
  background: rgba(255, 0, 153, 0.1);
  border: 1px solid rgba(255, 0, 153, 0.2);
  border-radius: 3px;
  color: #ff0099;
  transition: background 0.2s;
}

.bookmark-tags a:hover span {
  background: rgba(255, 0, 153, 0.2);
}

.bookmark-date {
  font-size: 0.7rem;
  color: rgba(12, 238, 250, 0.3);
  margin-top: 0.5rem;
}

.no-bookmarks {
  text-align: center;
  padding: 2rem;
  color: rgba(12, 238, 250, 0.4);
}

/* --- Footer --- */
.site-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.75rem;
  color: rgba(12, 238, 250, 0.25);
  border-top: 1px solid rgba(12, 238, 250, 0.08);
  max-width: 48rem;
  margin: 0 auto;
}

/* --- General --- */
a {
  color: #ff0099;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .bookmark-card {
    padding: 1rem;
  }

  .site-nav {
    gap: 0.15rem 0.6rem;
  }
}
