/* Tro Giang AI — components.css (tach tu index.html cu, giai doan 1a) */

header.site{ position:sticky; top:0; z-index:60; background:rgba(255,255,255,.96); box-shadow:0 2px 12px rgba(23,60,100,.12); }

.header-in{ max-width:1180px; margin:0 auto; padding:8px 16px; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }

.logo{ display:flex; align-items:center; gap:10px; background:none; border:none; padding:4px 2px; text-align:left; }

.logo-mark{ width:42px; height:42px; border-radius:13px; background:var(--orange); display:grid; place-items:center; flex:none; }

.logo-name{ font-family:'Quicksand',sans-serif; font-weight:700; font-size:1.45rem; color:var(--ink); white-space:nowrap; }

.logo-name em{ font-style:normal; color:var(--orange-d); }

.header-spacer{ flex:1; }

.btn{ border:none; border-radius:999px; padding:9px 18px; font-weight:800; font-size:.98rem; display:inline-flex; align-items:center; gap:8px; justify-content:center; text-decoration:none; transition:filter .15s, transform .1s; }

.btn:active{ transform:scale(.97); }

.btn-orange{ background:var(--orange); color:#fff; box-shadow:0 4px 12px rgba(249,115,22,.35); }

.btn-orange:hover{ background:var(--orange-d); }

.btn-green{ background:var(--green); color:#fff; box-shadow:0 4px 12px rgba(34,160,107,.35); }

.btn-green:hover{ background:var(--green-d); }

.btn-blue{ background:var(--blue); color:#fff; }

.btn-blue:hover{ background:var(--blue-d); }

.btn-ghost{ background:#fff; color:var(--ink); border:2px solid var(--line); }

.btn-ghost:hover{ border-color:var(--blue); color:var(--blue-d); }

.btn-soft{ background:var(--soft); color:var(--blue-d); }

.btn-sm{ padding:6px 13px; font-size:.9rem; }

.btn-lg{ padding:13px 26px; font-size:1.08rem; }

.btn:disabled{ opacity:.5; cursor:not-allowed; }

.icon-btn{ position:relative; width:42px; height:42px; border-radius:50%; border:2px solid var(--line); background:#fff; display:grid; place-items:center; flex:none; }

.icon-btn:hover{ border-color:var(--blue); }

.user-chip{ display:flex; align-items:center; gap:9px; background:var(--soft); border:2px solid var(--line); border-radius:999px; padding:4px 14px 4px 5px; font-weight:800; }

.user-chip .ava{ width:32px; height:32px; border-radius:50%; background:var(--orange); color:#fff; display:grid; place-items:center; font-weight:900; }

.menu-pop{ position:fixed; z-index:200; background:#fff; border-radius:14px; box-shadow:0 14px 40px rgba(10,40,70,.25); padding:6px; min-width:230px; border:1px solid var(--line); }

.menu-pop button,.menu-pop .mi{ display:flex; width:100%; align-items:center; gap:10px; background:none; border:none; text-align:left; padding:10px 12px; border-radius:9px; font-weight:700; font-size:.95rem; color:var(--ink); text-decoration:none; }

.menu-pop button:hover,.menu-pop .mi:hover{ background:var(--soft); }

.menu-pop .mi-note{ padding:8px 12px; font-size:.88rem; color:var(--ink2); border-bottom:1px solid var(--line); margin-bottom:4px; }

.card{ background:var(--card); border-radius:var(--radius); box-shadow:var(--shadow); padding:22px; }

.sec-title{ font-size:1.5rem; font-weight:700; margin:30px 0 14px; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }

.back-btn{ display:inline-flex; align-items:center; gap:7px; background:#fff; border:2px solid var(--line); color:var(--ink); font-weight:800; border-radius:999px; padding:7px 16px 7px 12px; box-shadow:var(--shadow); margin:16px 0 4px; }

.back-btn:hover{ border-color:var(--blue); color:var(--blue-d); }

.hero{ margin-top:16px; border-radius:26px; overflow:hidden; background:#fff; box-shadow:var(--shadow); display:flex; align-items:stretch; }

.hero-in{ padding:26px 30px; flex:1 1 auto; display:flex; flex-direction:column; justify-content:center; }

.hero-pic{ flex:0 0 47%; display:flex; }

.hero-pic img{ width:100%; height:auto; display:block; align-self:center; }

.hero h1{ font-size:2rem; font-weight:700; }

.hero h1 .l1{ color:var(--blue-d); }

.hero h1 .l2{ color:var(--orange-d); }

.hero h1 .l3{ color:var(--green-d); }

.hero p{ margin:12px 0 0; color:var(--ink2); font-size:1rem; max-width:560px; }

@media (max-width:640px){ .hero{ flex-direction:column; } .hero-in{ padding:20px; } .hero h1{ font-size:1.55rem; } .hero-pic{ flex:none; } }

.res-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }

@media (max-width:980px){ .res-grid{ grid-template-columns:repeat(3,1fr); } }

@media (max-width:680px){ .res-grid{ grid-template-columns:repeat(2,1fr); } }

.res-card{ background:#fff; border-radius:18px; box-shadow:var(--shadow); padding:16px; display:flex; flex-direction:column; gap:10px; border:2px solid transparent; text-align:left; width:100%; }

button.res-card{ cursor:pointer; font-family:inherit; }

button.res-card:hover{ border-color:var(--blue); }

.res-logo{ height:86px; border-radius:14px; display:grid; place-items:center; }

.res-title{ font-weight:800; font-size:1rem; line-height:1.35; }

.res-meta{ font-size:.82rem; color:var(--ink2); font-weight:700; }

.tag{ display:inline-block; padding:2px 10px; border-radius:999px; font-size:.75rem; font-weight:800; white-space:nowrap; }

.tag-ga{ background:#E3F2FD; color:#1565C0; }

.tag-slide{ background:#FFF3E0; color:#E65100; }

.tag-game{ background:#E8F5E9; color:#2E7D32; }

.tag-phieu{ background:#F3E5F5; color:#7B1FA2; }

.group-head{ display:flex; align-items:center; gap:12px; margin:26px 0 12px; }

.group-head h3{ font-size:1.35rem; }

.group-head .g-ico{ width:auto; min-width:44px; height:44px; padding:0 10px; border-radius:13px; display:grid; place-items:center; flex:none; }

.mode-card{ border:3px solid var(--line); background:#fff; border-radius:20px; padding:18px; text-align:left; display:flex; gap:14px; align-items:flex-start; width:100%; }

.mode-card.sel{ border-color:var(--orange); background:#FFF8F1; }

.mode-card h3{ font-size:1.12rem; margin-bottom:4px; }

.mode-card p{ margin:0; color:var(--ink2); font-size:.92rem; }

.file-chip{ display:inline-flex; align-items:center; gap:8px; background:#E3F2FD; color:#0D47A1; font-weight:800; border-radius:999px; padding:7px 14px; margin:4px 6px 0 0; font-size:.9rem; }

.ws-head{ display:flex; align-items:flex-start; gap:12px; margin-top:16px; flex-wrap:wrap; }

.ws-head h1{ font-size:1.45rem; flex:1; min-width:220px; }

.tabs{ display:flex; gap:8px; flex-wrap:wrap; margin:16px 0; }

.tab-btn{ border:2px solid var(--line); background:#fff; border-radius:999px; padding:9px 18px; font-weight:800; font-size:.98rem; color:var(--ink2); }

.tab-btn.sel{ background:var(--blue); border-color:var(--blue); color:#fff; }

.doc-body{ font-size:1.02rem; overflow-wrap:anywhere; }

.doc-body h2{ font-size:1.25rem; margin:20px 0 8px; color:var(--blue-d); }

.doc-body h3{ font-size:1.08rem; margin:16px 0 6px; }

.doc-body table{ border-collapse:collapse; width:100%; margin:10px 0; font-size:.95rem; }

.doc-body th,.doc-body td{ border:1.5px solid #B9D4EC; padding:8px 10px; text-align:left; vertical-align:top; }

.doc-body th{ background:var(--soft); }

.doc-body ul{ margin:6px 0 10px; padding-left:22px; }

.edit-hint{ font-size:.85rem; color:var(--blue-d); font-weight:700; }

.slide-stage{ background:#12314F; border-radius:18px; padding:18px; display:grid; place-items:center; }

.slide-view{ background:#fff; border-radius:10px; width:100%; max-width:880px; aspect-ratio:16/9; padding:34px 40px; display:flex; flex-direction:column; box-shadow:0 10px 30px rgba(0,0,0,.35); overflow:hidden; }

.slide-view h2{ font-size:1.7rem; color:var(--blue-d); margin-bottom:12px; }

.slide-view .s-body{ font-size:1.12rem; line-height:1.55; }

.slide-view .s-body ul{ padding-left:22px; margin:4px 0; }

.slide-nav{ display:flex; gap:10px; align-items:center; justify-content:center; margin-top:14px; color:#fff; font-weight:800; flex-wrap:wrap; }

.slide-nav button{ background:#fff; border:none; border-radius:999px; padding:8px 18px; font-weight:800; }

.game-card{ border:none; border-radius:20px; padding:18px; color:#fff; text-align:left; box-shadow:var(--shadow); display:flex; flex-direction:column; gap:6px; min-height:118px; justify-content:flex-end; width:100%; }

.game-card h3{ font-size:1.2rem; }

.game-card p{ margin:0; font-size:.88rem; opacity:.93; font-weight:600; }

.tab-btn{ display:inline-flex; align-items:center; gap:7px; }

.tab-btn svg{ flex:none; }

.btn svg{ flex:none; }

.life-btn{ border:2px solid var(--blue); background:#fff; color:var(--blue-d); border-radius:999px; padding:8px 14px; font-weight:800; font-size:.9rem; }

.life-btn:disabled{ opacity:.35; border-color:#bbb; color:#888; }

.fs-host{ position:relative; }

.fs-host.present{ position:fixed; inset:0; z-index:500; background:#fff; overflow:hidden; padding:0; display:flex; flex-direction:column; }

.fs-host.present .doc-body{ flex:1; overflow:auto; padding:4vh 5vw; font-size:clamp(1.2rem,2.1vw,1.85rem); line-height:1.6; }

.fs-host.present .doc-body h2{ font-size:1.45em; }

.fs-host.present .slide-stage{ flex:1; border-radius:0; padding:0; display:flex; flex-direction:column; min-height:0; }

.fs-host.present .slide-view{ flex:1; max-width:none; width:100%; height:auto; aspect-ratio:auto; border-radius:0; padding:5vh 5vw; min-height:0; }

.fs-host.present .slide-view h2{ font-size:clamp(2rem,4.4vw,3.6rem); }

.fs-host.present .slide-view .s-body{ font-size:clamp(1.3rem,2.6vw,2.2rem); line-height:1.6; }

.fs-host.present .slide-nav{ margin-top:0; padding:10px; flex:none; }

.fs-exit{ display:none; position:fixed; top:14px; right:16px; z-index:600; background:var(--red); color:#fff; border:none; border-radius:999px; padding:11px 24px; font-size:1.05rem; font-weight:900; box-shadow:0 8px 24px rgba(0,0,0,.3); }

body.presenting .fs-exit{ display:block; }

.modal-veil{ position:fixed; inset:0; background:rgba(13,42,70,.55); z-index:300; display:grid; place-items:center; padding:16px; }

.modal{ background:#fff; border-radius:22px; max-width:480px; width:100%; max-height:92vh; overflow:auto; padding:26px; box-shadow:0 24px 60px rgba(0,0,0,.3); }

.modal h2{ font-size:1.4rem; margin-bottom:6px; }

.modal .x{ float:right; background:var(--soft); border:none; width:38px; height:38px; border-radius:50%; font-size:1.1rem; font-weight:900; }

.auth-tabs{ display:flex; gap:8px; margin:14px 0; }

.auth-tabs button{ flex:1; border:2px solid var(--line); background:#fff; border-radius:999px; padding:9px; font-weight:800; }

.auth-tabs button.sel{ background:var(--blue); color:#fff; border-color:var(--blue); }

.price-card{ background:#fff; border-radius:20px; box-shadow:var(--shadow); padding:24px; border:3px solid var(--line); display:flex; flex-direction:column; gap:10px; }

.price-card.hot{ border-color:var(--orange); }

.price-card ul{ margin:0; padding-left:20px; color:var(--ink2); font-weight:600; }

.btn-exam{ background:#C62828; color:#fff; box-shadow:0 4px 12px rgba(198,40,40,.32); }

.btn-exam:hover{ background:#A51F1F; }

.ws-block{ border:2px solid #D8E9F7; border-radius:10px; padding:8px 10px; margin:6px 0; cursor:text; background:#fff; }

.ws-block:focus{ outline:none; }

.ws-block.sel{ border-color:var(--orange); background:#FFF8F1; box-shadow:0 0 0 3px rgba(249,115,22,.18); }

.ws-block-tag{ display:inline-block; font-size:.72rem; font-weight:800; color:var(--blue-d); background:var(--soft); border-radius:99px; padding:1px 9px; margin-bottom:4px; }

.toast{ position:fixed; left:50%; bottom:22px; transform:translateX(-50%); background:#17324F; color:#fff; padding:12px 22px; border-radius:999px; font-weight:800; z-index:800; box-shadow:0 12px 30px rgba(0,0,0,.3); max-width:92vw; text-align:center; }

.hist-item{ display:flex; gap:12px; align-items:center; background:#fff; border-radius:16px; box-shadow:var(--shadow); padding:13px 16px; margin-bottom:10px; flex-wrap:wrap; }

.hist-item .h-t{ font-weight:800; flex:1; min-width:180px; }

footer.site{ text-align:center; color:#2c5a86; font-weight:700; padding:10px 16px 34px; font-size:.92rem; }

/* FIX (loi cu #5): tieu de slide gioi han 2 dong, co dan theo man hinh */
.slide-view h2{ display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; font-size:clamp(1.4rem,3.2vw,1.7rem); }
