/* style.css - Premium Modern Dark Theme (Forced) */

:root {
    /* Hardcoded premium dark colors to avoid "boring white" from Telegram light mode */
    --bg-main: #0f172a;
    --bg-secondary: #1e293b;
    --text-color: #f8fafc;
    --hint-color: #94a3b8;
    --link-color: #3b82f6;
    --accent-color: #8b5cf6;
    --button-text: #ffffff;
    --font-ui: 'Inter', -apple-system, system-ui, sans-serif;
    --font-reading: 'Lora', Georgia, serif;
    --max-reading-width: 680px;
}

body {
    background-color: var(--bg-main);
    color: var(--text-color);
    font-family: var(--font-ui);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    /* Subtle premium background gradient */
    background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.15), transparent 600px), 
                var(--bg-main);
    min-height: 100vh;
}

/* Layout */
.view-container {
    max-width: var(--max-reading-width);
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Header */
.telegraph-header {
    text-align: center;
    margin: 50px 0 40px;
}

.journal-title {
    font-size: 42px;
    font-weight: 900;
    letter-spacing: -1.5px;
    margin: 0;
    background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.3));
}

.telegraph-date {
    font-size: 14px;
    color: var(--hint-color);
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

/* Feed List */
.feed-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.article-card:hover {
    transform: translateY(-2px);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.article-card:active {
    transform: scale(0.98);
}

.card-category {
    font-size: 11px;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 10px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 12px;
    color: #ffffff;
}

.card-summary {
    font-size: 15px;
    color: var(--hint-color);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Article Detail View */
.nav-bar {
    padding: 15px 0;
    position: sticky;
    top: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.back-button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px 20px;
    border-radius: 30px;
    transition: all 0.2s;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.article-header h1 {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    margin: 40px 0 15px;
    color: #ffffff;
}

.article-meta {
    font-size: 14px;
    color: var(--hint-color);
    margin-bottom: 40px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.meta-separator {
    width: 4px;
    height: 4px;
    background: var(--hint-color);
    border-radius: 50%;
    opacity: 0.5;
}

/* Main Text (Original Article) */
.article-body {
    font-family: var(--font-reading);
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-color);
    white-space: pre-wrap;
    opacity: 0.8;
}

.original-source-section {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 100px;
}

.original-source-section summary {
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 700;
    color: var(--hint-color);
    cursor: pointer;
    text-align: center;
    list-style: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.original-source-section summary::-webkit-details-marker {
    display: none;
}

.original-source-section details[open] summary {
    margin-bottom: 30px;
}

/* AI Analysis Section (Now the primary content style) */
.markdown-body {
    font-family: var(--font-reading);
    font-size: 20px;
    line-height: 1.8;
    color: var(--text-color);
}

.markdown-body h2 {
    font-size: 24px;
    font-weight: 800;
    margin: 40px 0 20px;
    color: #ffffff;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
}

.markdown-body p { margin-bottom: 20px; }

.markdown-body ul {
    margin-bottom: 25px;
    padding-left: 20px;
}

.markdown-body li {
    margin-bottom: 12px;
}

.markdown-body details {
    background: rgba(15, 23, 42, 0.4);
    padding: 20px;
    border-radius: 16px;
    margin-top: 40px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.markdown-body summary {
    font-weight: 700;
    cursor: pointer;
    color: var(--hint-color);
    font-size: 15px;
    outline: none;
}

/* Global Elements */
.loader-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--bg-main);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(139, 92, 246, 0.1);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
    filter: drop-shadow(0 0 10px var(--accent-color));
}

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