/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Merriweather:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    /* Base styling variables */
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --card-bg: #ffffff;
    --primary-color: #3b82f6;
    --hover-color: #2563eb;
    --border-color: #e2e8f0;
    --meta-color: #64748b;
    
    /* Reader specific variables controlled by JS */
    --reader-font-size: 1.125rem;
    --reader-line-height: 1.7;
    --reader-width: 800px;
    --reader-font-family: 'Merriweather', serif;
    --ui-font-family: 'Inter', sans-serif;
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --text-color: #e2e8f0;
    --card-bg: #1e293b;
    --primary-color: #60a5fa;
    --hover-color: #3b82f6;
    --border-color: #334155;
    --meta-color: #94a3b8;
}

body {
    margin: 0;
    font-family: var(--ui-font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.app-header {
    padding: 4rem 0 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

.app-header h1 {
    font-size: 3rem;
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.05em;
    color: var(--primary-color);
}

.app-header p {
    color: var(--meta-color);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.header-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}
.bookmark-link { font-size: 0.9rem; color: var(--primary-color); text-decoration: none; font-weight: 500; }
.bookmark-link:hover { text-decoration: underline; }

.btn {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
    color: var(--text-color);
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background 0.2s, border-color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:hover {
    background: var(--card-bg);
    border-color: var(--primary-color);
}

/* List Layout */
.articles-list {
    display: flex;
    flex-direction: column;
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 4rem;
}

.list-card {
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--border-color);
}

.list-card:last-child {
    border-bottom: none;
}

@media (min-width: 600px) {
    .list-card {
        flex-direction: row;
        align-items: center;
    }
}

.list-card-content {
    flex: 1;
}

.list-card-title {
    font-size: 1.15rem;
    margin: 0 0 0.25rem 0;
    line-height: 1.4;
    font-weight: 600;
}

.list-card-title a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.2s;
}

.list-card-title a:hover {
    color: var(--primary-color);
}

.list-card-meta {
    font-size: 0.9rem;
    color: var(--meta-color);
}

.list-card-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

@media (min-width: 600px) {
    .list-card-actions {
        margin-top: 0;
        margin-left: 2rem;
    }
}

.link-btn {
    font-size: 0.85rem;
    color: var(--meta-color);
    text-decoration: none;
    transition: color 0.2s;
}

.link-btn:hover {
    color: var(--text-color);
}

.link-btn-danger:hover {
    color: #ef4444; /* Red color for delete action */
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.2s;
    cursor: pointer;
    border: none;
}

.btn:hover {
    background: var(--hover-color);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Empty State */
.empty-state {
    text-align: center;
    grid-column: 1 / -1;
    padding: 4rem 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px dashed var(--border-color);
}

/* READER SPECIFICS */
.reader-body {
    background-color: var(--bg-color);
}

.reader-nav {
    position: sticky;
    top: 0;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-link {
    text-decoration: none;
    color: var(--meta-color);
    font-weight: 600;
    display: flex;
    align-items: center;
}

.back-link:hover {
    color: var(--primary-color);
}

.reader-controls {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.control-group {
    display: flex;
    background: var(--bg-color);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.control-group button, .reader-controls > button, .ctrl-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 0.75rem;
    color: var(--text-color);
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
}

.control-group button:hover, .reader-controls > button:hover, .ctrl-btn:hover {
    background: var(--border-color);
}

.ctrl-btn.danger:hover {
    color: #ef4444;
}

.reader-controls > button {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1.2rem;
}

.reader-container {
    max-width: var(--reader-width);
    margin: 0 auto;
    padding: 4rem 1.5rem;
    transition: max-width 0.3s ease;
}

.article-header {
    margin-bottom: 3rem;
}

.article-title {
    font-size: 2.5rem;
    font-family: var(--ui-font-family);
    margin: 0 0 1rem 0;
    line-height: 1.2;
    color: var(--text-color);
}

.article-meta {
    font-size: 1rem;
    color: var(--meta-color);
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.original-url {
    color: var(--primary-color);
    text-decoration: none;
}

.article-body {
    font-family: var(--reader-font-family);
    font-size: var(--reader-font-size);
    line-height: var(--reader-line-height);
    color: var(--text-color);
    transition: font-size 0.2s, line-height 0.2s;
}

.article-body img, .article-body iframe, .article-body figure {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    display: block;
}

.article-body p {
    margin-bottom: 1.5em;
}

.article-body h2, .article-body h3, .article-body h4 {
    font-family: var(--ui-font-family);
    margin-top: 2em;
    margin-bottom: 1em;
    font-weight: 700;
}

.article-body a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}
