:root {
  --bg: #f4f8fc;
  --surface: #ffffff;
  --surface2: #eef3f8;
  --border: #dde8f0;
  --primary: #1a6b52;
  --primary2: #1e5a7d;
  --accent: #2c9b77;
  --accent2: #2176ae;
  --text: #1a2c3e;
  --muted: #4a6a80;
  --code-bg: #0f1923;
  --code-fg: #cdd9e5;
  --radius: 28px;
  --shadow: 0 8px 30px rgba(0,0,0,0.07);
}
[data-theme="dark"] {
  --bg: #0d1b24;
  --surface: #152230;
  --surface2: #1c2f3e;
  --border: #243547;
  --text: #d8e8f4;
  --muted: #7fa8c0;
  --code-bg: #080f15;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; transition: background .3s, color .3s; }

/* NAV */
.navbar { background: rgba(255,255,255,.95); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 200; box-shadow: 0 2px 14px rgba(0,0,0,.04); }
[data-theme="dark"] .navbar { background: rgba(21,34,48,.96); }
.nav-flex { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: .9rem 0; gap: .5rem; }
.logo { font-family: 'Outfit',sans-serif; font-weight: 800; font-size: 1.4rem; background: linear-gradient(130deg,#1e5a7d,#2c9b77); -webkit-background-clip: text; background-clip: text; color: transparent; text-decoration: none; }
.nav-links { display: flex; gap: 1.5rem; list-style: none; flex-wrap: wrap; }
.nav-links a { text-decoration: none; font-weight: 500; color: var(--muted); transition: .2s; font-size: .92rem; }
.nav-links a:hover { color: var(--accent); }
.nav-right { display: flex; gap: .7rem; align-items: center; }
.theme-toggle { background: var(--surface2); border: 1px solid var(--border); border-radius: 50px; padding: .35rem .9rem; cursor: pointer; font-size: .83rem; color: var(--text); transition: .2s; }
.theme-toggle:hover { background: var(--border); }
.mobile-menu-toggle { display: none; font-size: 1.7rem; cursor: pointer; background: none; border: none; color: var(--text); }

/* LAYOUT */
.container { max-width: 1300px; margin: 0 auto; padding: 0 22px; }
.breadcrumb { font-size: .82rem; color: var(--muted); margin: 1.2rem 0 .5rem; }
.breadcrumb a { color: var(--accent); text-decoration: none; }

/* HERO */
.hero { text-align: center; padding: 2.5rem 0 1.5rem; }
.hero h1 { font-family: 'Outfit',sans-serif; font-size: 2.5rem; font-weight: 800; background: linear-gradient(120deg,#144d66,#1f8a64); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: .9rem; line-height: 1.2; }
.hero p { font-size: 1.06rem; max-width: 740px; margin: 0 auto; color: var(--muted); }
.badge-row { display: flex; gap: .55rem; justify-content: center; flex-wrap: wrap; margin-top: 1.1rem; }
.badge { background: var(--surface2); border: 1px solid var(--border); border-radius: 50px; padding: .28rem .85rem; font-size: .77rem; font-weight: 600; color: var(--primary2); }

/* CARD */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem; margin: 1.5rem 0; border: 1px solid var(--border); }

/* FORM */
.form-label { font-weight: 600; display: block; margin-bottom: .7rem; font-size: .95rem; }
.url-row { display: flex; gap: .8rem; flex-wrap: wrap; align-items: flex-start; }
.url-row input[type="url"] { flex: 1; min-width: 200px; padding: .88rem 1.3rem; font-size: 1rem; border: 1.5px solid var(--border); border-radius: 60px; background: var(--surface2); color: var(--text); transition: .2s; }
.url-row input[type="url"]:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(44,155,119,.18); }
.error-msg { color: #c7362b; font-size: .83rem; margin-top: .4rem; display: none; }
.progress-bar-wrap { height: 3px; background: var(--border); border-radius: 3px; margin-top: .8rem; display: none; }
.progress-bar { height: 100%; background: linear-gradient(90deg,var(--primary),var(--accent)); width: 0%; transition: width .4s; border-radius: 3px; }

/* OPTION CARDS */
.options-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap: .65rem; margin-top: 1.2rem; }
.opt-card { background: var(--surface2); border: 1.5px solid var(--border); border-radius: 18px; padding: .72rem 1rem; cursor: pointer; transition: .2s; user-select: none; display: flex; align-items: center; gap: .6rem; }
.opt-card:hover { border-color: var(--accent); }
.opt-card.active { border-color: var(--accent); background: rgba(44,155,119,.08); }
.opt-card input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; }
.opt-label { font-size: .87rem; font-weight: 600; color: var(--text); }
.opt-sub { font-size: .74rem; color: var(--muted); margin-top: .1rem; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: .45rem; background: linear-gradient(95deg,#1e6f5c,#2b9b78); border: none; padding: .85rem 1.8rem; font-weight: 700; font-size: .95rem; border-radius: 60px; color: #fff; cursor: pointer; transition: all .2s; box-shadow: 0 4px 14px rgba(44,155,119,.3); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none; }
.btn:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(44,155,119,.4); }
.btn.secondary { background: var(--surface2); color: var(--primary); box-shadow: none; border: 1.5px solid var(--border); }
.btn.secondary:hover { background: var(--border); }
.btn.danger { background: linear-gradient(95deg,#c0392b,#e74c3c); box-shadow: 0 4px 14px rgba(192,57,43,.3); }
.action-row { display: flex; gap: .65rem; flex-wrap: wrap; margin-top: 1rem; }
.action-row .btn { padding: .5rem 1.2rem; font-size: .85rem; }

/* TABS */
.tabs-header { display: flex; overflow-x: auto; background: var(--surface2); border-radius: 18px 18px 0 0; border-bottom: 2px solid var(--border); scrollbar-width: none; }
.tabs-header::-webkit-scrollbar { display: none; }
.tab-btn { flex-shrink: 0; background: none; border: none; cursor: pointer; padding: .68rem 1.15rem; font-size: .84rem; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: .2s; display: flex; align-items: center; gap: .38rem; }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-btn:hover:not(.active) { color: var(--text); }
.tab-count { background: var(--border); color: var(--muted); border-radius: 50px; padding: 1px 7px; font-size: .71rem; font-weight: 700; }
.tab-btn.active .tab-count { background: var(--accent); color: #fff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* CODE AREA */
.code-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .55rem; padding: .65rem 1rem; background: var(--surface2); }
.search-box { display: flex; align-items: center; gap: .4rem; background: var(--surface); border: 1.5px solid var(--border); border-radius: 50px; padding: .3rem .9rem; flex: 1; min-width: 130px; max-width: 300px; }
.search-box input { border: none; background: transparent; outline: none; font-size: .84rem; color: var(--text); width: 100%; }
.search-match { background: #ffdd57; color: #000; border-radius: 2px; }
.code-wrap{
    display:flex;
    background:var(--code-bg);
    color:var(--code-fg);
    border-radius:0 0 22px 22px;
    font-family:'Fira Code',monospace;
    font-size:.84rem;
    line-height:1.75;
    max-height:560px;
    overflow:auto;
}
/* Code */
.code-inner{
    flex:1;
    padding:1.2rem;
    white-space:pre;
    overflow:visible;
    box-sizing:border-box;
}
.line-numbers{
    flex:0 0 58px;
    text-align:right;
    padding:1.2rem .75rem;
    color:rgba(255,255,255,.35);
    background:rgba(255,255,255,.035);
    border-right:1px solid rgba(255,255,255,.08);
    user-select:none;
    white-space:pre;
    box-sizing:border-box;
}
.toolbar-btns { display: flex; gap: .45rem; flex-wrap: wrap; }
.toolbar-btns button { background: rgba(255,255,255,.08); color: var(--code-fg); border: 1px solid rgba(255,255,255,.15); border-radius: 50px; padding: .28rem .85rem; font-size: .77rem; cursor: pointer; transition: .2s; }
.toolbar-btns button:hover { background: rgba(255,255,255,.16); }

/* STATS */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(155px,1fr)); gap: 1rem; margin-top: 1rem; }
.stat-box { background: var(--surface2); border: 1px solid var(--border); border-radius: 20px; padding: 1.1rem; text-align: center; }
.stat-num { font-family: 'Outfit',sans-serif; font-size: 1.9rem; font-weight: 800; color: var(--accent); }
.stat-lbl { font-size: .79rem; color: var(--muted); margin-top: .2rem; }
.meta-table { width: 100%; border-collapse: collapse; font-size: .87rem; margin-top: .8rem; }
.meta-table td { padding: .5rem .8rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.meta-table td:first-child { color: var(--muted); font-weight: 600; width: 175px; white-space: nowrap; }
.meta-table tr:last-child td { border-bottom: none; }

/* LINKS TABLE */
.links-filters { display: flex; gap: .55rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filter-btn { background: var(--surface2); border: 1.5px solid var(--border); border-radius: 50px; padding: .3rem .9rem; font-size: .81rem; font-weight: 600; cursor: pointer; color: var(--muted); transition: .2s; }
.filter-btn.active, .filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.links-table { width: 100%; border-collapse: collapse; font-size: .83rem; }
.links-table th { background: var(--surface2); padding: .5rem .8rem; text-align: left; font-weight: 700; border-bottom: 2px solid var(--border); color: var(--muted); font-size: .77rem; text-transform: uppercase; }
.links-table td { padding: .48rem .8rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.links-table tr:last-child td { border-bottom: none; }
.links-table a { color: var(--accent2); word-break: break-all; }
.badge-int { background: #d1f5e8; color: #1a6b52; border-radius: 50px; padding: 2px 8px; font-size: .71rem; font-weight: 700; }
.badge-ext { background: #d8eeff; color: #1e5a7d; border-radius: 50px; padding: 2px 8px; font-size: .71rem; font-weight: 700; }
.table-wrap { overflow-x: auto; max-height: 480px; overflow-y: auto; }

/* IMAGE GALLERY */
.img-gallery { display: grid; grid-template-columns: repeat(auto-fill,minmax(155px,1fr)); gap: 1rem; margin-top: 1rem; }
.img-thumb { background: var(--surface2); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; transition: .2s; position: relative; }
.img-thumb:hover { box-shadow: 0 6px 18px rgba(0,0,0,.12); transform: translateY(-2px); }
.img-thumb img { width: 100%; height: 115px; object-fit: cover; display: block; }
.img-meta { padding: .45rem .65rem; font-size: .74rem; color: var(--muted); word-break: break-all; }
.img-meta a { color: var(--accent2); text-decoration: none; }
.img-download-btn { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.6); border: none; color: #fff; border-radius: 50%; width: 28px; height: 28px; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: .2s; }
.img-download-btn:hover { background: rgba(0,0,0,.8); }
.view-toggle { display: flex; gap: .5rem; margin-bottom: .8rem; }
.vbtn { background: var(--surface2); border: 1.5px solid var(--border); border-radius: 50px; padding: .3rem .8rem; font-size: .81rem; cursor: pointer; transition: .2s; color: var(--muted); }
.vbtn.active { border-color: var(--accent); color: var(--accent); }

/* URL LIST (external CSS/JS) */
.url-list { list-style: none; margin-top: .6rem; }
.url-list li { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: .58rem 1rem; margin-bottom: .45rem; display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.url-list a { color: var(--accent2); font-size: .84rem; word-break: break-all; flex: 1; }
.url-list .ul-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.url-list .ul-actions button { background: none; border: 1px solid var(--border); border-radius: 50px; padding: .2rem .7rem; font-size: .74rem; cursor: pointer; color: var(--muted); transition: .2s; }
.url-list .ul-actions button:hover { border-color: var(--accent); color: var(--accent); }

/* SECTION */
.section-title { font-family: 'Outfit',sans-serif; font-size: 1.7rem; font-weight: 800; color: var(--text); margin-bottom: .3rem; }
.section-sub { color: var(--muted); font-size: .92rem; margin-bottom: 1.5rem; }

/* FEATURES */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit,minmax(235px,1fr)); gap: 1.4rem; }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; transition: .2s; }
.feature-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.feature-card .fc-icon { font-size: 1.75rem; margin-bottom: .65rem; }
.feature-card h3 { font-size: .99rem; font-weight: 700; margin-bottom: .35rem; }
.feature-card p { font-size: .87rem; color: var(--muted); }
.how-steps { counter-reset: step; }
.how-step { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.2rem; }
.step-num { background: var(--accent); color: #fff; width: 32px; height: 32px; min-width: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .88rem; }
.step-text { padding-top: .2rem; font-size: .94rem; }

/* FAQ */
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; margin-bottom: .75rem; overflow: hidden; }
.faq-q { padding: .95rem 1.35rem; cursor: pointer; font-weight: 600; display: flex; justify-content: space-between; align-items: center; font-size: .93rem; transition: .2s; }
.faq-q:hover { background: var(--surface2); }
.faq-a { display: none; padding: 0 1.35rem 1rem; font-size: .89rem; color: var(--muted); }
.faq-item.open .faq-a { display: block; }
.faq-arrow { transition: .2s; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }

/* SEO ARTICLE */
.seo-article { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); padding: 2rem; margin: 2rem 0; }
.seo-article h2 { font-size: 1.25rem; margin: 1.35rem 0 .5rem; color: var(--primary2); }
.seo-article h2:first-child { margin-top: 0; }
.seo-article p { color: var(--muted); font-size: .93rem; margin-bottom: .65rem; }
.seo-article ul { color: var(--muted); font-size: .93rem; padding-left: 1.3rem; margin-bottom: .65rem; }
.seo-article li { margin-bottom: .3rem; }

/* CTA */
.cta-section { text-align: center; }
.cta-section h3 { font-family: 'Outfit',sans-serif; font-size: 1.6rem; font-weight: 800; margin-bottom: .65rem; }
.cta-section p { color: var(--muted); margin-bottom: 1.4rem; }
.cta-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* FOOTER */
footer { background: #0c2030; color: #c8dae6; padding: 3rem 0 2rem; margin-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(165px,1fr)); gap: 2rem; }
footer h4 { color: #fff; margin-bottom: .65rem; font-size: .93rem; }
.footer-links a { display: block; color: #8fb5c9; text-decoration: none; font-size: .87rem; margin-bottom: .42rem; }
.footer-links a:hover { color: #2c9b77; }
.footer-copy { font-size: .75rem; text-align: center; margin-top: 2rem; color: #6a8fa5; border-top: 1px solid #1a3a50; padding-top: 1.4rem; }

/* COOKIE */
.cookie-bar { position: fixed; bottom: 0; left: 0; right: 0; background: #0f2330; color: #c8dae6; padding: 1rem 1.5rem; display: none; justify-content: center; align-items: center; gap: 1.2rem; flex-wrap: wrap; z-index: 999; box-shadow: 0 -4px 20px rgba(0,0,0,.2); }
.cookie-bar span { font-size: .87rem; }

/* HIGHLIGHT */
.hl-tag { color: #79b8ff; }
.hl-attr { color: #ffab70; }
.hl-val { color: #9ecbff; }
.hl-comment { color: #6a7f8e; font-style: italic; }

/* RESPONSIVE */
@media(max-width:780px){
  .nav-links { display: none; width: 100%; flex-direction: column; align-items: center; padding: 1rem 0; }
  .nav-links.show { display: flex; }
  .mobile-menu-toggle { display: block; }
  .hero h1 { font-size: 1.72rem; }
  .options-grid { grid-template-columns: repeat(auto-fill,minmax(145px,1fr)); }
  .img-gallery { grid-template-columns: repeat(auto-fill,minmax(130px,1fr)); }
}
@media(max-width:480px){
  .card { padding: 1.3rem; }
  .btn { padding: .72rem 1.2rem; font-size: .88rem; }
  .code-inner { padding-left: 3rem; }
}