/* Utilix — Password Generator (pwdg-) */
:root {
    --pwdg-accent: #ff4d8d;
    --pwdg-accent-light: #ffe4ef;
    --pwdg-accent-dark: #db2777;
    --pwdg-accent-border: #f9a8d4;
}

.pwdg-hero { padding-bottom: 40px; }
.pwdg-hero__grid { display: grid; grid-template-columns: 1fr 400px; gap: 40px; align-items: center; }
.pwdg-hero__main { display: flex; gap: 20px; align-items: flex-start; }
.pwdg-hero__visual { display: flex; align-items: center; justify-content: center; min-height: 260px; }

.pwdg-main { padding: 0 0 48px; }
.pwdg-section-head { margin-bottom: 24px; }
.pwdg-section-head h2 { margin: 0 0 8px; font-size: 1.25rem; font-weight: 800; color: var(--heading); }
.pwdg-section-head p { margin: 0; font-size: .875rem; color: #64748b; }
.pwdg-section-head--center { text-align: center; }
.pwdg-section-head--center p { margin: 0 auto; max-width: 560px; }
.pwdg-section-eyebrow { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: .75rem; font-weight: 700; color: var(--pwdg-accent); background: var(--pwdg-accent-light); border-radius: 999px; margin-bottom: 12px; }
.pwdg-section-eyebrow i { width: 14px; height: 14px; }

.pwdg-mode-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 32px; }
.pwdg-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; }
.pwdg-mode-btn__num { position: absolute; top: 8px; left: 10px; font-size: .5625rem; font-weight: 800; color: #94a3b8; }
.pwdg-mode-btn:hover { border-color: var(--pwdg-accent-border); box-shadow: 0 6px 20px rgba(255,77,141,.12); transform: translateY(-2px); }
.pwdg-mode-btn.is-active { border-color: var(--pwdg-accent); background: linear-gradient(180deg, #fff0f6 0%, #fff 100%); box-shadow: 0 4px 20px rgba(255,77,141,.15); }
.pwdg-mode-btn__icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; margin-top: 4px; }
.pwdg-mode-btn__icon i { width: 22px; height: 22px; }
.pwdg-mode-btn strong { font-size: .6875rem; font-weight: 700; color: var(--heading); line-height: 1.3; }
.pwdg-mode-btn span:last-child { font-size: .5625rem; color: #94a3b8; line-height: 1.35; }
.pwdg-mode-btn--pink .pwdg-mode-btn__icon { background: #ffe4ef; color: #ff4d8d; }
.pwdg-mode-btn--blue .pwdg-mode-btn__icon { background: #dbeafe; color: #2563eb; }
.pwdg-mode-btn--purple .pwdg-mode-btn__icon { background: #ede9fe; color: #7c3aed; }
.pwdg-mode-btn--orange .pwdg-mode-btn__icon { background: #ffedd5; color: #ea580c; }
.pwdg-mode-btn--red .pwdg-mode-btn__icon { background: #fee2e2; color: #dc2626; }
.pwdg-mode-btn--yellow .pwdg-mode-btn__icon { background: #fef9c3; color: #ca8a04; }
.pwdg-mode-btn--cyan .pwdg-mode-btn__icon { background: #cffafe; color: #0891b2; }
.pwdg-mode-btn--green .pwdg-mode-btn__icon { background: #d1fae5; color: #059669; }
.pwdg-mode-btn--teal .pwdg-mode-btn__icon { background: #ccfbf1; color: #0d9488; }
.pwdg-mode-btn--indigo .pwdg-mode-btn__icon { background: #e0e7ff; color: #4f46e5; }

.pwdg-workspace { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.pwdg-card { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 24px; box-shadow: 0 4px 24px rgba(15,23,42,.05); }
.pwdg-card__head h2 { margin: 0; font-size: 1.0625rem; font-weight: 700; color: var(--heading); }
.pwdg-card__head p { margin: 4px 0 0; font-size: .75rem; color: #94a3b8; }
.pwdg-mode-badge { display: inline-block; margin-top: 8px; padding: 4px 10px; font-size: .6875rem; font-weight: 700; color: var(--pwdg-accent-dark); background: var(--pwdg-accent-light); border: 1px solid var(--pwdg-accent-border); border-radius: 999px; }
.pwdg-mode-desc { margin: 12px 0 16px; padding: 12px 14px; font-size: .8125rem; color: #be185d; background: var(--pwdg-accent-light); border: 1px solid var(--pwdg-accent-border); border-radius: 12px; }

.pwdg-field { margin-bottom: 14px; }
.pwdg-field label { display: block; margin-bottom: 6px; font-size: .8125rem; font-weight: 700; color: var(--heading); }
.pwdg-field small { display: block; margin-top: 4px; font-size: .6875rem; color: #94a3b8; }
.pwdg-field input[type="text"],
.pwdg-field input[type="number"],
.pwdg-field select { width: 100%; padding: 12px 14px; font-size: .875rem; color: var(--heading); background: #fff; border: 1px solid #cbd5e1; border-radius: 12px; font-family: inherit; box-sizing: border-box; }
.pwdg-field input:focus, .pwdg-field select:focus { outline: none; border-color: var(--pwdg-accent); box-shadow: 0 0 0 3px rgba(255,77,141,.12); }

.pwdg-slider-row { display: flex; align-items: center; gap: 14px; }
.pwdg-slider-row input[type="range"] { flex: 1; accent-color: var(--pwdg-accent); height: 6px; }
.pwdg-slider-value { min-width: 36px; padding: 6px 10px; font-size: .875rem; font-weight: 800; color: var(--pwdg-accent-dark); background: var(--pwdg-accent-light); border-radius: 8px; text-align: center; font-variant-numeric: tabular-nums; }

.pwdg-check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-bottom: 14px; }
.pwdg-check { display: flex; align-items: flex-start; gap: 10px; font-size: .8125rem; color: var(--heading); cursor: pointer; }
.pwdg-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--pwdg-accent); flex-shrink: 0; }

.pwdg-settings-panel[hidden] { display: none !important; }

.pwdg-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; transition: background .15s; font-family: inherit; }
.pwdg-btn i { width: 16px; height: 16px; }
.pwdg-btn--primary { width: 100%; margin-top: 8px; padding: 14px 20px; font-size: .9375rem; color: #fff; background: var(--pwdg-accent); }
.pwdg-btn--primary:hover { background: var(--pwdg-accent-dark); }
.pwdg-btn--outline { color: var(--pwdg-accent); background: #fff; border: 1px solid var(--pwdg-accent-border); }
.pwdg-btn--outline:hover { background: var(--pwdg-accent-light); }
.pwdg-btn--sm { padding: 8px 12px; font-size: .75rem; }
.pwdg-btn:disabled { opacity: .5; cursor: not-allowed; }

.pwdg-result-card { position: sticky; top: 88px; }
.pwdg-result-box { position: relative; padding: 20px 48px 20px 20px; margin-bottom: 16px; background: linear-gradient(180deg, #fff0f6 0%, #fff 100%); border: 1px solid var(--pwdg-accent-border); border-radius: 16px; min-height: 72px; display: flex; align-items: center; }
.pwdg-result-box__text { font-size: 1.125rem; font-weight: 700; font-family: ui-monospace, monospace; color: var(--heading); word-break: break-all; line-height: 1.5; width: 100%; }
.pwdg-result-box__text.is-empty { font-size: .875rem; font-weight: 500; color: #94a3b8; font-family: inherit; }
.pwdg-result-box__actions { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; }
.pwdg-icon-btn { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid var(--pwdg-accent-border); border-radius: 8px; background: #fff; color: var(--pwdg-accent); cursor: pointer; transition: background .15s; }
.pwdg-icon-btn:hover { background: var(--pwdg-accent-light); }
.pwdg-icon-btn.is-fav { color: #f59e0b; border-color: #fcd34d; background: #fffbeb; }
.pwdg-icon-btn i { width: 16px; height: 16px; }

.pwdg-actions-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }

.pwdg-strength { margin-bottom: 20px; }
.pwdg-strength__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pwdg-strength__head span { font-size: .75rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .04em; }
.pwdg-strength__head strong { font-size: .8125rem; font-weight: 800; }
.pwdg-strength__head strong.is-very-weak { color: #dc2626; }
.pwdg-strength__head strong.is-weak { color: #ea580c; }
.pwdg-strength__head strong.is-fair { color: #ca8a04; }
.pwdg-strength__head strong.is-good { color: #2563eb; }
.pwdg-strength__head strong.is-strong { color: #059669; }
.pwdg-strength__head strong.is-very-strong { color: #059669; }
.pwdg-strength__bar { display: flex; gap: 4px; height: 8px; }
.pwdg-strength__seg { flex: 1; border-radius: 4px; background: #e2e8f0; transition: background .3s; }
.pwdg-strength__seg.is-on { background: var(--pwdg-accent); }
.pwdg-strength__seg.is-on.is-good { background: #3b82f6; }
.pwdg-strength__seg.is-on.is-strong { background: #10b981; }

.pwdg-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.pwdg-metric { padding: 12px; text-align: center; background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; }
.pwdg-metric span { display: block; font-size: .625rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #94a3b8; margin-bottom: 4px; }
.pwdg-metric strong { font-size: .875rem; font-weight: 800; color: var(--heading); }

.pwdg-stats { padding: 14px; background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; }
.pwdg-stats__title { margin: 0 0 10px; font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #94a3b8; }
.pwdg-stats__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.pwdg-stat { text-align: center; }
.pwdg-stat span { display: block; font-size: 1rem; font-weight: 800; color: var(--heading); }
.pwdg-stat small { font-size: .5625rem; color: #94a3b8; text-transform: uppercase; }

.pwdg-tips-section { padding: 48px 0; background: #fff0f6; border-top: 1px solid var(--pwdg-accent-border); }
.pwdg-tips-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pwdg-tip-card { padding: 20px; background: #fff; border: 1px solid var(--border); border-radius: 16px; text-align: center; }
.pwdg-tip-card__icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 12px; background: var(--pwdg-accent-light); color: var(--pwdg-accent); }
.pwdg-tip-card__icon i { width: 22px; height: 22px; }
.pwdg-tip-card strong { display: block; margin-bottom: 6px; font-size: .8125rem; color: var(--heading); }
.pwdg-tip-card p { margin: 0; font-size: .75rem; color: #64748b; line-height: 1.45; }

.pwdg-all-modes { padding: 48px 0; background: #fff; border-top: 1px solid var(--border); }
.pwdg-mode-grid--compact .pwdg-mode-btn { padding: 14px 8px; }
.pwdg-mode-grid--compact .pwdg-mode-btn__num,
.pwdg-mode-grid--compact .pwdg-mode-btn span:last-child { display: none; }
.pwdg-mode-grid--compact { margin-bottom: 0; }

.pwdg-info { padding: 56px 0; background: var(--bg-section); }
.pwdg-info__grid { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; }
.pwdg-about-content h2 { margin: 0 0 16px; font-size: 1.5rem; font-weight: 800; }
.pwdg-about-content__lead { margin: 0 0 12px; font-size: .9375rem; line-height: 1.65; color: #475569; }
.pwdg-about-content__text { margin: 0 0 28px; font-size: .875rem; line-height: 1.65; color: #64748b; }
.pwdg-about-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 28px; }
.pwdg-about-feature { display: flex; gap: 12px; padding: 14px; background: #fff; border: 1px solid var(--border); border-radius: 14px; }
.pwdg-about-feature__icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; }
.pwdg-about-feature__icon i { width: 20px; height: 20px; }
.pwdg-about-feature__icon--pink { background: #ffe4ef; color: #ff4d8d; }
.pwdg-about-feature__icon--blue { background: #dbeafe; color: #2563eb; }
.pwdg-about-feature__icon--green { background: #d1fae5; color: #059669; }
.pwdg-about-feature__icon--orange { background: #ffedd5; color: #ea580c; }
.pwdg-about-feature__icon--purple { background: #ede9fe; color: #7c3aed; }
.pwdg-about-feature__icon--cyan { background: #cffafe; color: #0891b2; }
.pwdg-about-feature strong { display: block; font-size: .8125rem; }
.pwdg-about-feature p { margin: 4px 0 0; font-size: .75rem; color: #94a3b8; line-height: 1.45; }

.pwdg-side-card { padding: 22px; background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 4px 20px rgba(15,23,42,.04); }
.pwdg-side-card--tips { background: linear-gradient(180deg, #fff0f6 0%, #fff 100%); border-color: var(--pwdg-accent-border); }
.pwdg-side-card__title { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; font-size: .9375rem; font-weight: 700; }
.pwdg-side-card__title i { width: 18px; height: 18px; color: var(--pwdg-accent); }
.pwdg-tips-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.pwdg-tips-head__icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--pwdg-accent-light); color: var(--pwdg-accent-dark); }
.pwdg-tips-head__icon i { width: 18px; height: 18px; }
.pwdg-tips-head h3 { margin: 0; font-size: .9375rem; font-weight: 700; }
.pwdg-tips-list { margin: 0; padding: 0; list-style: none; }
.pwdg-tips-list li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; font-size: .8125rem; color: #64748b; line-height: 1.5; border-bottom: 1px solid #f1f5f9; }
.pwdg-tips-list li:last-child { border-bottom: none; }
.pwdg-tips-list__check { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: #d1fae5; color: #059669; flex-shrink: 0; margin-top: 2px; }
.pwdg-tips-list__check i { width: 12px; height: 12px; }
.pwdg-tools-list { margin: 0; padding: 0; list-style: none; }
.pwdg-tools-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: .8125rem; font-weight: 600; color: var(--heading); text-decoration: none; border-radius: 10px; }
.pwdg-tools-link:hover { background: #f8fafc; }
.pwdg-tools-link.is-current { background: var(--pwdg-accent-light); color: var(--pwdg-accent-dark); }
.pwdg-tools-link__icon { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; background: #f1f5f9; }
.pwdg-tools-link__icon i { width: 16px; height: 16px; }
.pwdg-view-all { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: .8125rem; font-weight: 700; color: var(--pwdg-accent); text-decoration: none; }

.pwdg-steps-section { padding: 56px 0; background: #fff0f6; }
.pwdg-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.pwdg-step { padding: 20px 16px; background: #fff; border: 1px solid var(--border); border-radius: 16px; text-align: center; }
.pwdg-step__num { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin: 0 auto 12px; font-size: .875rem; font-weight: 800; color: #fff; background: var(--pwdg-accent); border-radius: 50%; }
.pwdg-step strong { display: block; margin-bottom: 6px; font-size: .8125rem; }
.pwdg-step p { margin: 0; font-size: .75rem; color: #94a3b8; line-height: 1.45; }

.pwdg-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px); padding: 12px 20px; font-size: .8125rem; font-weight: 600; color: #fff; background: #1e293b; border-radius: 10px; opacity: 0; pointer-events: none; transition: transform .3s, opacity .3s; z-index: 9999; }
.pwdg-toast.is-visible { transform: translateX(-50%) translateY(0); opacity: 1; }

.pwdg-animate-in { animation: pwdg-fade-up .5s ease both; }
.pwdg-animate-in--delay { animation-delay: .08s; }
@keyframes pwdg-fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* Hero */
.pwdg-hero__demo { position: relative; width: 100%; max-width: 380px; height: 260px; margin: 0 auto; }
.pwdg-hero__shield { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 100px; height: 110px; z-index: 3; }
.pwdg-hero__shield-body { position: absolute; inset: 0; background: linear-gradient(180deg, #ff4d8d 0%, #db2777 100%); border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%; box-shadow: 0 12px 32px rgba(255,77,141,.35); display: flex; align-items: center; justify-content: center; }
.pwdg-hero__shield-body i { width: 40px; height: 40px; color: #fff; }
.pwdg-hero__key { position: absolute; bottom: 40px; left: 30px; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 8px 24px rgba(15,23,42,.1); color: #f59e0b; animation: pwdg-float 4s ease-in-out infinite; z-index: 4; }
.pwdg-hero__key i { width: 28px; height: 28px; }
.pwdg-hero__blocks { position: absolute; bottom: 36px; right: 24px; display: flex; gap: 6px; z-index: 2; }
.pwdg-hero__block { width: 28px; height: 28px; border-radius: 6px; animation: pwdg-float 4.5s ease-in-out .3s infinite; }
.pwdg-hero__block--1 { background: #dbeafe; }
.pwdg-hero__block--2 { background: #d1fae5; margin-top: 12px; animation-delay: .6s; }
.pwdg-hero__block--3 { background: #ede9fe; margin-top: 4px; animation-delay: .9s; }
@keyframes pwdg-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

@media (max-width: 1100px) {
    .pwdg-hero__grid { grid-template-columns: 1fr; }
    .pwdg-hero__visual { display: none; }
    .pwdg-mode-grid, .pwdg-mode-grid--compact { grid-template-columns: repeat(3, 1fr); }
    .pwdg-workspace { grid-template-columns: 1fr; }
    .pwdg-result-card { position: static; }
    .pwdg-tips-grid { grid-template-columns: repeat(2, 1fr); }
    .pwdg-info__grid { grid-template-columns: 1fr; }
    .pwdg-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .pwdg-mode-grid, .pwdg-mode-grid--compact { grid-template-columns: repeat(2, 1fr); }
    .pwdg-check-grid { grid-template-columns: 1fr; }
    .pwdg-metrics { grid-template-columns: 1fr; }
    .pwdg-stats__grid { grid-template-columns: repeat(3, 1fr); }
    .pwdg-actions-row { grid-template-columns: 1fr; }
    .pwdg-tips-grid { grid-template-columns: 1fr; }
    .pwdg-about-features { grid-template-columns: 1fr; }
    .pwdg-steps { grid-template-columns: 1fr; }
}

[data-theme="dark"] .pwdg-card,
[data-theme="dark"] .pwdg-mode-btn,
[data-theme="dark"] .pwdg-step,
[data-theme="dark"] .pwdg-side-card,
[data-theme="dark"] .pwdg-about-feature,
[data-theme="dark"] .pwdg-tip-card { background: var(--bg-section); border-color: var(--border); }
[data-theme="dark"] .pwdg-mode-btn.is-active { background: linear-gradient(180deg, rgba(255,77,141,.12) 0%, var(--bg-section) 100%); }
[data-theme="dark"] .pwdg-field input, [data-theme="dark"] .pwdg-field select { background: #0f172a; border-color: var(--border); color: var(--text); }
[data-theme="dark"] .pwdg-mode-desc { background: rgba(255,77,141,.1); border-color: rgba(249,168,212,.3); color: #f9a8d4; }
[data-theme="dark"] .pwdg-result-box { background: linear-gradient(180deg, rgba(255,77,141,.08) 0%, var(--bg-section) 100%); border-color: rgba(249,168,212,.25); }
[data-theme="dark"] .pwdg-metric, [data-theme="dark"] .pwdg-stats { background: #1a2332; }
[data-theme="dark"] .pwdg-btn--outline { background: #1a2332; border-color: rgba(249,168,212,.3); color: #f9a8d4; }
[data-theme="dark"] .pwdg-icon-btn { background: #1a2332; border-color: rgba(249,168,212,.3); }
[data-theme="dark"] .pwdg-tips-section, [data-theme="dark"] .pwdg-steps-section { background: rgba(255,77,141,.06); }
[data-theme="dark"] .pwdg-tools-link.is-current { background: rgba(255,77,141,.12); color: #f9a8d4; }
[data-theme="dark"] .pwdg-side-card--tips { background: linear-gradient(180deg, rgba(255,77,141,.08) 0%, var(--bg-section) 100%); }
[data-theme="dark"] .pwdg-hero__key { background: var(--bg-section); }
[data-theme="dark"] .pwdg-strength__seg { background: #334155; }
