:root {
  --b50:#eff6ff; --b200:#bfdbfe; --b500:#3b82f6; --b600:#2563eb; --b700:#1d4ed8; --b800:#1e3a8a;
  --g50:#f9fafb; --g100:#f3f4f6; --g200:#e5e7eb; --g300:#d1d5db; --g400:#9ca3af; --g500:#6b7280; --g700:#374151; --g800:#1f2937; --g900:#111827;
  --w:#fff; --r:8px; --sh:0 1px 3px rgba(0,0,0,.1); --sh2:0 4px 12px rgba(0,0,0,.08);
}
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;background:var(--g50);color:var(--g800);line-height:1.6;min-height:100vh;display:flex;flex-direction:column}

/* Navbar */
.navbar{background:var(--b800);color:var(--w);padding:0 1.5rem;display:flex;align-items:center;justify-content:space-between;height:56px;position:sticky;top:0;z-index:100;box-shadow:var(--sh2)}
.nav-brand a{display:flex;align-items:center;text-decoration:none;justify-content:center}
.nav-logo{height:38px;width:auto}
.nav-links{display:flex;align-items:center;gap:.25rem}
.nav-links a{color:#bfdbfe;text-decoration:none;padding:.4rem .75rem;border-radius:var(--r);font-size:.9rem;transition:all .15s}
.nav-links a:hover{background:rgba(255,255,255,.12);color:var(--w)}
.nav-user{color:#dbeafe;font-size:.85rem;padding:0 .5rem}
.nav-logout{opacity:.7}
.admin-link{background:#f59e0b!important;color:var(--g900)!important;font-weight:600}

/* Layout */
.container{max-width:1100px;margin:0 auto;padding:2rem 1.5rem;flex:1;width:100%}

/* Buttons */
.btn{display:inline-block;padding:.6rem 1.25rem;border-radius:var(--r);font-size:.9rem;font-weight:600;text-decoration:none;border:none;cursor:pointer;transition:all .15s}
.btn-primary{background:var(--b600);color:var(--w)} .btn-primary:hover{background:var(--b700)}
.btn-outline{background:transparent;color:var(--b600);border:2px solid var(--b600)} .btn-outline:hover{background:var(--b50)}
.btn-outline-dark{background:transparent;color:var(--g700);border:2px solid var(--g300)} .btn-outline-dark:hover{background:var(--g100)}
.btn-danger{background:#ef4444;color:var(--w)} .btn-danger:hover{background:#dc2626}
.btn-sm{padding:.3rem .75rem;font-size:.8rem}

/* Alerts */
.alert{padding:.75rem 1rem;border-radius:var(--r);margin-bottom:1rem;font-size:.9rem}
.alert-error{background:#fef2f2;border:1px solid #fecaca;color:#dc2626}
.alert-success{background:#f0fdf4;border:1px solid #bbf7d0;color:#16a34a}
.alert-warning{background:#fffbeb;border:1px solid #fde68a;color:#92400e}

/* Page header */
.page-header{margin-bottom:1.5rem} .page-header h1{font-size:1.75rem;color:var(--g900)}
.breadcrumb{font-size:.85rem;color:var(--g500);margin-bottom:.5rem}
.breadcrumb a{color:var(--b600);text-decoration:none} .breadcrumb a:hover{text-decoration:underline}
.empty{text-align:center;color:var(--g400);padding:2rem;font-size:.95rem}

/* Homepage */
.home-hero{text-align:center;padding:3rem 1rem 2.5rem}
.home-hero-badge{display:inline-block;background:var(--g100);color:var(--g500);font-size:.78rem;font-weight:600;padding:.3rem .85rem;border-radius:20px;margin-bottom:1rem}
.home-hero h1{font-size:2.2rem;color:var(--g900);margin-bottom:.6rem;font-weight:800;letter-spacing:-.5px}
.home-hero-sub{font-size:1.05rem;color:var(--g500);max-width:580px;margin:0 auto 1.5rem;line-height:1.6}
.home-hero-actions{display:flex;gap:.75rem;justify-content:center;flex-wrap:wrap}
.home-toc{margin:1.5rem 0 2.5rem} .home-toc h2,.home-practice h2,.home-visual h2{font-size:1.15rem;color:var(--g700);margin-bottom:1rem}
.home-chapter{display:flex;align-items:center;gap:1rem;padding:.85rem 1.25rem;background:var(--w);border-radius:var(--r);text-decoration:none;color:var(--g800);box-shadow:var(--sh);transition:all .15s;border-left:3px solid transparent}
.home-chapter:hover{border-left-color:var(--b500);box-shadow:var(--sh2)}
.home-chapter-num{font-size:1.2rem;font-weight:800;color:var(--g300);width:40px;text-align:center;flex-shrink:0}
.home-chapter div{flex:1} .home-chapter strong{display:block;font-size:.95rem}
.home-chapter small{display:block;font-size:.78rem;color:var(--g400);margin-top:.15rem}
.home-chapter-arrow{color:var(--g300);font-size:1.1rem;transition:all .15s}
.home-chapter:hover .home-chapter-arrow{color:var(--b500);transform:translateX(3px)}
.home-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:.85rem;margin:0}
.home-card{background:var(--w);border-radius:var(--r);padding:1.25rem;text-decoration:none;color:var(--g800);box-shadow:var(--sh);transition:all .15s;border-top:3px solid transparent}
.home-card:hover{border-top-color:var(--b500);box-shadow:var(--sh2)}
.home-card-icon{font-size:1.5rem;display:block;margin-bottom:.5rem}
.home-card h3{font-size:.95rem;margin-bottom:.35rem}
.home-card p{font-size:.82rem;color:var(--g500);line-height:1.5}
.home-algos{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:1rem}
.home-algo-chip{background:var(--g100);color:var(--g500);padding:.35rem .85rem;border-radius:20px;font-size:.82rem;text-decoration:none;font-weight:500;transition:all .15s}
.home-algo-chip:hover{background:#dbeafe;color:var(--b700)}
.home-canvas{width:100%;height:auto;border-radius:var(--r);background:var(--g50);border:1px solid var(--g200)}

/* Course listing */
.cours-hero{text-align:center;padding:2rem .5rem 1.5rem}
.cours-hero-badge{display:inline-block;background:var(--b50);color:var(--b600);font-size:.8rem;font-weight:600;padding:.25rem .85rem;border-radius:20px;margin-bottom:.5rem}
.cours-hero h1{font-size:2rem;font-weight:800;color:var(--g900);letter-spacing:-.5px;margin-bottom:.25rem}
.cours-hero-sub{font-size:.95rem;color:var(--g400)}
.cours-list{display:flex;flex-direction:column;gap:.6rem;margin:1rem 0 2rem}
.cours-item{display:flex;align-items:center;gap:1.25rem;padding:1.25rem 1.5rem;background:var(--w);border-radius:calc(var(--r)+4px);text-decoration:none;color:var(--g800);box-shadow:0 1px 2px rgba(0,0,0,.04);border:1px solid var(--g200);transition:all .18s}
.cours-item:hover{border-color:var(--b500);box-shadow:0 2px 12px rgba(59,130,246,.12);transform:translateY(-1px)}
.cours-item-left{flex-shrink:0}
.cours-item-num{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:12px;background:var(--b50);color:var(--b700);font-weight:800;font-size:1rem}
.cours-item-body{flex:1}
.cours-item-body h2{font-size:1.1rem;font-weight:700;margin-bottom:.15rem}
.cours-item-body p{font-size:.82rem;color:var(--g400);margin-bottom:.25rem}
.cours-item-sections{font-size:.72rem;color:var(--b500);font-weight:600;background:var(--b50);padding:.15rem .55rem;border-radius:6px}
.cours-item-arrow{font-size:1.2rem;color:var(--g300);transition:all .18s}
.cours-item:hover .cours-item-arrow{color:var(--b500);transform:translateX(3px)}

/* Course sections */
.course-detail .section,.section{background:var(--w);border-radius:var(--r);padding:1.5rem;margin-bottom:1rem;box-shadow:var(--sh)}
.course-detail .section h2,.section h2{font-size:1.25rem;color:var(--b800);margin-bottom:.75rem}
.section-content h1,.section-content h2,.section-content h3{margin:1rem 0 .5rem}
.section-content p{margin-bottom:.75rem}
.section-content pre{background:#0d1117;padding:1rem;border-radius:var(--r);overflow-x:auto;font-size:.85rem;line-height:1.5}
.section-content code{background:var(--g100);padding:.15rem .35rem;border-radius:4px;font-size:.85rem}
.section-content pre code{background:transparent;padding:0}
.section-content table,.submissions-table table{width:100%;border-collapse:collapse;margin:1rem 0}
.section-content th,.section-content td,.submissions-table th,.submissions-table td{border:1px solid var(--g200);padding:.5rem .75rem;text-align:left;font-size:.85rem}
.section-content th,.submissions-table th{background:var(--g50);font-weight:600}
.chapter-nav{display:flex;justify-content:space-between;margin-top:2rem}

/* Chapter exercise list */
.chapter-row{display:flex;align-items:center;gap:1.25rem;padding:1.25rem 1.5rem;background:var(--w);border-radius:var(--r);box-shadow:var(--sh);text-decoration:none;color:var(--g800);margin-bottom:.75rem;transition:all .15s}
.chapter-row:hover{box-shadow:var(--sh2)}
.chapter-row-num{width:40px;height:40px;border-radius:50%;background:#dbeafe;color:var(--b700);display:flex;align-items:center;justify-content:center;font-weight:700;flex-shrink:0}
.chapter-row-info{flex:1}.chapter-row-info h3{font-size:1.05rem;margin-bottom:.35rem}
.chapter-row-types,.type-badge{display:flex;gap:.4rem;flex-wrap:wrap}
.type-badge{font-size:.72rem;padding:.15rem .5rem;border-radius:4px;font-weight:600}
.type-badge.qcm{background:#dbeafe;color:#1e40af}.type-badge.code{background:#e0e7ff;color:#3730a3}.type-badge.hoare{background:#f3e8ff;color:#6b21a8}.type-badge.total{background:var(--g200);color:var(--g500)}
.ex-group{margin-bottom:2rem}.ex-group-title{font-size:1.05rem;color:var(--g700);margin-bottom:.6rem;padding-bottom:.35rem;border-bottom:2px solid var(--g200)}
.chapter-total{color:var(--g500);font-size:.9rem;margin-top:-.5rem;margin-bottom:.5rem}

/* Exercise items */
.exercises-list{display:flex;flex-direction:column;gap:.5rem}
.exercise-item{display:flex;align-items:center;gap:.75rem;padding:.85rem 1rem;background:var(--w);border-radius:var(--r);box-shadow:var(--sh);text-decoration:none;color:var(--g800);transition:all .15s;flex-wrap:wrap}
.exercise-item:hover{box-shadow:var(--sh2);border-left:4px solid var(--b500)}
.exercise-badge{font-size:.7rem;font-weight:700;text-transform:uppercase;padding:.2rem .5rem;border-radius:4px;flex-shrink:0}
.exercise-badge.mcq{background:#dbeafe;color:#1e40af}.exercise-badge.truefalse{background:#fce7f3;color:#9d174d}
.exercise-badge.fillblank{background:#fef3c7;color:#92400e}.exercise-badge.association{background:#d1fae5;color:#065f46}
.exercise-badge.code{background:#e0e7ff;color:#3730a3}.exercise-badge.hoare{background:#f3e8ff;color:#6b21a8}
.exercise-num{font-weight:600;font-size:.85rem;color:var(--g500);min-width:28px}
.exercise-question{flex:1;font-size:.9rem}
.exercise-meta{display:flex;align-items:center;gap:.5rem;flex-shrink:0}
.exercise-chapter{font-size:.72rem;color:var(--g400);font-weight:500}
.exercise-difficulty{font-size:.7rem;padding:.15rem .5rem;border-radius:4px;font-weight:600}
.exercise-difficulty.debutant{background:#d1fae5;color:#065f46}.exercise-difficulty.intermediaire{background:#fef3c7;color:#92400e}.exercise-difficulty.avance{background:#fee2e2;color:#991b1b}

/* Exercise detail */
.exercise-detail{max-width:800px}
.exercise-box{background:var(--w);border-radius:var(--r);padding:1.5rem;box-shadow:var(--sh2)}
.exercise-header{display:flex;gap:.5rem;margin-bottom:.75rem}
.exercise-box h2{font-size:1.15rem;margin-bottom:1rem;color:var(--g900)}
.exercise-form{display:flex;flex-direction:column;gap:.75rem;margin:1rem 0}
.option{display:flex;align-items:center;gap:.5rem;padding:.6rem .75rem;border:1px solid var(--g200);border-radius:var(--r);cursor:pointer;font-size:.9rem;transition:background .15s}
.option:hover{background:var(--g50)} .option input{margin:0}
.fill-input{padding:.6rem .75rem;border:1px solid var(--g300);border-radius:var(--r);font-size:.9rem;font-family:inherit;width:100%}
.fill-input:focus{outline:none;border-color:var(--b500);box-shadow:0 0 0 3px #dbeafe}
.exercise-feedback{margin-top:1rem;padding:1rem;border-radius:var(--r);font-size:.9rem;line-height:1.5}
.exercise-feedback.correct{background:#f0fdf4;border:1px solid #bbf7d0;color:#166534}
.exercise-feedback.incorrect{background:#fef2f2;border:1px solid #fecaca;color:#991b1b}
.exercise-nav{display:flex;justify-content:space-between;margin-top:1.5rem}
.hint{font-size:.8rem;color:var(--g500);margin-top:-.5rem}
.hoare-hint{background:#eff6ff;border-left:3px solid var(--b500);padding:.5rem .75rem;margin:.5rem 0;font-size:.85rem;border-radius:0 var(--r) var(--r) 0}
.hoare-hint code{font-family:monospace;font-size:.82rem}

/* Code editor */
.code-editor-page .editor-pane{display:flex;flex-direction:column;gap:1rem}
.exercise-statement{background:var(--w);border-radius:var(--r);padding:1.5rem;box-shadow:var(--sh)}
.exercise-statement h2{font-size:1.2rem;margin-bottom:.75rem}
.statement-content{font-size:.95rem;line-height:1.6}
.editor-container{background:var(--g900);border-radius:var(--r);overflow:hidden;box-shadow:var(--sh2)}
.ace-editor{width:100%;height:400px;font-size:14px!important}
.editor-actions{display:flex;gap:.5rem;padding:.75rem 1rem;background:var(--g800)}
.output-panel{background:var(--w);border-radius:var(--r);padding:1.5rem;box-shadow:var(--sh)}
.output-panel h3{margin-bottom:.75rem;font-size:1rem}
.output-panel .test-case{padding:.75rem;border-radius:var(--r);margin-bottom:.5rem;font-size:.85rem;font-family:monospace}
.output-panel .test-case.pass{background:#f0fdf4;border:1px solid #bbf7d0}
.output-panel .test-case.fail{background:#fef2f2;border:1px solid #fecaca}
.output-panel .compile-error{background:#fef2f2;border:1px solid #fecaca;border-radius:var(--r);padding:1rem;font-family:monospace;font-size:.85rem;white-space:pre-wrap;color:#dc2626}
.hoare-check{padding:.5rem .75rem;border-radius:var(--r);margin:.5rem 0;font-size:.85rem}
.hoare-check.ok{background:#f0fdf4;border:1px solid #bbf7d0}.hoare-check.ko{background:#fef2f2;border:1px solid #fecaca}

/* Auth */
.auth-container{max-width:420px;margin:3rem auto;background:var(--w);padding:2rem;border-radius:var(--r);box-shadow:var(--sh2);text-align:inherit}
.auth-container h2{margin-bottom:1.5rem;font-size:1.5rem}
.auth-form{display:flex;flex-direction:column;gap:1rem}
.form-group{display:flex;flex-direction:column;gap:.35rem}
.form-group label{font-size:.85rem;font-weight:600;color:var(--g700)}
.form-group input,.form-group select,.form-group textarea{padding:.6rem .75rem;border:1px solid var(--g300);border-radius:var(--r);font-size:.9rem;font-family:inherit;transition:border-color .15s}
.form-group input:focus,.form-group select:focus,.form-group textarea:focus{outline:none;border-color:var(--b500);box-shadow:0 0 0 3px #dbeafe}
.form-group textarea{resize:vertical}
.auth-switch{margin-top:1rem;text-align:center;font-size:.85rem;color:var(--g500)}

/* Forum */
.forum-layout{display:flex;gap:2rem}.forum-main{flex:1;min-width:0}.forum-sidebar{width:260px;flex-shrink:0}
.forum-cats{display:flex;flex-direction:column;gap:.5rem}
.forum-cat-row{display:flex;align-items:center;gap:1rem;padding:1rem 1.25rem;background:var(--w);border-radius:var(--r);text-decoration:none;color:var(--g800);box-shadow:var(--sh);transition:all .15s;border-left:3px solid transparent}
.forum-cat-row:hover{border-left-color:var(--b500);box-shadow:var(--sh2)}
.forum-cat-icon{font-size:1.4rem}.forum-cat-info{flex:1}
.forum-cat-info strong{display:block;font-size:.95rem}.forum-cat-info span{display:block;font-size:.8rem;color:var(--g500);margin-top:.1rem}
.forum-cat-stats{display:flex;flex-direction:column;gap:.15rem;text-align:right}
.forum-cat-stats span{font-size:.78rem;color:var(--g400)}
.forum-sidebar-box{background:var(--w);border-radius:var(--r);padding:1rem;box-shadow:var(--sh);margin-bottom:1rem}
.forum-sidebar-box h3{font-size:.9rem;margin-bottom:.5rem;color:var(--g700)}
.forum-sidebar-box a{display:block;font-size:.82rem;color:var(--b600);text-decoration:none;padding:.25rem 0}.forum-sidebar-box a:hover{text-decoration:underline}
.forum-recent span{display:block;color:var(--g700)}.forum-recent small{display:block;color:var(--g400);font-size:.72rem}
.forum-threads{display:flex;flex-direction:column;gap:.4rem}
.forum-thread-row{display:flex;align-items:center;gap:1rem;padding:.85rem 1.25rem;background:var(--w);border-radius:var(--r);text-decoration:none;color:var(--g800);box-shadow:var(--sh);transition:all .15s}
.forum-thread-row:hover{box-shadow:var(--sh2)}.forum-thread-row.pinned{border-left:3px solid #f59e0b}
.forum-thread-main{flex:1}.forum-thread-main strong{display:block;font-size:.9rem}
.forum-thread-meta{font-size:.76rem;color:var(--g400)}.forum-thread-last{text-align:right}.forum-thread-last small{display:block;font-size:.72rem;color:var(--g400)}
.thread-header{margin-bottom:1.5rem}.thread-header h1{font-size:1.5rem}
.thread-tags{display:flex;gap:.4rem;margin:.5rem 0}
.tag{font-size:.7rem;padding:.15rem .5rem;border-radius:4px;font-weight:600}.tag.pinned{background:#fef3c7;color:#92400e}.tag.locked{background:#fee2e2;color:#991b1b}
.forum-post{display:flex;gap:1rem;background:var(--w);border-radius:var(--r);padding:1.25rem;margin-bottom:.75rem;box-shadow:var(--sh)}
.forum-post-side{width:120px;flex-shrink:0;text-align:center;border-right:1px solid var(--g200);padding-right:.75rem}
.post-avatar{width:44px;height:44px;border-radius:50%;background:var(--b600);color:var(--w);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:1.1rem;margin:0 auto .5rem}
.post-user{display:block;font-size:.88rem}
.post-admin-badge{display:inline-block;font-size:.65rem;background:#f59e0b;color:#1e293b;padding:.1rem .4rem;border-radius:3px;font-weight:700;margin-top:.2rem}
.forum-post-body{flex:1;min-width:0}
.post-meta{font-size:.78rem;color:var(--g400);margin-bottom:.75rem;display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}
.post-actions{margin-left:auto;display:flex;gap:.35rem}
.edited-tag{font-style:italic;color:var(--g300);font-size:.72rem}
.btn-edit{background:transparent;color:var(--b600);border:1px solid #93c5fd}.btn-edit:hover{background:var(--b50)}
.edit-textarea{width:100%;padding:.6rem;border:1px solid var(--g300);border-radius:var(--r);font-family:monospace;font-size:.85rem;resize:vertical}
.post-content{font-size:.9rem;line-height:1.7;word-break:break-word}
.post-content pre{background:#0d1117;padding:1rem;border-radius:var(--r);overflow-x:auto;font-size:.82rem}
.post-content code{background:var(--g100);padding:.1rem .3rem;border-radius:3px;font-size:.85rem}
.post-content pre code{background:transparent;padding:0}
.post-content table{border-collapse:collapse;margin:.5rem 0}.post-content th,.post-content td{border:1px solid var(--g200);padding:.35rem .6rem;font-size:.85rem}
.preview-box{display:none;padding:.75rem 1rem;background:var(--g50);border:1px solid var(--g200);border-radius:var(--r);margin:.25rem 0 .5rem;font-size:.88rem;line-height:1.7;min-height:2rem}
.preview-box pre{background:#0d1117;padding:.75rem;border-radius:6px;overflow-x:auto;font-size:.8rem}
.preview-box code{background:var(--g200);padding:.1rem .3rem;border-radius:3px;font-size:.82rem}
.preview-box pre code{background:transparent;padding:0}
.preview-box blockquote{border-left:3px solid var(--g300);padding-left:.75rem;color:var(--g500);margin:.5rem 0}
.forum-reply{margin-top:1.5rem}.forum-reply h3{margin-bottom:.75rem}
.forum-reply textarea{width:100%;padding:.75rem;border:1px solid var(--g300);border-radius:var(--r);font-family:inherit;font-size:.9rem;margin-bottom:.75rem;resize:vertical}

/* Progression */
.stats-row{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:1rem;margin-bottom:2rem}
.stat-card{background:var(--w);border-radius:var(--r);padding:1.5rem;text-align:center;box-shadow:var(--sh)}
.stat-card h3{font-size:1.75rem;color:var(--b700)}.stat-card p{font-size:.85rem;color:var(--g500);margin-top:.25rem}
.progress-chapter{margin-bottom:.75rem}.progress-chapter h3{font-size:.95rem;margin-bottom:.35rem}
.progress-bar-container{background:var(--g200);border-radius:4px;height:24px;overflow:hidden}
.progress-bar{background:linear-gradient(90deg,var(--b500),var(--b600));height:100%;border-radius:4px;display:flex;align-items:center;justify-content:center;font-size:.75rem;color:var(--w);font-weight:600;min-width:40px;transition:width .3s}
.status-passed{color:#16a34a;font-weight:600}.status-failed{color:#ef4444;font-weight:600}
.submissions-table{overflow-x:auto;margin-top:1rem}

/* Admin */
.admin-form{max-width:700px;background:var(--w);padding:1.5rem;border-radius:var(--r);box-shadow:var(--sh);display:flex;flex-direction:column;gap:1rem;margin-bottom:2rem}
.admin-actions{display:flex;gap:.5rem;margin:1rem 0;flex-wrap:wrap}
.admin-item{display:flex;justify-content:space-between;align-items:center;padding:.75rem 1rem;background:var(--w);border-radius:var(--r);margin-bottom:.35rem;box-shadow:var(--sh)}

/* Footer */
.footer{background:var(--g900);color:var(--g300);padding:2rem 1.5rem 1.5rem;margin-top:3rem}
.footer-content{max-width:1100px;margin:0 auto;display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:1.5rem}
.footer-brand .footer-logo{font-size:1.1rem;font-weight:700;color:var(--w)}
.footer-brand p{font-size:.78rem;color:var(--g400);margin-top:.25rem}
.footer-links{display:flex;gap:1.25rem}.footer-links a{color:var(--g400);text-decoration:none;font-size:.85rem;transition:color .15s}.footer-links a:hover{color:var(--w)}
.footer-social{display:flex;gap:.75rem;align-items:center}
.social-icon{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:50%;background:var(--g700);color:var(--g300);text-decoration:none;transition:all .2s}
.social-icon:hover{background:var(--b600);color:var(--w);transform:translateY(-2px)}
.social-icon.deepseek:hover{background:#4f46e5}
.copy-toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%) translateY(100px);background:var(--g900);color:var(--w);padding:.75rem 1.5rem;border-radius:10px;font-size:.85rem;box-shadow:0 8px 24px rgba(0,0,0,.3);z-index:999;opacity:0;transition:all .3s ease;pointer-events:none}
.copy-toast.show{transform:translateX(-50%) translateY(0);opacity:1}
.copy-toast strong{color:#5865f2}

/* Error pages */
.error-page{text-align:center;padding:4rem 1rem}.error-page h1{font-size:4rem;color:var(--g300)}.error-page p{font-size:1.15rem;color:var(--g500);margin:1rem 0}

/* Responsive */
@media (max-width:768px){
  .navbar{flex-wrap:wrap;height:auto;padding:.4rem .6rem;gap:.3rem}
  .nav-logo{height:28px}.nav-links{flex-wrap:wrap;gap:.1rem}
  .nav-links a{font-size:.72rem;padding:.25rem .4rem}.nav-user{font-size:.7rem}
  .home-hero h1{font-size:1.5rem}.home-hero{padding:2rem .5rem 1.5rem}
  .home-cards{grid-template-columns:1fr}.stats-row{grid-template-columns:1fr 1fr}
  .forum-layout{flex-direction:column}.forum-sidebar{width:100%}
  .forum-post{flex-direction:column}
  .forum-post-side{width:100%;border-right:none;border-bottom:1px solid var(--g200);padding-bottom:.75rem;margin-bottom:.75rem;text-align:left;display:flex;align-items:center;gap:.75rem}
  .post-avatar{margin:0;width:36px;height:36px;font-size:.9rem}
  .footer-content{flex-direction:column;align-items:center;text-align:center}
  .container{padding:1rem .75rem}
}
@media (max-width:480px){
  .navbar{flex-direction:column;align-items:flex-start}
  .nav-links{width:100%;justify-content:flex-start}.nav-links a{font-size:.75rem;padding:.35rem .5rem}
  .nav-logo{height:26px}
}
