:root{--bg:#0b0d12;--card:#11151d;--muted:#7d8da1;--text:#e6eefc;--primary:#4f8cff;--accent:#36d399;--danger:#ff5577;--border:#1b2230;--chip:#223049}
/* Themes */
body.theme-dark{--bg:#0b0d12;--card:#11151d;--muted:#7d8da1;--text:#e6eefc;--primary:#4f8cff;--accent:#36d399;--danger:#ff5577;--border:#1b2230;--chip:#223049;--input-bg:#0e131a}
body.theme-light{--bg:#f6f8fb;--card:#ffffff;--muted:#5b6b81;--text:#0c1524;--primary:#335ef7;--accent:#16a34a;--danger:#ef4444;--border:#e5eaf2;--chip:#e9eef6;--input-bg:#f7f9ff}
/* New colorful theme: pale green → yellow → red accents */
body.theme-colorful{--bg:#fffbe6;--card:#fff7db;--muted:#5b6b81;--text:#0c1524;--primary:#f59e0b;--accent:#16a34a;--danger:#ef4444;--border:#f1e8c6;--chip:#fff3cd;--input-bg:#fff8e6}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:linear-gradient(180deg,#0b0d12,#0e131a);color:var(--text);font:16px/1.6 system-ui,Segoe UI,Roboto,Arial,sans-serif}
.theme-light body, body.theme-light{background:linear-gradient(180deg,#f6f8fb,#eef3fb)}
/* Colorful background: pale green → pale yellow → pale red */
.theme-colorful body, body.theme-colorful{background:linear-gradient(180deg,#f0f9ec,#fffbe6 50%,#ffecec)}
.container{max-width:1180px;margin:0 auto;padding:0 18px}
.container-wide{max-width:none;width:100%;margin:0 auto;padding:0 18px}
.row{display:flex;gap:12px}
.between{justify-content:space-between}
.center{align-items:center}
.site-header{position:sticky;top:0;z-index:50;background:rgba(9,12,17,.75);backdrop-filter:saturate(150%) blur(8px);border-bottom:1px solid var(--border)}
.site-header .container{padding-top:20px;padding-bottom:20px}
.site-header .brand a{display:inline-block;color:#fff;text-decoration:none;font-weight:700;font-size:32px;letter-spacing:.6px}
body.theme-colorful .site-header{background:linear-gradient(90deg,#22c55e,#f59e0b,#ef4444)}
.main-nav a{color:#ffffff;text-decoration:none;padding:12px 16px;border-radius:12px;font-weight:700;font-size:18px}
.main-nav a:hover{color:#ffffff;background:var(--primary)}
.lang-switch a{display:inline-block;padding:8px 12px;border-radius:10px;border:1px solid var(--border);background:var(--card);color:var(--text);text-decoration:none;font-weight:700}
.lang-switch a:hover{background:var(--primary);border-color:var(--primary);color:#ffffff}
.theme-switch a{display:inline-block;padding:6px 10px;border-radius:10px;border:1px solid var(--border);background:var(--card);color:var(--text);text-decoration:none}
.theme-switch a:hover{background:var(--primary);border-color:var(--primary);color:#ffffff}
.chip-ocean{background:#0f2a3a;color:#9ad8ff}
.chip-forest{background:#13301f;color:#9fe2b6}
.chip-grape{background:#2a1030;color:#e0b7ff}
.content-card{background:var(--card);border:1px solid var(--border);border-radius:16px;padding:22px;margin:22px auto}
.site-footer{border-top:1px solid var(--border);padding:18px 0;color:var(--muted)}
.muted{color:var(--muted)}

h1,h2,h3{margin:8px 0 14px}
section+section{margin-top:18px}
.btn{display:inline-block;padding:10px 14px;border-radius:12px;border:1px solid var(--border);background:#151b26;color:#eaf2ff;text-decoration:none}
.btn:hover{border-color:#2a3548}
.btn-primary{background:linear-gradient(180deg,#4f8cff,#3d6fd6);border:0}
.btn-danger{background:linear-gradient(180deg,#ff5577,#d63a5a);border:0}
.input,textarea,select{width:100%;padding:10px 12px;border-radius:10px;border:1px solid var(--border);background:var(--input-bg);color:var(--text)}
.input:focus, textarea:focus, select:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px rgba(79,140,255,.2)}
body.theme-dark .input, body.theme-dark textarea, body.theme-dark select{border-color:#2b3e5a}
body.theme-dark .btn{border-color:#2b3e5a}
body.theme-dark .btn-primary, body.theme-dark .btn-danger{border:1px solid #2b3e5a}
label{display:block;margin:8px 0 6px;color:var(--text);font-weight:600}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.table{width:100%;border-collapse:separate;border-spacing:0}
.table th,.table td{padding:10px 12px;border-bottom:1px solid var(--border)}
.table th{color:#aac3e8;text-align:left}
.badge{display:inline-block;padding:2px 8px;border-radius:999px;background:#1e2a3d;color:#cfe1ff;border:1px solid #2b3e5a;font-size:12px}
.card{padding:14px;border:1px solid var(--border);border-radius:12px;background:var(--card);color:var(--text)}
.theme-light .card, body.theme-light .card{background:#ffffff}
body.theme-dark .content-card, body.theme-dark .card{border-color:#2b3e5a}
.screenshot{width:100%;height:320px;border:1px dashed var(--border);border-radius:12px;background:repeating-linear-gradient(45deg,transparent,transparent 10px,rgba(255,255,255,.04) 10px,rgba(255,255,255,.04) 20px);display:flex;align-items:center;justify-content:center;color:var(--muted)}
.grid{display:grid;gap:16px}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}

/* Forum */
.forum-list{margin:0;padding:0}
.forum-list li{list-style:none;padding:14px 16px;border:1px solid var(--border);border-radius:12px;background:var(--card);margin-bottom:12px;transition:border-color .2s,background-color .2s,box-shadow .2s;cursor:pointer}
.forum-list li:hover{border-color:var(--primary);background:var(--chip);box-shadow:0 0 0 3px rgba(79,140,255,.15)}
.theme-dark .forum-list li, body.theme-dark .forum-list li{border-color:#2b3e5a}
.forum-list a{color:var(--text);text-decoration:none;font-weight:700;font-size:18px}
.forum-list a:hover{color:var(--primary)}
.forum-list small{color:var(--muted)}
.post{padding:12px 14px;border:1px solid var(--border);border-radius:12px;background:var(--card);margin-bottom:10px}
.theme-dark .post, body.theme-dark .post{background:#223045}
.theme-dark .post, body.theme-dark .post{border-color:#2b3e5a}
.post .meta{color:var(--muted);font-size:13px;margin-bottom:6px}
.form-actions{display:flex;gap:10px}
.captcha{display:flex;gap:8px;align-items:center}
.alert{padding:10px 12px;border-radius:10px;border:1px solid #2e3c54;background:#162238;color:#cfe1ff}
.alert-ok{border-color:#264536;background:#0f1f17}
.alert-warn{border-color:#6b4c28;background:#1c1510}
/* Colorful alerts for light/colorful themes; keep dark theme dark */
body.theme-light .alert{background:#eaf2ff;border-color:#bcd3ff;color:#0c1524}
body.theme-light .alert-ok{background:#ecf8f1;border-color:#d7efe0;color:#0f5132}
body.theme-light .alert-warn{background:#fff7db;border-color:#f1e8c6;color:#7a4e00}
body.theme-colorful .alert{background:#ecf8f1;border-color:#d7efe0;color:#0c3b2e}
body.theme-colorful .alert-ok{background:#ecf8f1;border-color:#d7efe0;color:#0c3b2e}
body.theme-colorful .alert-warn{background:#fff7db;border-color:#f1e8c6;color:#7a4e00}

/* Inner frames (cards, list items, posts) inside page frame: slightly different shade */
body.theme-light .content-card .card{background:#f7fbff;border-color:#dfe7f5}
body.theme-colorful .content-card .card{background:#fff3cd;border-color:#efd6a8}
body.theme-dark .content-card .card{background:#151b26;border-color:#2b3e5a}
body.theme-light .content-card .forum-list li,
body.theme-light .content-card .post{background:#f7fbff}
body.theme-colorful .content-card .forum-list li,
body.theme-colorful .content-card .post{background:#fff1c2}
body.theme-dark .content-card .forum-list li{background:#1a2333}

/* Light button variant (for back links etc.) */
.btn-light{background:#f2f4fa;color:#0c1524;border:1px solid var(--border)}
.btn-light:hover{background:#e6ebf7}

/* Support banner on home page (solid, bold) */
.support-banner{padding:16px 18px;border-radius:14px;border:1px solid var(--border);font-size:18px;line-height:1.6;background:#ffe8aa;color:#0c1524;font-weight:700}
body.theme-light .support-banner{background:#ffe8aa;border-color:#f0d38a;color:#0c1524}
body.theme-colorful .support-banner{background:#ffe8aa;border-color:#f0d38a;color:#0c1524}
body.theme-dark .support-banner{border-color:#6b4c28;color:#ffe9c0;background:#2d200a}
.support-banner strong{font-weight:800}

/* Colorful theme tints */
body.theme-colorful .content-card{background:var(--card);border-color:#f1e8c6}
body.theme-colorful .grid .card:nth-child(3n+1){background:#ecf8f1;border-color:#d7efe0}
body.theme-colorful .grid .card:nth-child(3n+2){background:#fff7db;border-color:#f1e8c6}
body.theme-colorful .grid .card:nth-child(3n){background:#ffecec;border-color:#f5d0d0}
 .mobile-feedback-inline{display:none}
@media (max-width:768px){
  .site-header .container{padding-top:12px;padding-bottom:12px}
  .site-header .brand a{font-size:24px}
  .main-nav{display:none}
  .theme-switch{display:none}
  .content-card{margin:12px auto;padding:16px}
  .grid-3{grid-template-columns:1fr}
  .grid-2{grid-template-columns:1fr}
  .home-feature-grid{display:none}
  .support-banner{display:none}
  .mobile-feedback-inline{display:inline-block;margin-left:8px;font-weight:700}
}
