:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 1.25rem 2rem;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

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

.logo .highlight {
  color: var(--accent-blue);
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.nav-btn:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.04);
  text-decoration: none;
}

.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

button {
    padding: 0.5rem 1rem;
    background-color: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.875rem;
}

button:hover {
    background-color: var(--accent-blue-hover);
}

/* Main Content */
main {
  padding-top: 90px;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
  padding-bottom: 2rem;
}

.article-card {
    background-color: var(--bg-primary);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.1s ease;
    cursor: pointer;
}

.article-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.article-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.article-title {
    font-size: 1.25rem;
    margin: 0 0 10px 0;
    color: var(--text-primary);
    font-weight: 700;
}

.article-snippet {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--bg-primary);
    margin: 5% auto;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    position: relative;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

input[type="text"] {
    flex-grow: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

#settings-feed-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

#settings-feed-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}

#settings-feed-list button {
    background-color: transparent;
    color: #ef4444;
    border: 1px solid var(--border);
    padding: 4px 10px;
    font-size: 0.75rem;
}

#settings-feed-list button:hover {
    background-color: #fef2f2;
    border-color: #ef4444;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--text-primary);
}

#modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

#modal-body h1 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

#modal-body a {
    color: var(--accent-blue);
}

@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }
    .logo {
        font-size: 1.0625rem;
    }
    main {
        padding-top: 80px;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}