/* ── Instagram Grid Splitter ── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[x-cloak] { display: none !important; }

:root {
  --accent:  #e1306c;
  --agrad:   linear-gradient(135deg,#833ab4,#e1306c,#f77737);
  --ag2:     linear-gradient(135deg,#e1306c,#c13584);
  --bg:      #09090f;
  --card:    #111119;
  --card2:   #16161f;
  --text:    #f1f5f9;
  --text2:   #94a3b8;
  --faint:   #64748b;
  --border:  #1c1c2a;
  --border2: #252535;
  --input:   #0d0d17;
}

body { background:var(--bg); color:var(--text); font-family:system-ui,-apple-system,sans-serif; line-height:1.6; min-height:100vh; }

/* ── HEADER ── */
.site-header { position:sticky; top:0; z-index:100; background:rgba(9,9,15,.88); backdrop-filter:blur(12px); border-bottom:1px solid var(--border); }
.header-inner { max-width:1240px; margin:0 auto; padding:0 20px; display:flex; align-items:center; justify-content:space-between; height:56px; }
.logo { display:flex; align-items:center; gap:10px; text-decoration:none; }
.logo-icon { width:32px; height:32px; flex-shrink:0; }
.logo-text { font-size:.95rem; font-weight:800; background:var(--agrad); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.nav-links { display:flex; gap:24px; }
.nav-links a { color:var(--text2); text-decoration:none; font-size:.87rem; font-weight:500; transition:color .15s; }
.nav-links a:hover { color:var(--text); }

/* ── HERO ── */
.hero { text-align:center; padding:48px 20px 32px; }
.hero-badge { display:inline-flex; align-items:center; gap:6px; background:rgba(225,48,108,.1); border:1px solid rgba(225,48,108,.25); color:#f9a8d4; border-radius:999px; padding:4px 14px; font-size:.78rem; font-weight:600; margin-bottom:18px; }
.hero h1 { font-size:clamp(2rem,5vw,2.8rem); font-weight:900; letter-spacing:-.03em; margin-bottom:12px; }
.g { background:var(--agrad); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.hero p { color:var(--text2); font-size:1rem; max-width:600px; margin:0 auto; }

/* ── PAGE WRAP ── */
.page-wrap { max-width:1140px; margin:0 auto; padding:0 20px 80px; }

/* ── TOOL CARD ── */
.tool-card { background:var(--card); border:1px solid var(--border); border-radius:16px; overflow:hidden; margin-bottom:24px; }

/* ── DROP ZONE ── */
.drop-zone {
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px;
  padding:64px 32px; margin:24px;
  border:2px dashed var(--border2); border-radius:14px;
  background:var(--input); cursor:pointer;
  transition:border-color .2s, background .2s;
}
.drop-zone:hover, .drop-zone.dragover { border-color:var(--accent); background:rgba(225,48,108,.04); }
.drop-icon {
  width:60px; height:60px; border-radius:16px;
  background:rgba(225,48,108,.1); border:1px solid rgba(225,48,108,.22);
  display:flex; align-items:center; justify-content:center; color:var(--accent);
}
.drop-icon svg { width:28px; height:28px; }
.drop-title { font-size:1rem; font-weight:700; }
.drop-sub { font-size:.82rem; color:var(--faint); }
.drop-browse { display:inline-flex; align-items:center; gap:6px; padding:8px 20px; border-radius:8px; background:var(--ag2); color:#fff; font-size:.82rem; font-weight:700; cursor:pointer; border:none; transition:filter .15s; }
.drop-browse:hover { filter:brightness(1.1); }
.drop-privacy { display:flex; align-items:center; gap:5px; font-size:.73rem; color:var(--faint); }
.drop-privacy svg { width:12px; height:12px; }

/* ── ERROR BAR ── */
.error-bar { display:flex; align-items:center; gap:8px; margin:0 24px 16px; padding:10px 14px; border-radius:8px; background:rgba(244,63,94,.08); border:1px solid rgba(244,63,94,.2); color:#fda4af; font-size:.82rem; }
.error-bar svg { width:15px; height:15px; flex-shrink:0; }

/* ── CTRL BAR ── */
.ctrl-bar { display:flex; align-items:center; gap:10px; padding:14px 18px; border-bottom:1px solid var(--border); flex-wrap:wrap; }
.file-chip { display:flex; align-items:center; gap:7px; font-size:.82rem; font-weight:700; color:var(--text2); min-width:0; }
.file-chip svg { width:14px; height:14px; color:var(--accent); flex-shrink:0; }
.file-chip-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:160px; }
.presets { display:flex; gap:5px; flex-wrap:wrap; }
.preset-btn {
  padding:5px 13px; border-radius:8px; font-size:.77rem; font-weight:700;
  border:1px solid var(--border2); background:transparent; color:var(--faint);
  cursor:pointer; transition:all .12s;
}
.preset-btn:hover { border-color:var(--accent); color:var(--text2); }
.preset-btn.active { background:var(--ag2); border-color:transparent; color:#fff; }
.sep { width:1px; height:20px; background:var(--border2); flex-shrink:0; }
.fmt-group { display:flex; gap:1px; border:1px solid var(--border2); border-radius:8px; overflow:hidden; }
.fmt-btn { padding:5px 12px; font-size:.77rem; font-weight:700; border:none; background:transparent; color:var(--faint); cursor:pointer; transition:all .12s; }
.fmt-btn.active { background:var(--ag2); color:#fff; }
.fmt-btn:hover:not(.active) { background:var(--border2); color:var(--text2); }
.ctrl-right { margin-left:auto; display:flex; align-items:center; gap:8px; flex-shrink:0; }
.dim-label { font-size:.72rem; color:var(--faint); font-variant-numeric:tabular-nums; white-space:nowrap; }

/* ── CUSTOM GRID ── */
.custom-row { display:flex; align-items:center; gap:6px; font-size:.78rem; color:var(--text2); }
.custom-row label { font-weight:700; min-width:32px; }
.custom-row input[type=range] { width:80px; accent-color:var(--accent); }
.custom-row .val { min-width:18px; font-variant-numeric:tabular-nums; font-weight:700; color:var(--text); text-align:center; }

/* ── BTNS ── */
.btn { display:inline-flex; align-items:center; gap:6px; padding:7px 14px; border-radius:8px; font-size:.8rem; font-weight:700; border:1px solid var(--border2); background:var(--input); color:var(--text2); cursor:pointer; transition:all .12s; white-space:nowrap; }
.btn svg { width:13px; height:13px; flex-shrink:0; }
.btn:hover:not(:disabled) { border-color:var(--accent); color:var(--text); }
.btn.primary { background:var(--ag2); border-color:transparent; color:#fff; }
.btn.primary:hover { filter:brightness(1.1); }
.btn:disabled { opacity:.35; cursor:not-allowed; }
.btn.sm { padding:5px 10px; font-size:.73rem; }

/* ── QUALITY HINT ── */
.quality-hint { margin:0 18px 12px; padding:8px 13px; border-radius:8px; background:rgba(245,158,11,.07); border:1px solid rgba(245,158,11,.2); color:#fbbf24; font-size:.76rem; }

/* ── TABS ── */
.tool-tabs { display:flex; gap:2px; padding:0 18px; border-bottom:1px solid var(--border); }
.tool-tab { padding:9px 18px; font-size:.83rem; font-weight:700; border:none; background:transparent; color:var(--faint); cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-1px; transition:all .15s; display:flex; align-items:center; gap:6px; }
.tool-tab svg { width:14px; height:14px; }
.tool-tab:hover { color:var(--text2); }
.tool-tab.active { color:var(--accent); border-bottom-color:var(--accent); }

/* ── SPLITTING OVERLAY ── */
.splitting-msg { display:flex; align-items:center; justify-content:center; gap:10px; padding:48px; color:var(--faint); font-size:.9rem; }
.spin { width:20px; height:20px; border:2px solid var(--border2); border-top-color:var(--accent); border-radius:50%; animation:spin .7s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

/* ── PREVIEW TAB ── */
.preview-wrap { padding:20px; display:flex; justify-content:center; }
.preview-canvas-el { max-width:100%; max-height:500px; display:block; border-radius:6px; box-shadow:0 4px 20px rgba(0,0,0,.5); }

/* ── GUIDE TAB (posting order) ── */
.guide-head { padding:16px 20px 10px; display:flex; align-items:center; justify-content:space-between; }
.guide-title { font-size:.82rem; font-weight:800; color:var(--text2); text-transform:uppercase; letter-spacing:.07em; }
.guide-note { font-size:.75rem; color:var(--faint); }
.guide-strip { display:flex; gap:10px; padding:8px 20px 20px; overflow-x:auto; scroll-snap-type:x mandatory; }
.guide-strip::-webkit-scrollbar { height:4px; }
.guide-strip::-webkit-scrollbar-track { background:var(--border); border-radius:2px; }
.guide-strip::-webkit-scrollbar-thumb { background:var(--accent); border-radius:2px; }
.guide-card {
  flex-shrink:0; scroll-snap-align:start;
  width:140px; background:var(--card2); border:1px solid var(--border2);
  border-radius:12px; overflow:hidden; display:flex; flex-direction:column;
  transition:border-color .15s;
}
.guide-card:hover { border-color:var(--accent); }
.guide-card-top { position:relative; }
.guide-thumb { display:block; width:140px; height:140px; object-fit:cover; }
.guide-post-badge {
  position:absolute; top:6px; left:6px;
  background:var(--ag2); color:#fff;
  font-size:.68rem; font-weight:900;
  padding:2px 7px; border-radius:5px;
}
.guide-last-badge {
  background:rgba(0,0,0,.65); color:#fbbf24;
}
.guide-info { padding:8px 9px; }
.guide-pos { font-size:.7rem; color:var(--faint); margin-bottom:6px; }
.guide-dl-btn {
  width:100%; display:flex; align-items:center; justify-content:center; gap:4px;
  padding:5px; border-radius:6px; font-size:.73rem; font-weight:700;
  border:1px solid var(--border2); background:transparent; color:var(--faint);
  cursor:pointer; transition:all .12s;
}
.guide-dl-btn svg { width:11px; height:11px; }
.guide-dl-btn:hover { border-color:var(--accent); color:var(--text); }

/* ── PROFILE TAB ── */
.profile-tab-wrap { padding:20px; display:flex; justify-content:center; }
.ig-mockup {
  width:300px; background:#000; border-radius:24px;
  border:2px solid #333; overflow:hidden;
  box-shadow:0 8px 40px rgba(0,0,0,.6);
}
.ig-status-bar { height:22px; background:#000; display:flex; align-items:center; justify-content:flex-end; padding:0 12px; gap:4px; }
.ig-status-bar svg { width:10px; height:10px; color:#fff; }
.ig-nav-bar { display:flex; align-items:center; justify-content:space-between; padding:8px 12px; background:#000; border-bottom:1px solid #1a1a1a; }
.ig-nav-bar svg { width:18px; height:18px; color:#fff; }
.ig-nav-username { font-size:.72rem; font-weight:800; color:#fff; }
.ig-profile-head { background:#000; padding:12px; }
.ig-profile-row { display:flex; align-items:center; gap:14px; margin-bottom:12px; }
.ig-avatar { width:60px; height:60px; border-radius:50%; background:var(--agrad); flex-shrink:0; border:2px solid #333; }
.ig-stats { display:flex; gap:14px; flex:1; }
.ig-stat { text-align:center; }
.ig-stat-num { font-size:.8rem; font-weight:800; color:#fff; display:block; }
.ig-stat-label { font-size:.58rem; color:#aaa; display:block; }
.ig-handle { font-size:.72rem; font-weight:800; color:#fff; margin-bottom:2px; }
.ig-bio { font-size:.64rem; color:#aaa; margin-bottom:10px; line-height:1.4; }
.ig-follow-btn { width:100%; padding:5px; border-radius:6px; background:#fff; border:none; font-size:.72rem; font-weight:700; color:#000; cursor:default; margin-bottom:10px; }
.ig-tab-bar { display:flex; border-top:1px solid #1a1a1a; border-bottom:1px solid #1a1a1a; }
.ig-tab-icon { flex:1; padding:8px; display:flex; align-items:center; justify-content:center; }
.ig-tab-icon svg { width:16px; height:16px; color:#fff; }
.ig-tab-icon.active { border-bottom:1.5px solid #fff; }
.ig-grid-mock { display:grid; grid-template-columns:repeat(3,1fr); gap:1.5px; background:#1a1a1a; }
.ig-mock-tile { aspect-ratio:1; overflow:hidden; }
.ig-mock-tile img { width:100%; height:100%; object-fit:cover; display:block; }
.ig-mock-placeholder { aspect-ratio:1; background:#1e1e1e; }

/* ── INFO SECTIONS ── */
.info-sections { display:flex; flex-direction:column; gap:20px; margin-bottom:48px; }
.info-section { background:var(--card); border:1px solid var(--border); border-radius:16px; padding:32px 36px; }
.info-icon-row { display:flex; align-items:center; gap:14px; margin-bottom:14px; }
.info-icon { width:40px; height:40px; border-radius:10px; background:rgba(225,48,108,.1); border:1px solid rgba(225,48,108,.2); display:flex; align-items:center; justify-content:center; flex-shrink:0; color:var(--accent); }
.info-icon svg { width:18px; height:18px; }
.info-section h2 { font-size:1.1rem; font-weight:800; }
.info-body { color:var(--text2); font-size:.9rem; line-height:1.8; }
.info-body p + p { margin-top:10px; }
.info-body ul { padding-left:20px; display:flex; flex-direction:column; gap:6px; }
.info-body strong { color:var(--text); font-weight:700; }
.info-body code { font-family:monospace; font-size:.83em; background:var(--border); padding:1px 5px; border-radius:4px; color:var(--accent); }

/* ── RELATED / BLOG ── */
.related-section { margin-bottom:48px; }
.related-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; }
.related-header h2 { font-size:1.15rem; font-weight:800; }
.view-all-link { display:inline-flex; align-items:center; gap:4px; font-size:.82rem; font-weight:600; color:var(--accent); text-decoration:none; }
.view-all-link svg { width:14px; height:14px; }
.related-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:14px; }
.related-tool-card { display:flex; flex-direction:column; gap:10px; background:var(--card); border:1px solid var(--border); border-radius:14px; padding:18px; text-decoration:none; color:inherit; transition:border-color .15s,transform .15s; }
.related-tool-card:hover { border-color:var(--accent); transform:translateY(-2px); }
.rt-icon { width:40px; height:40px; border-radius:10px; display:flex; align-items:center; justify-content:center; }
.rt-icon svg { width:20px; height:20px; color:#fff; }
.rt-name { font-size:.9rem; font-weight:700; }
.rt-desc { font-size:.78rem; color:var(--text2); line-height:1.5; flex:1; }
.rt-link { display:inline-flex; align-items:center; gap:3px; font-size:.76rem; font-weight:700; color:var(--accent); }
.rt-link svg { width:12px; height:12px; }
.blog-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:14px; }
.blog-card { display:flex; flex-direction:column; gap:8px; background:var(--card); border:1px solid var(--border); border-radius:14px; padding:20px; text-decoration:none; color:inherit; transition:border-color .15s; }
.blog-card:hover { border-color:var(--accent); }
.blog-cat { display:inline-block; padding:2px 10px; border-radius:999px; font-size:.71rem; font-weight:700; }
.blog-title { font-size:.92rem; font-weight:700; line-height:1.35; }
.blog-excerpt { font-size:.8rem; color:var(--text2); line-height:1.55; flex:1; }
.blog-meta { font-size:.72rem; color:var(--faint); }
.blog-read { display:inline-flex; align-items:center; gap:3px; font-size:.76rem; font-weight:700; color:var(--accent); margin-top:auto; }
.blog-read svg { width:12px; height:12px; }

/* ── FOOTER ── */
.site-footer { background:var(--card); border-top:1px solid var(--border); padding:48px 20px 0; }
.footer-inner { max-width:1240px; margin:0 auto; display:grid; grid-template-columns:1fr auto; gap:40px; padding-bottom:40px; }
.footer-brand { max-width:280px; }
.footer-tagline { font-size:.82rem; color:var(--text2); margin-top:10px; line-height:1.55; }
.footer-nav-wrap { display:flex; gap:48px; }
.footer-col { display:flex; flex-direction:column; gap:8px; }
.footer-col h4 { font-size:.78rem; font-weight:700; color:var(--text2); text-transform:uppercase; letter-spacing:.07em; margin-bottom:12px; }
.footer-col a { font-size:.84rem; color:var(--faint); text-decoration:none; transition:color .15s; }
.footer-col a:hover { color:var(--text); }
.footer-bottom { border-top:1px solid var(--border); padding:16px 0; }
.footer-bottom .inner { max-width:1240px; margin:0 auto; padding:0 20px; display:flex; justify-content:space-between; align-items:center; }
.footer-bottom p { font-size:.78rem; color:var(--faint); }

/* ── REPORT MODAL ── */
.rm-trigger { position:fixed; bottom:24px; right:24px; z-index:200; display:flex; align-items:center; gap:7px; padding:9px 16px; border-radius:999px; background:var(--card); border:1px solid var(--border2); color:var(--faint); font-size:.76rem; font-weight:700; cursor:pointer; transition:all .15s; box-shadow:0 4px 20px rgba(0,0,0,.4); }
.rm-trigger svg { width:14px; height:14px; }
.rm-trigger:hover { border-color:var(--accent); color:var(--text); }
.rm-overlay { position:fixed; inset:0; z-index:300; background:rgba(0,0,0,.6); backdrop-filter:blur(4px); display:flex; align-items:center; justify-content:center; padding:20px; }
.rm-modal { background:var(--card); border:1px solid var(--border2); border-radius:20px; padding:32px; width:100%; max-width:480px; }
.rm-modal h3 { font-size:1.1rem; font-weight:800; margin-bottom:6px; }
.rm-modal p { color:var(--text2); font-size:.85rem; margin-bottom:20px; }
.rm-field { margin-bottom:14px; }
.rm-field label { display:block; font-size:.78rem; font-weight:700; color:var(--text2); margin-bottom:6px; }
.rm-field select, .rm-field textarea, .rm-field input { width:100%; padding:9px 12px; background:var(--input); border:1px solid var(--border2); border-radius:8px; color:var(--text); font-size:.85rem; outline:none; transition:border-color .15s; }
.rm-field select:focus, .rm-field textarea:focus, .rm-field input:focus { border-color:var(--accent); }
.rm-field textarea { resize:vertical; min-height:90px; font-family:inherit; }
.rm-actions { display:flex; gap:10px; justify-content:flex-end; margin-top:20px; }
.rm-btn { padding:8px 20px; border-radius:8px; font-size:.84rem; font-weight:700; cursor:pointer; transition:all .12s; border:1px solid var(--border2); background:var(--input); color:var(--text2); }
.rm-btn.primary { background:var(--ag2); border-color:transparent; color:#fff; }
.rm-btn:hover { border-color:var(--accent); color:var(--text); }
.rm-btn.primary:hover { filter:brightness(1.1); }
.rm-success { text-align:center; padding:20px 0; }
.rm-success svg { width:48px; height:48px; color:#4ade80; margin:0 auto 12px; display:block; }
.rm-success h3 { margin-bottom:8px; }
.rm-success p { margin-bottom:0; }

@media (max-width:640px) {
  .ctrl-bar { gap:8px; }
  .sep { display:none; }
  .guide-card { width:120px; }
  .guide-thumb { width:120px; height:120px; }
  .footer-inner { grid-template-columns:1fr; }
  .footer-nav-wrap { gap:28px; flex-wrap:wrap; }
}
