/* Instagram Bio Space Generator — cyan/sky theme */

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

:root {
  --accent:  #22d3ee;
  --agrad:   linear-gradient(135deg, #22d3ee, #0ea5e9);
  --bg:      #0f0f13;
  --card:    #18181f;
  --card2:   #1e1e28;
  --text:    #f1f1f7;
  --text2:   #9090aa;
  --faint:   #252533;
  --border:  #2a2a3a;
  --border2: #3a3a50;
  --input:   #12121a;
  --red:     #ef4444;
  --green:   #10b981;
  --amber:   #f59e0b;
}

/* ── Base ── */
body { background: var(--bg); color: var(--text); font-family: system-ui,-apple-system,sans-serif; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ── Header ── */
.site-header { border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; background: rgba(15,15,19,.9); backdrop-filter: blur(12px); }
.header-inner { max-width: 1140px; margin: 0 auto; padding: 0 20px; height: 58px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { width: 34px; height: 34px; border-radius: 9px; }
.logo-text { font-size: 15px; font-weight: 700; }
.nav-links { display: flex; gap: 22px; }
.nav-links a { font-size: 14px; color: var(--text2); transition: color .2s; }
.nav-links a:hover { color: var(--text); }

/* ── Hero ── */
.hero { text-align: center; padding: 52px 20px 40px; background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(34,211,238,.1) 0%, transparent 70%); }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(34,211,238,.1); border: 1px solid rgba(34,211,238,.28); border-radius: 20px; color: var(--accent); font-size: 12px; font-weight: 600; padding: 4px 12px; margin-bottom: 16px; }
.hero h1 { font-size: clamp(26px,5vw,42px); font-weight: 800; line-height: 1.15; letter-spacing: -.5px; margin-bottom: 12px; }
.hero h1 .g { background: var(--agrad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p { color: var(--text2); font-size: 16px; max-width: 580px; margin: 0 auto; line-height: 1.65; }

/* ── Layout ── */
.page-wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px 70px; }
.tool-card  { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 24px; margin-bottom: 40px; }

.ibg-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 840px) { .ibg-layout { grid-template-columns: 1fr; } }

/* ── Editor Panel ── */
.editor-panel { display: flex; flex-direction: column; gap: 14px; }
.editor-panel-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--text2); }

/* Line rows */
.lines-list { display: flex; flex-direction: column; gap: 0; }

.bio-line-wrap { display: flex; flex-direction: column; }

.bio-line-row {
  display: grid;
  grid-template-columns: 28px 28px 1fr auto auto;
  gap: 5px;
  align-items: center;
}
.line-move-btn {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text2);
  cursor: pointer;
  font-size: 13px;
  height: 32px;
  line-height: 1;
  transition: border-color .15s, color .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.line-move-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.line-move-btn:disabled { opacity: .3; cursor: default; }
.bio-line-input {
  background: var(--input);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  height: 38px;
  padding: 0 12px;
  transition: border-color .2s;
  width: 100%;
}
.bio-line-input:focus { outline: none; border-color: var(--accent); }
.bio-line-input::placeholder { color: var(--text2); }
.line-num {
  font-size: 10px;
  color: var(--text2);
  font-weight: 700;
  min-width: 16px;
  text-align: center;
}
.line-remove-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text2);
  cursor: pointer;
  font-size: 16px;
  height: 32px;
  line-height: 1;
  padding: 0 7px;
  transition: border-color .15s, color .15s;
}
.line-remove-btn:hover:not(:disabled) { border-color: var(--red); color: var(--red); }
.line-remove-btn:disabled { opacity: .25; cursor: default; }

/* Spacing strip between lines */
.bio-spacing-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 0 5px 66px; /* indent to align under input */
}
.spacing-label { font-size: 10px; color: var(--text2); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; flex-shrink: 0; }
.spacing-btns { display: flex; gap: 4px; }
.spacing-btn {
  background: var(--card2);
  border: 1.5px solid var(--border);
  border-radius: 5px;
  color: var(--text2);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  transition: border-color .15s, color .15s, background .15s;
  white-space: nowrap;
}
.spacing-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(34,211,238,.08); }

.add-line-btn {
  background: none;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  color: var(--text2);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  height: 38px;
  transition: border-color .15s, color .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 2px;
}
.add-line-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Collapsible panels */
.coll-section { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.coll-header { background: var(--card2); padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; user-select: none; font-size: 13px; font-weight: 600; }
.coll-header:hover { background: var(--faint); }
.coll-chevron { transition: transform .2s; }
.coll-chevron.open { transform: rotate(180deg); }
.coll-body { padding: 12px; }

/* Symbol tabs */
.sym-tabs { display: flex; gap: 4px; margin-bottom: 10px; flex-wrap: wrap; }
.sym-tab {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  color: var(--text2);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  transition: border-color .15s, color .15s, background .15s;
}
.sym-tab.active { border-color: var(--accent); color: var(--accent); background: rgba(34,211,238,.08); }
.sym-grid { display: flex; flex-wrap: wrap; gap: 5px; }
.sym-btn {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 6px 10px;
  transition: border-color .15s, background .15s;
  white-space: nowrap;
}
.sym-btn:hover { border-color: var(--accent); background: rgba(34,211,238,.07); }

/* Template grid */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px,1fr)); gap: 8px; }
.tpl-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  padding: 10px 8px;
  text-align: center;
  transition: border-color .15s, background .15s;
}
.tpl-card:hover { border-color: var(--accent); background: rgba(34,211,238,.06); }

/* Editor footer */
.editor-footer { display: flex; justify-content: flex-end; }
.clear-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text2);
  cursor: pointer;
  font-size: 12px;
  padding: 6px 12px;
  transition: border-color .15s, color .15s;
}
.clear-btn:hover { border-color: var(--red); color: var(--red); }

/* ── Preview Panel ── */
.preview-panel { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 840px) { .preview-panel { position: sticky; top: 72px; max-height: calc(100vh - 90px); overflow-y: auto; } }
.preview-panel::-webkit-scrollbar { width: 5px; }
.preview-panel::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

/* Stats */
.stats-bar { background: var(--card2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.stat-row { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.stat-label { color: var(--text2); }
.stat-val { font-weight: 700; font-size: 12px; color: var(--text); transition: color .2s; }
.stat-val.over { color: var(--red); }
.stat-val.warn { color: var(--amber); }
.stat-val.ok   { color: var(--green); }
.char-track { height: 4px; background: var(--faint); border-radius: 2px; overflow: hidden; margin-top: 4px; }
.char-fill { height: 100%; border-radius: 2px; transition: width .2s, background .2s; background: var(--agrad); }
.char-fill.over { background: var(--red); }
.char-fill.warn { background: var(--amber); }

/* Instagram profile mockup */
.ig-profile-phone {
  background: #000;
  border: 1px solid #1a1a1a;
  border-radius: 16px;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.ig-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px 4px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}
.ig-status-icons { display: flex; gap: 4px; align-items: center; }
.ig-status-icons svg { color: #fff; }
.ig-profile-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 14px 8px;
  border-bottom: 1px solid #111;
}
.ig-nav-username { font-size: 14px; font-weight: 700; color: #fff; }
.ig-nav-icon { color: #aaa; }
.ig-profile-body { padding: 12px 14px; }
.ig-header-row { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.ig-avatar-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--agrad);
  padding: 2px;
  flex-shrink: 0;
}
.ig-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #1a1a2e;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ig-avatar-initials { font-size: 22px; }
.ig-stats-row { display: flex; gap: 0; flex: 1; }
.ig-stat-item { flex: 1; text-align: center; }
.ig-stat-num { font-size: 15px; font-weight: 700; color: #fff; line-height: 1.2; }
.ig-stat-lbl { font-size: 11px; color: #8e8e8e; margin-top: 1px; }
.ig-profile-name { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.ig-profile-bio-text {
  font-size: 13px;
  color: #fff;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 40px;
}
.ig-profile-bio-text.empty { color: #555; font-style: italic; }
.ig-profile-btns { display: flex; gap: 6px; margin-top: 12px; margin-bottom: 12px; }
.ig-profile-btn {
  flex: 1;
  background: #262626;
  border: none;
  border-radius: 7px;
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 6px;
  text-align: center;
  cursor: default;
}
.ig-grid-sep { height: 1px; background: #1a1a1a; margin: 0 -14px; }
.ig-grid-tabs { display: flex; padding: 0 14px; border-bottom: 1px solid #111; }
.ig-grid-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 0;
  color: #555;
}
.ig-grid-tab.active { color: #fff; border-bottom: 1px solid #fff; }
.ig-post-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5px; background: #111; }
.ig-post-thumb {
  aspect-ratio: 1;
  background: #1a1a2e;
}
.ig-post-thumb:nth-child(2) { background: #12121e; }
.ig-post-thumb:nth-child(3) { background: #1e1220; }

/* Copy + output */
.copy-section { display: flex; flex-direction: column; gap: 7px; }
.copy-btn {
  border: none;
  border-radius: 9px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 14px;
  transition: opacity .15s;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.copy-btn.primary { background: var(--agrad); color: #fff; }
.copy-btn.primary:hover { opacity: .88; }

.bio-output-box {
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text2);
  font-family: inherit;
  font-size: 12px;
  line-height: 1.7;
  padding: 10px 12px;
  resize: none;
  white-space: pre-wrap;
  word-break: break-all;
  height: 90px;
  overflow-y: auto;
}
.bio-output-box::-webkit-scrollbar { width: 4px; }
.bio-output-box::-webkit-scrollbar-thumb { background: var(--border2); }
.output-label { font-size: 11px; color: var(--text2); font-weight: 600; }

/* ── Info sections ── */
.info-sections-wrap { display: flex; flex-direction: column; gap: 0; margin-bottom: 40px; }
.info-section { background: var(--card); border: 1px solid var(--border); border-radius: 0; padding: 28px 32px; border-bottom: none; }
.info-section:first-child { border-radius: 16px 16px 0 0; }
.info-section:last-child  { border-radius: 0 0 16px 16px; border-bottom: 1px solid var(--border); }
.info-icon-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.info-icon { width: 36px; height: 36px; border-radius: 9px; background: rgba(34,211,238,.1); border: 1px solid rgba(34,211,238,.2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--accent); }
.info-icon svg { width: 16px; height: 16px; }
.info-section h2 { font-size: 17px; font-weight: 700; }
.info-body { font-size: 14px; line-height: 1.75; color: var(--text2); }
.info-body p + p { margin-top: 10px; }
.info-body ul { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.info-body strong { color: var(--text); }
.info-body code { background: var(--card2); border: 1px solid var(--border); border-radius: 4px; color: #67e8f9; font-size: 12px; padding: 1px 5px; }

/* ── Related Tools ── */
.related-section { margin-bottom: 40px; }
.related-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.related-header h2 { font-size: 20px; font-weight: 700; }
.view-all-link { display: flex; align-items: center; gap: 5px; color: var(--accent); font-size: 13px; font-weight: 600; transition: opacity .2s; }
.view-all-link:hover { opacity: .8; }
.view-all-link svg { width: 14px; height: 14px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(210px,1fr)); gap: 14px; }
.related-tool-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; transition: border-color .2s, transform .2s; display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.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; margin-bottom: 4px; flex-shrink: 0; }
.rt-icon svg { width: 20px; height: 20px; color: #fff; }
.rt-name { font-size: 14px; font-weight: 700; }
.rt-desc { font-size: 12px; color: var(--text2); line-height: 1.5; flex: 1; }
.rt-link { display: flex; align-items: center; gap: 4px; color: var(--accent); font-size: 12px; font-weight: 600; margin-top: 4px; }
.rt-link svg { width: 12px; height: 12px; }

/* ── Blog cards ── */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 16px; }
.blog-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; transition: border-color .2s, transform .2s; }
.blog-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.blog-cat { border-radius: 12px; font-size: 11px; font-weight: 700; padding: 3px 9px; align-self: flex-start; }
.blog-title { font-size: 14px; font-weight: 700; line-height: 1.4; }
.blog-excerpt { font-size: 12px; color: var(--text2); line-height: 1.55; flex: 1; }
.blog-meta { font-size: 11px; color: var(--text2); }
.blog-read { display: flex; align-items: center; gap: 4px; color: var(--accent); font-size: 12px; font-weight: 600; margin-top: 2px; }
.blog-read svg { width: 12px; height: 12px; }

/* ── Footer ── */
.site-footer { background: var(--card); border-top: 1px solid var(--border); padding: 50px 20px 0; }
.footer-inner { max-width: 1140px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto; gap: 40px; padding-bottom: 40px; }
@media (max-width: 640px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-brand { max-width: 280px; }
.footer-tagline { font-size: 13px; color: var(--text2); line-height: 1.6; margin-top: 12px; }
.footer-nav-wrap { display: flex; gap: 50px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--text2); margin-bottom: 4px; }
.footer-col a { font-size: 13px; color: var(--text2); transition: color .2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding: 16px 20px; }
.footer-bottom .inner { max-width: 1140px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.footer-bottom p { font-size: 12px; color: var(--text2); }
