/* my lovely css */
body {
  margin: 0;
  background-color: #f0f8ff;
  font-family: 'Red Hat Text', sans-serif;
  color: #333333;
  padding: 0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* container centers content horizontally and adds breathing room */
.container {
  max-width: 800px;
  margin: 40px auto; /* centers horizontally */
  padding: 20px;
}

h1 {
  color: #0066cc;
  text-align: center;
  margin-top: 20px;
}

h2 {
  color: #004080;
  margin-top: 15px;
}

h3 {
  color: #003366;
  margin-top: 10px;
}

p {
  line-height: 1.6;
  margin: 10px 20px;
}

/* form layout */
form {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* single definition for input */
input[type="text"] {
  padding: 10px 16px;
  width: 60%;
  border: 1px solid #cccccc;
  border-right: none;                 /* merge with button */
  border-radius: 24px 0 0 24px;       /* round left side */
  outline: none;
  font-family: 'Red Hat Text', sans-serif;
}

/* button next to input */
button {
  padding: 10px 16px;
  border: 1px solid #cccccc;
  border-left: none;                  /* merge with input */
  border-radius: 0 24px 24px 0;       /* round right side */
  background: #4285f4;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

button:disabled {
  background: #999999;
  cursor: not-allowed;
}

.spinner {
  display: inline-block;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

/* dark mode styles */
.dark-mode-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #0a0929;
  color: #d3d3d3;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  padding: 0;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.dark-mode-toggle:hover {
  background: #1a1a2e;
  transform: scale(1.05);
}

body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3 {
  color: #90caf9;
}

body.dark-mode input[type="text"] {
  background-color: #1e1e1e;
  color: #e0e0e0;
  border: 1px solid #444444;
}

body.dark-mode button {
  background: #2979ff;
  color: white;
}

body.dark-mode .note {
  color: #aaaaaa;
}

/* article cards */
.article-summary {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 12px 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  position: relative;
}

.article-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.article-title {
  font-weight: 600;
}

.article-date {
  color: #666666;
  font-size: 0.9rem;
  white-space: nowrap;
}

.article-body {
  margin-top: 8px;
}

body.dark-mode .article-summary {
  background-color: #1e1e1e;
  border-color: #333333;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

body.dark-mode .article-date {
  color: #b0b0b0;
}

/* mark as read button */
.mark-read {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border: none;
  background: #eef5ff;
  color: #004080;
  border-radius: 9999px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mark-read .material-symbols-rounded {
  font-variation-settings: 'FILL' 0, 'wght' 600, 'GRAD' 0, 'opsz' 24;
}

.mark-read:hover {
  background: #dbe9ff;
}

body.dark-mode .mark-read {
  background: #23314f;
  color: #b9d1ff;
}

body.dark-mode .mark-read:hover {
  background: #2b3b63;
}


/* feed list (yum yum) */
.feed-dropdown summary, .posts-dropdown summary {
  margin: 8px 20px 8px 20px;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #004080;
}

body.dark-mode .feed-dropdown summary, body.dark-mode .posts-dropdown summary {
  color: #b9d1ff;
}

.feed-list {
  margin: 8px 20px 16px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feed-item {
  background: #eef5ff;
  border: 1px solid #cfe0ff;
  color: #004080;
  padding: 6px 8px 6px 10px;
  border-radius: 9999px;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}

body.dark-mode .feed-item {
  background: #1e2a44;
  border-color: #23314f;
  color: #b9d1ff;
}

.feed-url {
  display: inline-block;
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-item .feed-delete {
  all: unset;
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  cursor: pointer;
  color: inherit;
  background: transparent;
}

.feed-item .feed-delete:hover {
  background: rgba(0, 0, 0, 0.06);
}

body.dark-mode .feed-item .feed-delete:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* bottom-left note */
.note {
  position: fixed;
  bottom: 16px;
  left: 16px;
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.85;
}

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

.article-title a:hover {
  text-decoration: underline;
}

/* theres so much css for a simple site */
/* that i guess one day you just forget you coded something 
and you just keep adding more and more 
and more
and more
and more
and more    */
/* until you have a massive css file */
/* tbh i like refactoring but i also dont like refactoring
i like the part where all your code is organised
but everything just breaks */
