/* Cooldown News - Clean Design */

:root {
    --primary: #0ea5e9;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #334155;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

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

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    display: flex;
    align-items: center;
    gap: 30px;
    height: 50px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.logo:hover {
    color: var(--primary);
    text-decoration: none;
}

.logo-icon {
    width: 24px;
    height: 24px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 5px;
    flex: 1;
}

.nav-links a {
    display: block;
    padding: 8px 14px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    background: var(--bg-dark);
    text-decoration: none;
}

.btn-admin {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: opacity 0.2s;
}

.btn-admin:hover {
    opacity: 0.9;
    text-decoration: none;
    color: white;
}

/* Header */
.section-header {
    padding: 40px 0 30px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 30px;
}

.section-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.header-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.header-meta span {
    margin: 0 4px;
}

/* Article List */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 20px 0 50px;
}

.article-item {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.article-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.article-main {
    display: flex;
    flex-direction: column;
}

.article-image-link {
    display: block;
}

.article-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: var(--bg-dark);
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-item:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.article-category {
    display: inline-block;
    background: rgba(14, 165, 233, 0.15);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
}

.article-title {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.4;
}

.article-title a {
    color: var(--text-primary);
    background: none;
    -webkit-text-fill-color: var(--text-primary);
}

.article-title a:hover {
    color: var(--primary);
    text-decoration: none;
}

.article-summary {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.article-meta {
    display: flex;
    gap: 15px;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0 20px;
    flex-wrap: wrap;
}

.btn-page {
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

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

.btn-page.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.page-ellipsis {
    color: var(--text-muted);
    padding: 0 5px;
}

.page-info {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 40px;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 30px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============================================
   Article Page - Enhanced Typography
   ============================================ */
.article-page {
    padding: 40px 0 60px;
}

.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Article Header */
.article-header {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

.article-category {
    display: inline-block;
    background: rgba(14, 165, 233, 0.15);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.article-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.article-lead {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-weight: 400;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.meta-left,
.meta-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.meta-divider {
    color: var(--border);
}

/* Article Image */
.article-image {
    margin: 40px 0;
    border-radius: 12px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

.image-caption {
    padding: 15px 20px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

.image-credit {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Article Content - Enhanced Readability */
.article-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.article-content p {
    margin-bottom: 1.5em;
    line-height: 1.9;
    letter-spacing: 0.01em;
}

.article-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 1em 0 1em;
    color: var(--text-primary);
    line-height: 1.3;
    letter-spacing: -0.03em;
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2em 0 0.8em;
    color: var(--text-primary);
    line-height: 1.4;
}

.article-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5em 0 0.6em;
    color: var(--text-primary);
}

.article-content ul,
.article-content ol {
    margin: 1.5em 0;
    padding-left: 2em;
}

.article-content li {
    margin-bottom: 0.75em;
    line-height: 1.8;
}

.article-content blockquote {
    margin: 2em 0;
    padding: 20px 30px;
    background: var(--bg-card);
    border-left: 4px solid var(--primary);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-secondary);
}

.article-content strong {
    font-weight: 600;
    color: var(--text-primary);
}

.article-content em {
    font-style: italic;
    color: var(--text-secondary);
}

/* Article Footer */
.article-footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

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

.tags-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.tag {
    display: inline-block;
    background: var(--bg-card);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.tag:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.article-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-share,
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.btn-share {
    background: var(--primary);
    color: white;
}

.btn-share:hover {
    background: var(--primary-dark);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

.btn-share.copied {
    background: var(--success-color);
}

.btn-back {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-back:hover {
    background: var(--bg-hover);
    color: var(--primary);
    text-decoration: none;
}

/* Related Articles */
.related-section {
    background: var(--bg-card);
    padding: 60px 0;
    margin-top: 60px;
    border-top: 1px solid var(--border);
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.related-card {
    background: var(--bg-dark);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: block;
    color: inherit;
    text-decoration: none;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.related-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--bg-dark);
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.related-card:hover .related-image img {
    transform: scale(1.05);
}

.related-content {
    padding: 20px;
}

.related-category {
    display: inline-block;
    background: rgba(14, 165, 233, 0.15);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.related-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.related-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .article-header h1 {
        font-size: 1.8rem;
    }
    
    .article-lead {
        font-size: 1.1rem;
    }
    
    .article-content {
        font-size: 1.05rem;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .article-actions,
    .related-section,
    .site-footer {
        display: none;
    }
    
    .article-container {
        max-width: 100%;
    }
    
    .article-content {
        font-size: 12pt;
        line-height: 1.6;
    }
}

/* ============================================
   Categories Page
   ============================================ */
.categories-page {
    padding: 40px 0 60px;
    min-height: 70vh;
}

.page-header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.page-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.category-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 30px;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    display: block;
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
    border-color: var(--primary);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.category-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.category-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.category-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.article-count {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.category-preview {
    margin-top: 15px;
}

.category-preview h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.category-preview ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-preview li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    line-height: 1.5;
}

.category-preview li:last-child {
    border-bottom: none;
}

/* Category View (Single Category) */
.category-view {
    max-width: 900px;
    margin: 0 auto;
}

.category-header {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

.category-badge {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.category-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.category-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.category-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.category-meta span {
    margin: 0 4px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.empty-state p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.btn-primary {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

/* ============================================
   Article Source Link
   ============================================ */
.article-source {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.3);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 10px;
}

.article-source .source-label {
    color: var(--text-muted);
    font-weight: 500;
}

.article-source .source-name {
    color: var(--primary);
    font-weight: 600;
}

.article-original-link {
    margin: 25px 0;
    padding: 20px;
    background: rgba(14, 165, 233, 0.05);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
}

.article-original-link .original-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary), #0284c7);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.article-original-link .original-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.4);
    text-decoration: none;
}

/* ============================================
   Article Source Link (Footer)
   ============================================ */
.article-source-link {
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid rgba(100, 116, 139, 0.2);
    border-bottom: 1px solid rgba(100, 116, 139, 0.2);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.article-source-link span {
    color: var(--text-muted);
    margin-right: 6px;
}

.article-source-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.article-source-link a:hover {
    color: #38bdf8;
    text-decoration: underline;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .nav-content {
        gap: 10px;
    }
    
    .nav-links {
        display: flex;
        flex-wrap: wrap;
        gap: 3px;
    }
    
    .nav-links a {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    
    .logo span {
        display: none;
    }
    
    .section-header h1,
    .page-header h1,
    .category-header h1 {
        font-size: 1.5rem;
    }
    
    .article-title {
        font-size: 1.15rem;
    }
    
    .article-image {
        height: 200px;
    }
    
    .article-content {
        padding: 20px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .category-card {
        padding: 25px;
    }
}
