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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f0f2f5;
  color: #1c1e21;
  line-height: 1.5;
}

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid #dddfe2;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header h1 {
  font-size: 20px;
  font-weight: 700;
  color: #1877f2;
}

.feed {
  max-width: 640px;
  margin: 16px auto;
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 32px;
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  border-radius: 8px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.card-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 10px;
  border-bottom: 1px solid #e4e6eb;
}

.source-logo {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  flex-shrink: 0;
}

.source-name {
  font-weight: 700;
  font-size: 16px;
  flex: 1;
}

.post-time {
  font-size: 12px;
  color: #65676b;
}

.category-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  color: #fff;
}

.thumbnail {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


.card-body {
  padding: 12px 16px;
}

.card-body h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
}

.card-body p {
  font-size: 14px;
  color: #4b4f56;
}


/* Loading / Error / Empty states */
.feed-loading,
.feed-error,
.feed-empty {
  text-align: center;
  padding: 48px 16px;
  font-size: 15px;
  color: #65676b;
}

.feed-loading {
  color: #1877f2;
}

.feed-error {
  color: #ef4444;
}

.hidden {
  display: none !important;
}

.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #f0f2f5;
}

.login-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  padding: 48px 40px;
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.login-card h1 {
  font-size: 28px;
  font-weight: 700;
  color: #1877f2;
  margin-bottom: 8px;
}

.login-card p {
  font-size: 15px;
  color: #65676b;
  margin-bottom: 32px;
}

.google-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  color: #3c4043;
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}

.google-login-btn:hover {
  background: #f7f8f8;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.user-menu {
  position: relative;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  transition: opacity 0.15s;
}

.user-avatar:hover {
  opacity: 0.8;
}

.user-dropdown {
  position: absolute;
  top: 44px;
  right: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  padding: 4px 0;
  z-index: 20;
}

.dropdown-logout {
  display: block;
  width: 100%;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #65676b;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.dropdown-logout:hover {
  background: #f0f2f5;
}
