:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --accent: #ec4899;
    --bg: #fafafa;
    --surface: #ffffff;
    --text: #1e1b4b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(99,102,241,0.08);
    --gradient: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.7; font-size: 16px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.skip-link { position: absolute; top: -100px; left: 0; background: var(--primary); color: #fff; padding: 8px 16px; z-index: 9999; }
.skip-link:focus { top: 0; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; backdrop-filter: blur(12px); background: rgba(255,255,255,0.95); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo-text { font-size: 1.4rem; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.logo img { height: 40px; }
.main-nav { display: flex; gap: 8px; }
.main-nav a { padding: 8px 16px; border-radius: 8px; color: var(--text-muted); font-weight: 500; font-size: 0.95rem; }
.main-nav a:hover, .main-nav a.active { color: var(--primary); background: rgba(99,102,241,0.08); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: 0.3s; }

/* Hero */
.hero-section { padding: 40px 0; }
.hero-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.hero-main { border-radius: var(--radius); overflow: hidden; position: relative; min-height: 400px; }
.hero-main a { display: block; height: 100%; color: #fff; }
.hero-img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%); }
.hero-content { position: relative; z-index: 1; padding: 32px; display: flex; flex-direction: column; justify-content: flex-end; min-height: 400px; }
.hero-content h2 { font-size: 2rem; font-weight: 800; margin: 12px 0 8px; line-height: 1.3; }
.hero-content p { opacity: 0.9; font-size: 0.95rem; }
.hero-side { display: flex; flex-direction: column; gap: 16px; }
.hero-side-item { background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--border); flex: 1; }
.hero-side-item h3 { font-size: 1rem; margin-bottom: 8px; color: var(--text); }
.hero-side-item time { font-size: 0.85rem; color: var(--text-muted); }

/* Cards */
.section-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 24px; position: relative; padding-left: 16px; }
.section-title::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px; background: var(--gradient); border-radius: 2px; }
.articles-section { padding: 40px 0 60px; }
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.article-card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); transition: transform 0.3s, box-shadow 0.3s; }
.article-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(99,102,241,0.15); }
.card-link { display: block; color: inherit; }
.card-img { height: 200px; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.article-card:hover .card-img img { transform: scale(1.05); }
.card-img-placeholder { background: var(--gradient); opacity: 0.3; }
.card-body { padding: 20px; }
.card-body h3 { font-size: 1.1rem; font-weight: 700; margin: 8px 0; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-body p { color: var(--text-muted); font-size: 0.9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; gap: 16px; margin-top: 12px; font-size: 0.85rem; color: var(--text-muted); }
.cat-badge { display: inline-block; font-size: 0.75rem; font-weight: 600; color: var(--primary); background: rgba(99,102,241,0.1); padding: 2px 10px; border-radius: 20px; }

/* Article single */
.article-single { padding: 40px 0 60px; }
.breadcrumb { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb span { margin: 0 8px; }
.article-header h1 { font-size: 2.2rem; font-weight: 800; line-height: 1.3; margin-bottom: 16px; }
.article-meta { display: flex; gap: 20px; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 32px; flex-wrap: wrap; }
.article-cover { border-radius: var(--radius); overflow: hidden; margin-bottom: 32px; }
.article-content { font-size: 1.05rem; line-height: 1.9; }
.article-content h2, .article-content h3 { margin: 32px 0 16px; font-weight: 700; }
.article-content p { margin-bottom: 16px; }
.article-content img { border-radius: 8px; margin: 24px auto; }
.article-content blockquote { border-left: 4px solid var(--primary); padding: 16px 24px; margin: 24px 0; background: rgba(99,102,241,0.05); border-radius: 0 8px 8px 0; }
.article-content pre { background: #1e1b4b; color: #e2e8f0; padding: 20px; border-radius: 8px; overflow-x: auto; margin: 24px 0; }
.article-content table { width: 100%; border-collapse: collapse; margin: 24px 0; }
.article-content th, .article-content td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.article-content th { background: rgba(99,102,241,0.08); }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0; }
.tag { display: inline-block; padding: 6px 16px; background: rgba(99,102,241,0.08); color: var(--primary); border-radius: 20px; font-size: 0.85rem; font-weight: 500; }
.tag:hover { background: var(--primary); color: #fff; }

.related-articles { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }
.related-articles h2 { font-size: 1.3rem; margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.related-item { padding: 16px; background: var(--surface); border-radius: 8px; border: 1px solid var(--border); color: inherit; }
.related-item h3 { font-size: 0.95rem; margin-bottom: 4px; }
.related-item time { font-size: 0.8rem; color: var(--text-muted); }

/* Page header */
.page-header { padding: 40px 0 24px; }
.page-header h1 { font-size: 2rem; font-weight: 800; }
.page-desc { color: var(--text-muted); margin-top: 8px; }

/* Sitemap */
.sitemap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding: 24px 0 60px; }
.sitemap-grid h2 { font-size: 1.1rem; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid var(--primary); }
.sitemap-grid ul { list-style: none; }
.sitemap-grid li { padding: 6px 0; }
.sitemap-grid a { color: var(--text-muted); font-size: 0.9rem; }
.sitemap-grid a:hover { color: var(--primary); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud li { display: inline; }

/* Pagination */
.pagination { margin-top: 40px; text-align: center; }
.pagination ul { list-style: none; display: inline-flex; gap: 4px; }
.pagination a, .pagination .active { display: inline-block; padding: 8px 14px; border-radius: 8px; font-size: 0.9rem; }
.pagination a { color: var(--text-muted); border: 1px solid var(--border); }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .active { background: var(--primary); color: #fff; }

/* Ads */
.ad-block { text-align: center; padding: 16px 0; overflow: hidden; }
.ad-block img { max-height: 120px; margin: 0 auto; }

/* Footer */
.site-footer { background: #1e1b4b; color: rgba(255,255,255,0.7); padding: 48px 0 24px; margin-top: 40px; }
.friend-links { max-width: 1200px; margin: 0 auto 32px; padding: 0 20px; }
.friend-links h3 { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.friend-links ul { list-style: none; display: flex; flex-wrap: wrap; gap: 16px; }
.friend-links a { color: rgba(255,255,255,0.6); font-size: 0.9rem; }
.friend-links a:hover { color: #fff; }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding: 24px 20px 0; border-top: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-nav { display: flex; gap: 16px; }
.footer-nav a { color: rgba(255,255,255,0.6); font-size: 0.85rem; }

/* Support widget */
.support-widget { position: fixed; bottom: 24px; right: 24px; z-index: 200; }
.support-toggle { width: 56px; height: 56px; border-radius: 50%; background: var(--gradient); border: none; font-size: 24px; cursor: pointer; box-shadow: 0 4px 20px rgba(99,102,241,0.4); transition: transform 0.3s; }
.support-toggle:hover { transform: scale(1.1); }
.support-panel { display: none; position: absolute; bottom: 68px; right: 0; background: var(--surface); border-radius: var(--radius); box-shadow: 0 8px 32px rgba(0,0,0,0.15); padding: 16px; min-width: 180px; }
.support-panel.open { display: block; }
.support-panel h4 { font-size: 0.9rem; margin-bottom: 12px; color: var(--text); }
.support-item { display: block; padding: 10px 14px; border-radius: 8px; margin-bottom: 6px; font-size: 0.9rem; font-weight: 500; color: #fff; text-align: center; }
.support-item.telegram { background: #0088cc; }
.support-item.whatsapp { background: #25d366; }
.support-item.email { background: var(--primary); }
.support-item.phone { background: #10b981; }

/* 404 */
.error-page { text-align: center; padding: 100px 0; }
.error-page h1 { font-size: 6rem; font-weight: 900; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.error-page p { color: var(--text-muted); margin: 16px 0 32px; }
.btn-home { display: inline-block; padding: 12px 32px; background: var(--gradient); color: #fff; border-radius: 8px; font-weight: 600; }
.empty-state { text-align: center; color: var(--text-muted); padding: 40px; }

/* Responsive */
@media (max-width: 992px) {
    .hero-grid { grid-template-columns: 1fr; }
    .articles-grid { grid-template-columns: repeat(2, 1fr); }
    .sitemap-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--surface); flex-direction: column; padding: 16px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
    .main-nav.open { display: flex; }
    .articles-grid { grid-template-columns: 1fr; }
    .article-header h1 { font-size: 1.6rem; }
    .related-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
}
