/* Utilix — Barcode Generator (bcg-) */
:root {
    --bcg-accent: #ff4d8d;
    --bcg-accent-light: #ffe4ef;
    --bcg-accent-dark: #e11d48;
    --bcg-accent-border: #fda4af;
}

.bcg-hero { padding-bottom: 40px; }
.bcg-hero__grid { display: grid; grid-template-columns: 1fr 400px; gap: 40px; align-items: center; }
.bcg-hero__main { display: flex; gap: 20px; align-items: flex-start; }
.bcg-hero__visual { display: flex; align-items: center; justify-content: center; min-height: 260px; }

.bcg-main { padding: 0 0 48px; }
.bcg-section-head { margin-bottom: 24px; }
.bcg-section-head h2 { margin: 0 0 8px; font-size: 1.25rem; font-weight: 800; color: var(--heading); }
.bcg-section-head p { margin: 0; font-size: .875rem; color: #64748b; }
.bcg-section-head--center { text-align: center; }
.bcg-section-head--center p { margin: 0 auto; max-width: 560px; }
.bcg-section-eyebrow { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: .75rem; font-weight: 700; color: var(--bcg-accent); background: var(--bcg-accent-light); border-radius: 999px; margin-bottom: 12px; }
.bcg-section-eyebrow i { width: 14px; height: 14px; }

.bcg-mode-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 32px; }
.bcg-mode-btn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px 12px; background: #fff; border: 2px solid #e8ecf1; border-radius: 16px; cursor: pointer; text-align: center; transition: border-color .2s, box-shadow .2s, transform .15s; font-family: inherit; }
.bcg-mode-btn__num { position: absolute; top: 8px; left: 10px; font-size: .5625rem; font-weight: 800; color: #94a3b8; }
.bcg-mode-btn:hover { border-color: var(--bcg-accent-border); box-shadow: 0 6px 20px rgba(255,77,141,.12); transform: translateY(-2px); }
.bcg-mode-btn.is-active { border-color: var(--bcg-accent); background: linear-gradient(180deg, #fff0f6 0%, #fff 100%); box-shadow: 0 4px 20px rgba(255,77,141,.15); }
.bcg-mode-btn__icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; margin-top: 4px; }
.bcg-mode-btn__icon i { width: 22px; height: 22px; }
.bcg-mode-btn strong { font-size: .6875rem; font-weight: 700; color: var(--heading); line-height: 1.3; }
.bcg-mode-btn span:last-child { font-size: .5625rem; color: #94a3b8; line-height: 1.35; }
.bcg-mode-btn--pink .bcg-mode-btn__icon { background: #ffe4ef; color: #ff4d8d; }
.bcg-mode-btn--blue .bcg-mode-btn__icon { background: #dbeafe; color: #2563eb; }
.bcg-mode-btn--green .bcg-mode-btn__icon { background: #d1fae5; color: #059669; }
.bcg-mode-btn--orange .bcg-mode-btn__icon { background: #ffedd5; color: #ea580c; }
.bcg-mode-btn--purple .bcg-mode-btn__icon { background: #ede9fe; color: #7c3aed; }
.bcg-mode-btn--red .bcg-mode-btn__icon { background: #fee2e2; color: #dc2626; }
.bcg-mode-btn--teal .bcg-mode-btn__icon { background: #ccfbf1; color: #0d9488; }
.bcg-mode-btn--yellow .bcg-mode-btn__icon { background: #fef9c3; color: #ca8a04; }
.bcg-mode-btn--cyan .bcg-mode-btn__icon { background: #cffafe; color: #0891b2; }
.bcg-mode-btn--indigo .bcg-mode-btn__icon { background: #e0e7ff; color: #4f46e5; }

.bcg-workspace { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.bcg-card { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 24px; box-shadow: 0 4px 24px rgba(15,23,42,.05); }
.bcg-card__head h2 { margin: 0; font-size: 1.0625rem; font-weight: 700; }
.bcg-mode-badge { display: inline-block; margin-top: 8px; padding: 4px 10px; font-size: .6875rem; font-weight: 700; color: var(--bcg-accent-dark); background: var(--bcg-accent-light); border: 1px solid var(--bcg-accent-border); border-radius: 999px; }
.bcg-mode-desc { margin: 12px 0 16px; padding: 12px 14px; font-size: .8125rem; color: #be185d; background: var(--bcg-accent-light); border: 1px solid var(--bcg-accent-border); border-radius: 12px; }

.bcg-field { margin-bottom: 14px; }
.bcg-field label { display: block; margin-bottom: 6px; font-size: .8125rem; font-weight: 700; color: var(--heading); }
.bcg-field select { width: 100%; padding: 12px 14px; font-size: .875rem; border: 1px solid #cbd5e1; border-radius: 12px; background: #fff; font-family: inherit; box-sizing: border-box; }
.bcg-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bcg-textarea-wrap { position: relative; }
.bcg-textarea-wrap textarea { width: 100%; padding: 14px; font-size: .875rem; border: 1px solid #cbd5e1; border-radius: 12px; resize: vertical; min-height: 100px; font-family: ui-monospace, monospace; box-sizing: border-box; }
.bcg-textarea-wrap textarea:focus { outline: none; border-color: var(--bcg-accent); box-shadow: 0 0 0 3px rgba(255,77,141,.12); }
.bcg-char-count { position: absolute; bottom: 10px; right: 12px; font-size: .6875rem; color: #94a3b8; font-variant-numeric: tabular-nums; }

.bcg-check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.bcg-check { display: flex; align-items: flex-start; gap: 10px; font-size: .8125rem; cursor: pointer; }
.bcg-check input { width: 18px; height: 18px; accent-color: var(--bcg-accent); flex-shrink: 0; margin-top: 2px; }

.bcg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; font-size: .8125rem; font-weight: 700; border-radius: 10px; border: none; cursor: pointer; font-family: inherit; }
.bcg-btn i { width: 16px; height: 16px; }
.bcg-btn--primary { color: #fff; background: linear-gradient(135deg, #ff4d8d 0%, #e11d48 100%); }
.bcg-btn--primary:hover { opacity: .92; }
.bcg-card .bcg-btn--primary { width: 100%; margin-top: 8px; padding: 14px 20px; font-size: .9375rem; }
.bcg-btn--outline { color: var(--bcg-accent); background: #fff; border: 1px solid var(--bcg-accent-border); }
.bcg-btn--outline:hover { background: var(--bcg-accent-light); }
.bcg-btn--sm { padding: 8px 12px; font-size: .75rem; }

.bcg-preview-card { position: sticky; top: 88px; }
.bcg-preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.bcg-preview-head h2 { margin: 0; font-size: 1.0625rem; font-weight: 700; }
.bcg-preview-head p { margin: 4px 0 0; font-size: .75rem; color: #94a3b8; }
.bcg-preview-box { min-height: 200px; padding: 24px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 16px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.bcg-preview-empty { text-align: center; color: #94a3b8; }
.bcg-preview-empty i { width: 48px; height: 48px; margin-bottom: 8px; opacity: .4; }
.bcg-preview-empty p { margin: 0; font-size: .875rem; }
.bcg-preview-output { width: 100%; text-align: center; }
.bcg-preview-output svg, .bcg-preview-output canvas { max-width: 100%; height: auto; }

.bcg-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; padding: 12px; background: var(--bcg-accent-light); border: 1px solid var(--bcg-accent-border); border-radius: 12px; }
.bcg-meta span small { display: block; font-size: .625rem; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .04em; }
.bcg-meta span strong { display: block; font-size: .8125rem; color: var(--heading); word-break: break-all; }
.bcg-meta span:first-child strong { color: var(--bcg-accent-dark); }

.bcg-actions-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

.bcg-about { padding: 48px 0; background: #f8fafc; }
.bcg-about__grid { display: grid; grid-template-columns: 1fr 280px; gap: 32px; align-items: center; }
.bcg-about h2 { margin: 0 0 12px; font-size: 1.25rem; font-weight: 800; }
.bcg-about__lead { margin: 0 0 12px; font-size: .9375rem; line-height: 1.7; }
.bcg-about-points { margin: 0; padding: 0; list-style: none; }
.bcg-about-points li { display: flex; gap: 8px; padding: 6px 0; font-size: .8125rem; color: #475569; }
.bcg-about-points i { width: 16px; height: 16px; color: #059669; flex-shrink: 0; }
.bcg-about__package { padding: 32px; background: #fff; border: 1px solid var(--border); border-radius: 20px; text-align: center; box-shadow: 0 8px 24px rgba(15,23,42,.06); }
.bcg-about__package > i { width: 48px; height: 48px; color: #d97706; }
.bcg-about__mini-bar { height: 32px; margin-top: 16px; background: repeating-linear-gradient(90deg, #0f172a 0 3px, transparent 3px 6px); border-radius: 4px; }

.bcg-use { padding: 48px 0; }
.bcg-use-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bcg-use-card { padding: 20px; background: #fff; border: 1px solid var(--border); border-radius: 16px; text-align: center; }
.bcg-use-card__icon { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: 50%; margin-bottom: 10px; }
.bcg-use-card__icon i { width: 22px; height: 22px; }
.bcg-use-card__icon--pink { background: #ffe4ef; color: #ff4d8d; }
.bcg-use-card__icon--blue { background: #dbeafe; color: #2563eb; }
.bcg-use-card__icon--green { background: #d1fae5; color: #059669; }
.bcg-use-card__icon--orange { background: #ffedd5; color: #ea580c; }
.bcg-use-card__icon--purple { background: #ede9fe; color: #7c3aed; }
.bcg-use-card__icon--teal { background: #ccfbf1; color: #0d9488; }
.bcg-use-card strong { display: block; font-size: .8125rem; margin-bottom: 4px; }
.bcg-use-card p { margin: 0; font-size: .75rem; color: #64748b; line-height: 1.5; }

.bcg-all-modes { padding: 48px 0; }
.bcg-mode-grid--compact .bcg-mode-btn { padding: 14px 8px 10px; }
.bcg-info { padding: 48px 0; }
.bcg-info__grid { display: grid; grid-template-columns: 1fr 320px; gap: 28px; }
.bcg-about-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 20px; }
.bcg-about-feature { display: flex; gap: 12px; padding: 14px; background: #fff; border: 1px solid var(--border); border-radius: 14px; }
.bcg-about-feature__icon { display: flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 10px; flex-shrink: 0; }
.bcg-about-feature__icon i { width: 18px; height: 18px; }
.bcg-about-feature__icon--pink { background: #ffe4ef; color: #ff4d8d; }
.bcg-about-feature__icon--blue { background: #dbeafe; color: #2563eb; }
.bcg-about-feature__icon--green { background: #d1fae5; color: #059669; }
.bcg-about-feature__icon--orange { background: #ffedd5; color: #ea580c; }
.bcg-about-feature__icon--purple { background: #ede9fe; color: #7c3aed; }
.bcg-about-feature__icon--cyan { background: #cffafe; color: #0891b2; }
.bcg-about-feature strong { display: block; font-size: .8125rem; }
.bcg-about-feature p { margin: 0; font-size: .75rem; color: #64748b; }

.bcg-side-card { padding: 20px; background: #fff; border: 1px solid var(--border); border-radius: 16px; }
.bcg-side-card__title { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: .9375rem; font-weight: 700; }
.bcg-side-card__title i { width: 18px; height: 18px; color: var(--bcg-accent); }
.bcg-side-card--tips { margin-top: 20px; background: linear-gradient(180deg, #fff0f6 0%, #fff 100%); border-color: var(--bcg-accent-border); }
.bcg-tips-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.bcg-tips-head__icon { display: flex; width: 36px; height: 36px; align-items: center; justify-content: center; background: var(--bcg-accent-light); border-radius: 10px; color: var(--bcg-accent); }
.bcg-tips-list { margin: 0; padding: 0; list-style: none; }
.bcg-tips-list li { display: flex; gap: 10px; padding: 8px 0; font-size: .8125rem; color: #475569; border-bottom: 1px solid rgba(0,0,0,.05); }
.bcg-tips-list__check { display: flex; width: 20px; height: 20px; align-items: center; justify-content: center; background: #d1fae5; border-radius: 50%; color: #059669; flex-shrink: 0; }
.bcg-tips-list__check i { width: 12px; height: 12px; }
.bcg-tools-list { margin: 0; padding: 0; list-style: none; }
.bcg-tools-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--heading); font-size: .8125rem; font-weight: 600; }
.bcg-tools-link.is-current { background: var(--bcg-accent-light); color: var(--bcg-accent-dark); }
.bcg-tools-link__icon { display: flex; width: 32px; height: 32px; align-items: center; justify-content: center; background: #f1f5f9; border-radius: 8px; }
.bcg-view-all { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: .8125rem; font-weight: 700; color: var(--bcg-accent); text-decoration: none; }

.bcg-steps-section { padding: 48px 0; background: linear-gradient(180deg, #fff0f6 0%, #fff 100%); }
.bcg-steps-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.bcg-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.bcg-step { display: flex; gap: 14px; padding: 16px; background: #fff; border: 1px solid var(--border); border-radius: 14px; }
.bcg-step__num { display: flex; width: 36px; height: 36px; align-items: center; justify-content: center; background: var(--bcg-accent); color: #fff; border-radius: 50%; font-weight: 800; flex-shrink: 0; }
.bcg-step strong { display: block; margin-bottom: 4px; font-size: .875rem; }
.bcg-step p { margin: 0; font-size: .8125rem; color: #64748b; }

.bcg-toast { position: fixed; bottom: 24px; right: 24px; padding: 12px 20px; background: #1e293b; color: #fff; border-radius: 10px; font-size: .8125rem; font-weight: 600; opacity: 0; transform: translateY(12px); transition: opacity .25s, transform .25s; pointer-events: none; z-index: 9999; }
.bcg-toast.is-visible { opacity: 1; transform: translateY(0); }
.bcg-animate-in { animation: bcg-fade-up .5s ease both; }
.bcg-animate-in--delay { animation-delay: .08s; }
@keyframes bcg-fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.bcg-hero__demo { position: relative; width: 100%; max-width: 380px; height: 260px; margin: 0 auto; }
.bcg-hero__window { position: absolute; top: 30px; left: 50%; transform: translateX(-50%); width: 220px; padding: 20px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 32px rgba(15,23,42,.1); text-align: center; z-index: 2; }
.bcg-hero__bars { display: flex; justify-content: center; gap: 3px; height: 48px; align-items: flex-end; margin-bottom: 8px; }
.bcg-hero__bars span { display: block; width: 4px; background: #0f172a; border-radius: 1px; }
.bcg-hero__bars span:nth-child(odd) { height: 100%; }
.bcg-hero__bars span:nth-child(even) { height: 70%; }
.bcg-hero__window small { font-size: .625rem; color: #64748b; font-family: monospace; }
.bcg-hero__scanner { position: absolute; bottom: 50px; left: 24px; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; background: #fee2e2; color: #dc2626; border-radius: 14px; animation: bcg-float 4s ease-in-out infinite; }
.bcg-hero__scanner i { width: 26px; height: 26px; }
.bcg-hero__box { position: absolute; bottom: 36px; right: 30px; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--border); border-radius: 12px; color: #d97706; box-shadow: 0 8px 20px rgba(15,23,42,.08); }
.bcg-hero__box i { width: 28px; height: 28px; }
@keyframes bcg-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

@media (max-width: 1100px) {
    .bcg-hero__grid, .bcg-workspace, .bcg-about__grid, .bcg-info__grid, .bcg-steps-layout { grid-template-columns: 1fr; }
    .bcg-hero__visual { display: none; }
    .bcg-mode-grid, .bcg-mode-grid--compact { grid-template-columns: repeat(3, 1fr); }
    .bcg-preview-card { position: static; }
    .bcg-use-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .bcg-mode-grid, .bcg-mode-grid--compact { grid-template-columns: repeat(2, 1fr); }
    .bcg-field-row, .bcg-check-grid, .bcg-actions-row, .bcg-about-features, .bcg-use-grid { grid-template-columns: 1fr; }
}

[data-theme="dark"] .bcg-card, [data-theme="dark"] .bcg-mode-btn, [data-theme="dark"] .bcg-step, [data-theme="dark"] .bcg-side-card, [data-theme="dark"] .bcg-about-feature, [data-theme="dark"] .bcg-use-card, [data-theme="dark"] .bcg-about__package, [data-theme="dark"] .bcg-toggle { background: var(--bg-section); border-color: var(--border); }
[data-theme="dark"] .bcg-mode-btn.is-active { background: linear-gradient(180deg, rgba(255,77,141,.12) 0%, var(--bg-section) 100%); }
[data-theme="dark"] .bcg-field select, [data-theme="dark"] .bcg-textarea-wrap textarea { background: #0f172a; border-color: var(--border); color: var(--text); }
[data-theme="dark"] .bcg-mode-desc { background: rgba(255,77,141,.1); border-color: rgba(253,164,175,.3); color: #fda4af; }
[data-theme="dark"] .bcg-preview-box { background: #0f172a; border-color: var(--border); }
[data-theme="dark"] .bcg-meta { background: rgba(255,77,141,.08); border-color: rgba(253,164,175,.25); }
[data-theme="dark"] .bcg-btn--outline { background: #1a2332; border-color: rgba(253,164,175,.3); color: #fda4af; }
[data-theme="dark"] .bcg-about, [data-theme="dark"] .bcg-steps-section { background: rgba(255,77,141,.04); }
[data-theme="dark"] .bcg-tools-link.is-current { background: rgba(255,77,141,.12); color: #fda4af; }
[data-theme="dark"] .bcg-side-card--tips { background: linear-gradient(180deg, rgba(255,77,141,.08) 0%, var(--bg-section) 100%); }
[data-theme="dark"] .bcg-hero__window { background: var(--bg-section); }
[data-theme="dark"] .bcg-section-head p { color: #94a3b8; }
[data-theme="dark"] .bcg-mode-btn { background: var(--bg-section); }
[data-theme="dark"] .bcg-card { box-shadow: 0 4px 24px rgba(0,0,0,.25); }
[data-theme="dark"] #bcg-render-target { background: #fff; border-radius: 12px; padding: 12px; }
