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

body {
    font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f7f7f5;
    color: #1a1a1a;
    line-height: 1.6;
    font-size: 15px;
}

/* Header */

header {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-inner {
    max-width: 700px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

h1 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}

nav {
    display: flex;
    gap: 6px;
}

nav button {
    padding: 5px 14px;
    border: 1px solid #ddd;
    border-radius: 99px;
    background: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    color: #555;
    transition: background 0.1s, color 0.1s, border-color 0.1s;
}

nav button:hover {
    background: #f0f0ee;
}

nav button.active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

nav button span {
    opacity: 0.65;
}

/* Main */

main {
    max-width: 700px;
    margin: 0 auto;
    padding: 28px 20px 60px;
}

.hidden {
    display: none !important;
}

/* Articles */

#articleList {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article {
    padding: 16px 0;
    border-bottom: 1px solid #e5e5e5;
}

.article:last-child {
    border-bottom: none;
}

.article-title {
    margin: 0 0 5px;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
}

.article-title a {
    color: #1a1a1a;
    text-decoration: none;
}

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

.article-meta {
    font-size: 0.78rem;
    color: #888;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.article-meta a {
    color: #888;
    text-decoration: none;
}

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

.meta-sep {
    color: #ccc;
}

/* Status messages */

.status-msg {
    color: #888;
    font-size: 0.9rem;
    padding: 32px 0;
    text-align: center;
}

.error {
    color: #c0392b;
    font-size: 0.82rem;
    margin: 6px 0 0;
}

/* Subscriptions */

.subs-section {
    margin-bottom: 36px;
}

.subs-section h2 {
    font-size: 0.72rem;
    font-weight: 600;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 14px;
}

#noSubs {
    color: #aaa;
    font-size: 0.85rem;
    margin: 0 0 8px;
}

/* Add feed form */

.add-feed-form {
    display: flex;
    gap: 8px;
}

.add-feed-form input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    background: #fff;
    transition: border-color 0.15s;
}

.add-feed-form input:focus {
    border-color: #1a1a1a;
}

.add-feed-form button {
    padding: 8px 16px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-family: inherit;
    white-space: nowrap;
    transition: background 0.1s;
}

.add-feed-form button:hover {
    background: #333;
}

/* Feed list */

#subscriptionList,
#recommendedList {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feed-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0ee;
}

.feed-item:last-child {
    border-bottom: none;
}

.feed-info {
    flex: 1;
    min-width: 0;
}

.feed-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1a1a1a;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feed-name:hover {
    text-decoration: underline;
}

.feed-url {
    display: block;
    font-size: 0.72rem;
    color: #bbb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.btn-feed {
    flex-shrink: 0;
    padding: 4px 12px;
    font-size: 0.78rem;
    font-family: inherit;
    border-radius: 5px;
    cursor: pointer;
    border: 1px solid;
    transition: background 0.1s;
}

.btn-feed.add {
    background: #fff;
    color: #1a1a1a;
    border-color: #ddd;
}

.btn-feed.add:hover {
    background: #f0f0ee;
}

.btn-feed.remove {
    background: #fff;
    color: #c0392b;
    border-color: #e8c0bb;
}

.btn-feed.remove:hover {
    background: #fff5f4;
}
