/* IRCnet Daily News — light theme */

:root {
    --bg: #f8f9fb;
    --bg-card: #ffffff;
    --bg-card-hover: #fefefe;
    --border: #e5e7eb;
    --border-hover: #d1d5db;
    --text: #1e293b;
    --text-muted: #64748b;
    --text-dim: #94a3b8;
    --accent: #d97706;
    --accent-hover: #b45309;
    --green: #059669;
    --red: #dc2626;
    --purple: #7c3aed;
    --blue: #0284c7;
    --max-width: 800px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
}

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

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* Header */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 28px 20px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    flex-shrink: 0;
    background: #fffbeb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    box-shadow: 0 0 0 6px rgba(217,119,6,0.08);
}

.header-text h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #b45309 0%, #d97706 50%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-text .subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 4px;
}

.header-text .author {
    color: var(--text-dim);
    font-size: 0.8rem;
    margin-top: 6px;
    font-style: italic;
}

.header-nav {
    margin-left: auto;
    display: flex;
    gap: 12px;
    align-items: center;
}

.header-nav a {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.header-nav a:hover {
    color: var(--accent);
    background: rgba(217,119,6,0.06);
}

.header-nav .rss-link {
    color: #ea580c;
    border: 1px solid rgba(234,88,12,0.25);
}

/* Main */
.main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 32px 20px 60px;
}

/* Article cards — list view */
.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px 28px 20px;
    margin-bottom: 20px;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.article-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.article-date {
    color: var(--text-dim);
    font-size: 0.82rem;
    font-weight: 500;
}

.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag-dramatic { background: #fef2f2; color: #dc2626; }
.tag-funny { background: #fffbeb; color: #d97706; }
.tag-wholesome { background: #ecfdf5; color: #059669; }
.tag-chaos { background: #f5f3ff; color: #7c3aed; }
.tag-boring { background: #f8fafc; color: #94a3b8; }
.tag-default { background: #eff6ff; color: #0284c7; }

.article-title {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 10px;
    color: #0f172a;
}

.article-lead {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.vote-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.vote-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.vote-btn:hover { background: #f8fafc; }

.vote-btn.like:hover,
.vote-btn.like.active { border-color: #86efac; color: var(--green); background: #ecfdf5; }

.vote-btn.dislike:hover,
.vote-btn.dislike.active { border-color: #fca5a5; color: var(--red); background: #fef2f2; }

.vote-btn .count { font-weight: 600; }

.read-more {
    color: var(--accent);
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s;
}

.article-card:hover .read-more { gap: 8px; }

/* Article full view */
.article-full {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 40px 36px;
    box-shadow: var(--shadow-sm);
}

.article-full .article-title {
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.article-full .article-lead {
    font-size: 1.1rem;
    color: var(--text);
    font-weight: 500;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.article-content {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text);
}

.article-content p { margin-bottom: 16px; }

.article-signature {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-style: italic;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
    transition: color 0.2s;
}

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

.article-full .vote-section {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.article-full .vote-section .label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-right: auto;
}

.article-full .vote-btn {
    padding: 10px 22px;
    font-size: 0.95rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 32px;
}

.pagination button {
    padding: 8px 20px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.pagination button:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
}

.pagination button:disabled {
    opacity: 0.3;
    cursor: default;
}

/* Loading / empty */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
    font-size: 1.1rem;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-dim);
}

.empty-state .emoji { font-size: 3rem; margin-bottom: 16px; }
.empty-state h2 { color: var(--text-muted); font-size: 1.3rem; margin-bottom: 8px; }
.empty-state p { font-size: 0.95rem; }

/* Footer */
.site-footer {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.78rem;
    border-top: 1px solid var(--border);
}

.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--accent); }

/* Comments */
.comments-section {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.comments-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.comment-input, .comment-textarea {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text);
    background: var(--bg);
    transition: border-color 0.2s;
    resize: vertical;
}

.comment-input:focus, .comment-textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.comment-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.comment-submit {
    padding: 8px 20px;
    border-radius: 10px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.comment-submit:hover { background: var(--accent-hover); }
.comment-submit:disabled { opacity: 0.5; cursor: default; }

.comment-feedback { font-size: 0.85rem; }
.comment-feedback.error { color: var(--red); }
.comment-feedback.success { color: var(--green); }

.comments-list { display: flex; flex-direction: column; gap: 14px; }

.comments-empty {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.9rem;
    padding: 20px 0;
}

.comment {
    padding: 14px 18px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.comment-nick {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--accent);
}

.comment-date {
    font-size: 0.78rem;
    color: var(--text-dim);
}

.comment-body {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text);
    word-break: break-word;
}

/* Responsive */
@media (max-width: 640px) {
    .header-inner { flex-direction: column; text-align: center; padding: 24px 16px; }
    .header-nav { margin-left: 0; }
    .header-text h1 { font-size: 1.5rem; }
    .article-card { padding: 20px 18px 16px; }
    .article-full { padding: 24px 20px; }
    .article-title { font-size: 1.15rem !important; }
    .article-full .article-title { font-size: 1.4rem !important; }
    .article-full .vote-section { flex-wrap: wrap; }
}
