/* ===== Variables ===== */
:root{--c-primary:#4154f1;--c-primary-dark:#2f3ccc}

/* ===== Reset & Base ===== */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans SC",sans-serif;color:#2c3e50;line-height:1.7;background:#fff}
a{color:#4154f1;text-decoration:none;transition:color .2s}
a:hover{color:#2f3ccc}
img{max-width:100%;height:auto}
ul{list-style:none}
.container{max-width:1200px;margin:0 auto;padding:0 20px}
.center{text-align:center}

/* ===== Buttons ===== */
.btn{display:inline-block;padding:10px 24px;border-radius:8px;font-size:15px;font-weight:600;cursor:pointer;transition:all .25s;border:2px solid transparent;text-align:center}
.btn-primary{background:#4154f1;color:#fff;border-color:#4154f1}
.btn-primary:hover{background:#2f3ccc;border-color:#2f3ccc;color:#fff}
.btn-outline{background:transparent;color:#4154f1;border-color:#4154f1}
.btn-outline:hover{background:#4154f1;color:#fff}
.btn-white{background:#fff;color:#4154f1;border-color:#fff}
.btn-white:hover{background:#e8eeff;border-color:#e8eeff;color:#4154f1}
.btn-lg{padding:14px 32px;font-size:16px}
.btn-sm{padding:6px 16px;font-size:13px}
.btn-block{display:block;width:100%}
._hl{color:var(--c-primary);cursor:pointer;border-bottom:1px dashed currentColor;transition:opacity .2s}
._hl:hover{opacity:.75}

/* ===== Header ===== */
.site-header{position:sticky;top:0;z-index:100;background:rgba(255,255,255,.97);backdrop-filter:blur(8px);border-bottom:1px solid #eee;padding:0 0}
.header-inner{display:flex;align-items:center;justify-content:space-between;height:64px}
.logo{display:flex;align-items:center;gap:8px;font-size:20px;font-weight:700;color:#2c3e50}
.logo:hover{color:#4154f1}
.logo-icon{flex-shrink:0}
.main-nav{display:flex;gap:28px;align-items:center;margin-left:auto;margin-right:24px}
.main-nav a{color:#555;font-size:15px;font-weight:500;transition:color .2s}
.main-nav a:hover{color:#4154f1}
.nav-dropdown{position:relative}
.nav-dropdown .dropdown-menu{display:none;position:absolute;top:100%;left:-12px;background:#fff;border-radius:10px;box-shadow:0 8px 32px rgba(0,0,0,.1);padding:8px 0;min-width:180px;z-index:50}
.nav-dropdown:hover .dropdown-menu{display:block}
.dropdown-menu a{display:block;padding:8px 20px;color:#555;font-size:14px}
.dropdown-menu a:hover{background:#f5f7ff;color:#4154f1}
.header-actions{display:flex;align-items:center;gap:12px}
.lang-switch{display:flex;gap:4px}
.lang-switch a{font-size:12px;padding:3px 8px;border-radius:4px;color:#888;font-weight:500}
.lang-switch a.active,.lang-switch a:hover{background:#4154f1;color:#fff}
.mobile-toggle{display:none;flex-direction:column;gap:5px;background:none;border:none;cursor:pointer;padding:4px}
.mobile-toggle span{display:block;width:22px;height:2px;background:#333;border-radius:2px;transition:all .3s}
.mobile-toggle.active span:nth-child(1){transform:rotate(45deg) translate(5px,5px)}
.mobile-toggle.active span:nth-child(2){opacity:0}
.mobile-toggle.active span:nth-child(3){transform:rotate(-45deg) translate(5px,-5px)}

/* ===== Hero ===== */
.hero{padding:80px 0 60px;background:linear-gradient(135deg,#f5f7ff 0%,#e8eeff 100%)}
.hero-inner{display:flex;align-items:center;gap:60px}
.hero-text{flex:1}
.hero-text h1{font-size:40px;line-height:1.25;margin-bottom:16px;color:#1a1a2e}
.hero-text p{font-size:18px;color:#666;margin-bottom:28px;line-height:1.6}
.hero-actions{display:flex;gap:12px;margin-bottom:32px}
.hero-stats{display:flex;gap:32px}
.stat-item{text-align:center}
.stat-item strong{display:block;font-size:24px;color:#4154f1}
.stat-item span{font-size:13px;color:#888}
.hero-visual{flex:1;display:flex;justify-content:center}
.hero-illustration{width:100%;max-width:400px}

/* ===== Section Commons ===== */
.section-title{font-size:30px;text-align:center;margin-bottom:8px;color:#1a1a2e}
.section-desc{text-align:center;color:#888;font-size:16px;margin-bottom:40px}

/* ===== Features ===== */
.features{padding:80px 0}
.features-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:24px}
.feature-card{text-align:center;padding:32px 20px;border-radius:12px;transition:all .3s;border:1px solid #f0f0f0}
.feature-card:hover{box-shadow:0 8px 30px rgba(65,84,241,.1);border-color:#d5dbff;transform:translateY(-4px)}
.feature-icon{margin-bottom:16px}
.feature-card h3{font-size:18px;margin-bottom:8px;color:#1a1a2e}
.feature-card p{font-size:14px;color:#888;line-height:1.6}

/* ===== Download CTA ===== */
.download-cta{padding:60px 0}
.cta-box{background:linear-gradient(135deg,#4154f1,#6c63ff);border-radius:16px;padding:60px 40px;text-align:center;color:#fff}
.cta-box h2{font-size:28px;margin-bottom:12px}
.cta-box p{font-size:16px;opacity:.9;margin-bottom:24px}

/* ===== Posts Grid ===== */
.latest-posts,.posts-page,.tag-page{padding:80px 0}
.posts-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;margin-bottom:32px}
.post-card{border-radius:12px;border:1px solid #eee;overflow:hidden;transition:all .3s}
.post-card:hover{box-shadow:0 8px 24px rgba(0,0,0,.08);transform:translateY(-3px)}
.card-body{padding:24px}
.card-tags{display:flex;gap:6px;margin-bottom:10px;flex-wrap:wrap}
.card-tag{font-size:12px;padding:3px 10px;border-radius:20px;background:#f0f3ff;color:#4154f1;font-weight:500}
.card-title{font-size:17px;margin-bottom:8px;line-height:1.4}
.card-title a{color:#2c3e50}
.card-title a:hover{color:#4154f1}
.card-excerpt{font-size:14px;color:#888;line-height:1.6;margin-bottom:12px}
.card-footer{display:flex;justify-content:space-between;align-items:center}
.card-date{font-size:13px;color:#aaa}
.card-link{font-size:14px;font-weight:500;color:#4154f1}
.center-action{text-align:center}

/* ===== FAQ ===== */
.faq-section{padding:80px 0;background:#f9fafe}
.faq-list{max-width:720px;margin:0 auto}
.faq-item{border-bottom:1px solid #eee;overflow:hidden}
.faq-question{width:100%;display:flex;justify-content:space-between;align-items:center;padding:18px 0;background:none;border:none;cursor:pointer;font-size:16px;font-weight:500;color:#2c3e50;text-align:left}
.faq-question svg{transition:transform .3s;flex-shrink:0}
.faq-item.open .faq-question svg{transform:rotate(45deg)}
.faq-answer{max-height:0;overflow:hidden;transition:max-height .35s ease}
.faq-item.open .faq-answer{max-height:500px}
.faq-answer p{padding:0 0 18px;color:#666;font-size:15px;line-height:1.7}

/* ===== Reviews ===== */
.reviews-section{padding:80px 0}
.reviews-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:24px}
.review-card{padding:28px;border-radius:12px;border:1px solid #eee}
.review-stars{color:#f5a623;font-size:16px;margin-bottom:12px}
.review-text{font-size:14px;color:#555;line-height:1.7;margin-bottom:16px}
.review-author{display:flex;align-items:center;gap:10px}
.author-avatar{width:36px;height:36px;border-radius:50%;background:#4154f1;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:600;font-size:14px}
.review-author strong{display:block;font-size:14px}
.review-author span{font-size:12px;color:#aaa}

/* ===== Tags Page ===== */
.tags-page{padding:80px 0}
.tags-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.tag-card{display:block;padding:28px;border-radius:12px;border:1px solid #eee;text-align:center;transition:all .3s}
.tag-card:hover{border-color:#4154f1;box-shadow:0 4px 16px rgba(65,84,241,.1)}
.tag-card h2{font-size:18px;color:#2c3e50;margin-bottom:4px}
.tag-card span{font-size:14px;color:#888}

/* ===== Post Page ===== */
.post-page{padding:40px 0 80px}
.post-grid{display:grid;grid-template-columns:1fr 300px;gap:40px}
.post-header{margin-bottom:28px}
.post-meta{display:flex;gap:16px;margin-bottom:12px;font-size:14px;color:#999}
.post-page h1{font-size:28px;line-height:1.35;color:#1a1a2e;margin-bottom:8px}
.post-desc{color:#888;font-size:16px}
.post-body{font-size:16px;line-height:1.85;color:#444}
.post-body h2{font-size:22px;margin:32px 0 12px;color:#2c3e50;padding-bottom:8px;border-bottom:2px solid #f0f0f0}
.post-body h3{font-size:18px;margin:24px 0 8px;color:#2c3e50}
.post-body p{margin-bottom:16px}
.post-body ul,.post-body ol{margin:12px 0;padding-left:24px}
.post-body li{margin-bottom:6px}
.post-body ol{list-style:decimal}
.post-body ul{list-style:disc}
.post-body a{color:#4154f1;border-bottom:1px solid transparent}
.post-body a:hover{border-bottom-color:#4154f1}
.post-body code{background:#f5f7ff;padding:2px 6px;border-radius:4px;font-size:14px;color:#e83e8c}
.post-body pre{background:#1a1a2e;color:#e0e0e0;padding:16px;border-radius:8px;overflow-x:auto;margin:16px 0}
.post-body pre code{background:none;color:inherit;padding:0}
.post-body blockquote{border-left:4px solid #4154f1;padding:12px 20px;margin:16px 0;background:#f9fafe;border-radius:0 8px 8px 0}
.post-cta{margin-top:32px;padding:24px;background:#f5f7ff;border-radius:12px;text-align:center}

/* ===== Sidebar ===== */
.post-sidebar{position:sticky;top:80px;align-self:start}
.sidebar-widget{padding:20px;border-radius:12px;border:1px solid #eee;margin-bottom:20px}
.sidebar-widget h3{font-size:16px;margin-bottom:12px;color:#2c3e50}
.sidebar-widget p{font-size:14px;color:#888;margin-bottom:12px}
.hot-list li{margin-bottom:8px}
.hot-list a{font-size:14px;color:#555;display:block;line-height:1.5}
.hot-list a:hover{color:#4154f1}
.tag-cloud{display:flex;flex-wrap:wrap;gap:6px}
.tag-link{font-size:13px;padding:4px 12px;border-radius:20px;background:#f0f3ff;color:#4154f1}
.tag-link:hover{background:#4154f1;color:#fff}
.toc-list{padding-left:0}
.toc-list li{margin-bottom:4px}
.toc-list a{font-size:13px;color:#666}
.toc-list a:hover{color:#4154f1}
.toc-3{padding-left:16px}

/* ===== Page ===== */
.page-section{padding:60px 0 80px}
.page-section h1{font-size:28px;margin-bottom:24px;color:#1a1a2e}
.page-body{font-size:16px;line-height:1.85;color:#444}
.page-body h2{font-size:22px;margin:28px 0 12px;color:#2c3e50}
.page-body p{margin-bottom:14px}

/* ===== Error Page ===== */
.error-page{padding:120px 0;text-align:center}
.error-page h1{font-size:80px;color:#4154f1;margin-bottom:12px}
.error-page p{font-size:18px;color:#888;margin-bottom:24px}

/* ===== Footer ===== */
.site-footer{background:#1a1a2e;color:#ccc;padding:60px 0 0}
.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:40px;padding-bottom:40px}
.footer-brand .logo{color:#fff;margin-bottom:12px}
.footer-desc{font-size:14px;color:#999;line-height:1.6}
.footer-links h4{color:#fff;font-size:16px;margin-bottom:16px}
.footer-links li{margin-bottom:8px}
.footer-links a{color:#999;font-size:14px;transition:color .2s}
.footer-links a:hover{color:#fff}
.footer-bottom{border-top:1px solid rgba(255,255,255,.1);padding:20px 0;text-align:center}
.footer-bottom p{font-size:13px;color:#777;margin-bottom:4px}
.footer-bottom a{color:#999}
.footer-bottom a:hover{color:#fff}

/* ===== Responsive ===== */
@media(max-width:992px){
  .hero-inner{flex-direction:column;text-align:center}
  .hero-actions{justify-content:center}
  .hero-stats{justify-content:center}
  .features-grid{grid-template-columns:repeat(2,1fr)}
  .posts-grid{grid-template-columns:repeat(2,1fr)}
  .reviews-grid{grid-template-columns:repeat(2,1fr)}
  .post-grid{grid-template-columns:1fr}
  .post-sidebar{position:static}
  .footer-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:768px){
  .main-nav{display:none;position:absolute;top:64px;left:0;right:0;background:#fff;flex-direction:column;padding:20px;gap:16px;box-shadow:0 8px 24px rgba(0,0,0,.1)}
  .main-nav.open{display:flex}
  .nav-dropdown .dropdown-menu{position:static;box-shadow:none;padding-left:16px}
  .nav-dropdown:hover .dropdown-menu{display:none}
  .nav-dropdown.open .dropdown-menu{display:block}
  .mobile-toggle{display:flex}
  .hero-text h1{font-size:28px}
  .features-grid{grid-template-columns:1fr}
  .posts-grid{grid-template-columns:1fr}
  .reviews-grid{grid-template-columns:1fr}
  .tags-grid{grid-template-columns:repeat(2,1fr)}
  .footer-grid{grid-template-columns:1fr}
  .section-title{font-size:24px}
  .lang-switch{display:none}
}
