/* ================================================================
   USERNAME-GENERATOR.CSS  —  Premium Username Generator
   ================================================================ */

/* ══════════════════════════════════════════════════════════════════
   INPUT CARD
══════════════════════════════════════════════════════════════════ */
.ug-card {
    max-width: 600px;
}

/* ── Base name input ─────────────────────────────────────────── */
.ug-field-group {
    margin-bottom: 1.4rem;
}

.ug-field-label {
    display: block;
    font-size: .88rem;
    font-weight: 600;
    color: var(--text-soft);
    margin-bottom: .5rem;
}

.ug-text-input {
    width: 100%;
    padding: .88rem 1.1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    box-sizing: border-box;
}

.ug-text-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.ug-text-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3.5px rgba(79, 70, 229, .13);
}

/* ── Two-column sub-grid (length + style) ────────────────────── */
.ug-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-bottom: 1.4rem;
}

/* ── Length slider ───────────────────────────────────────────── */
.ug-length-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .6rem;
}

.ug-length-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.4rem;
    padding: .2rem .62rem;
    font-size: .88rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    border: 1.5px solid rgba(79, 70, 229, .2);
    border-radius: 50px;
    line-height: 1.4;
}

.ug-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 50px;
    background: linear-gradient(to right, #4f46e5 var(--fill, 48%), var(--border) var(--fill, 48%));
    outline: none;
    cursor: pointer;
    transition: background var(--transition);
}

.ug-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    box-shadow: 0 2px 8px rgba(79, 70, 229, .4);
    cursor: grab;
    transition: transform var(--transition), box-shadow var(--transition);
}

.ug-slider::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.15);
    box-shadow: 0 4px 14px rgba(79, 70, 229, .55);
}

.ug-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    box-shadow: 0 2px 8px rgba(79, 70, 229, .4);
    cursor: grab;
}

.ug-slider-ticks {
    display: flex;
    justify-content: space-between;
    margin-top: .38rem;
    padding: 0 1px;
}

.ug-slider-tick {
    font-size: .71rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ── Style select ────────────────────────────────────────────── */
.ug-select {
    width: 100%;
    padding: .82rem 2.4rem .82rem 1rem;
    font-size: .94rem;
    font-family: inherit;
    font-weight: 500;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right .9rem center;
    color: var(--text);
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition);
    box-sizing: border-box;
}

.ug-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3.5px rgba(79, 70, 229, .13);
}

/* ── Divider ─────────────────────────────────────────────────── */
.ug-divider {
    height: 1px;
    background: var(--border);
    margin: 1.3rem 0;
    opacity: .6;
}

/* ── Options section label ───────────────────────────────────── */
.ug-section-title {
    font-size: .82rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

/* ── Checkbox options grid ───────────────────────────────────── */
.ug-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem 1.1rem;
    margin-bottom: 1.5rem;
}

.ug-checkbox-label {
    display: flex;
    align-items: center;
    gap: .52rem;
    font-size: .9rem;
    color: var(--text);
    cursor: pointer;
    user-select: none;
    padding: .5rem .72rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.ug-checkbox-label:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.ug-checkbox-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.ug-checkbox-label.checked {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

/* ── Button row ──────────────────────────────────────────────── */
.ug-btn-row {
    display: flex;
    gap: .75rem;
}

.btn-ug-generate {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .92rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 14px rgba(79, 70, 229, .35);
    line-height: 1;
}

.btn-ug-generate:hover:not(:disabled) {
    opacity: .92;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, .45);
}

.btn-ug-generate:active:not(:disabled) { transform: translateY(0); }

.btn-ug-generate:disabled {
    opacity: .42;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-ug-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .42rem;
    padding: .92rem 1.15rem;
    font-size: .92rem;
    font-weight: 600;
    color: var(--text-soft);
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    line-height: 1;
}

.btn-ug-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-1px);
}

/* ══════════════════════════════════════════════════════════════════
   RESULT CARD
══════════════════════════════════════════════════════════════════ */
.ug-result-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    max-width: 600px;
    margin: 1.6rem auto 0;
    animation: ugFadeUp .32s ease;
}

@keyframes ugFadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ug-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.3rem;
    flex-wrap: wrap;
    gap: .6rem;
}

.ug-result-title {
    font-size: .88rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: .06em;
    text-transform: uppercase;
}

.ug-result-meta {
    font-size: .8rem;
    color: var(--text-muted);
}

/* ── Username pills ──────────────────────────────────────────── */
.ug-pills-grid {
    display: flex;
    flex-direction: column;
    gap: .7rem;
    margin-bottom: 1.4rem;
}

.ug-pill-row {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    cursor: pointer;
    transition: all var(--transition);
    animation: ugPillIn .28s cubic-bezier(.34, 1.56, .64, 1) both;
    position: relative;
    overflow: hidden;
}

/* stagger */
.ug-pill-row:nth-child(1) { animation-delay: .02s; }
.ug-pill-row:nth-child(2) { animation-delay: .06s; }
.ug-pill-row:nth-child(3) { animation-delay: .10s; }
.ug-pill-row:nth-child(4) { animation-delay: .14s; }
.ug-pill-row:nth-child(5) { animation-delay: .18s; }
.ug-pill-row:nth-child(6) { animation-delay: .22s; }
.ug-pill-row:nth-child(7) { animation-delay: .26s; }
.ug-pill-row:nth-child(8) { animation-delay: .30s; }

@keyframes ugPillIn {
    from { opacity: 0; transform: translateX(-12px); }
    to   { opacity: 1; transform: translateX(0); }
}

.ug-pill-row:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateX(3px);
    box-shadow: 0 3px 12px rgba(79, 70, 229, .12);
}

.ug-pill-row.copied {
    border-color: #10b981;
    background: #f0fdf4;
}

.ug-pill-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--border);
    font-size: .7rem;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: all var(--transition);
}

.ug-pill-row:hover .ug-pill-index {
    background: var(--primary);
    color: #fff;
}

.ug-pill-row.copied .ug-pill-index {
    background: #10b981;
    color: #fff;
}

.ug-pill-text {
    flex: 1;
    font-size: .98rem;
    font-weight: 600;
    color: var(--text);
    font-family: 'Cascadia Code', 'Fira Code', 'Courier New', monospace;
    letter-spacing: .02em;
    transition: color var(--transition);
}

.ug-pill-row:hover .ug-pill-text  { color: var(--primary); }
.ug-pill-row.copied .ug-pill-text { color: #16a34a; }

.ug-pill-actions {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-shrink: 0;
}

.btn-ug-pill-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    background: var(--card-bg);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    opacity: 0;
}

.ug-pill-row:hover .btn-ug-pill-copy {
    opacity: 1;
    border-color: var(--primary);
    color: var(--primary);
    background: #fff;
}

.btn-ug-fav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    font-size: .95rem;
    opacity: 0;
}

.ug-pill-row:hover .btn-ug-fav {
    opacity: 1;
}

.btn-ug-fav.active {
    opacity: 1;
    color: #f59e0b;
}

.ug-copy-hint {
    font-size: .75rem;
    color: var(--text-muted);
    margin-left: auto;
    opacity: 0;
    transition: opacity var(--transition);
    white-space: nowrap;
    pointer-events: none;
}

/* ── Result action row ───────────────────────────────────────── */
.ug-result-actions {
    display: flex;
    gap: .65rem;
    flex-wrap: wrap;
    padding-top: 1.1rem;
    border-top: 1px solid var(--border);
}

.btn-ug-action {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    padding: .55rem 1.05rem;
    font-size: .87rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    line-height: 1;
    border: 1.5px solid var(--border);
    background: transparent;
    color: var(--text-soft);
}

.btn-ug-action:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-1px);
}

.btn-ug-action.primary {
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(79, 70, 229, .3);
}

.btn-ug-action.primary:hover {
    opacity: .9;
    color: #fff;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    box-shadow: 0 5px 16px rgba(79, 70, 229, .4);
    transform: translateY(-1px);
}

/* ══════════════════════════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════════════════════════ */
.ug-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1e1b4b;
    color: #fff;
    font-size: .9rem;
    font-weight: 600;
    padding: .75rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
    opacity: 0;
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: none;
    z-index: 9999;
    white-space: nowrap;
}

.ug-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ══════════════════════════════════════════════════════════════════
   SEO SECTION
══════════════════════════════════════════════════════════════════ */
.tool-seo-section {
    max-width: 720px;
    margin: 3.5rem auto 0;
    padding: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.tool-seo-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: .7rem;
    margin-top: 1.4rem;
}

.tool-seo-section h2:first-child { margin-top: 0; }

.tool-seo-section p,
.tool-seo-section ul {
    font-size: .96rem;
    color: var(--text-soft);
    line-height: 1.75;
    margin-bottom: .6rem;
}

.tool-seo-section ul { padding-left: 1.3rem; }
.tool-seo-section li { margin-bottom: .35rem; }

/* ══════════════════════════════════════════════════════════════════
   ALSO LIKE
══════════════════════════════════════════════════════════════════ */
.also-like-section {
    max-width: 600px;
    margin: 2.5rem auto 0;
    text-align: center;
}

.also-like-section h3 {
    font-size: .88rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.also-like-grid {
    display: flex;
    gap: .8rem;
    justify-content: center;
    flex-wrap: wrap;
}

.also-like-card {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1.2rem;
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-soft);
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: 50px;
    text-decoration: none;
    transition: all var(--transition);
}

.also-like-card:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, .15);
}

.also-like-card-icon { font-size: 1rem; }

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════════ */
@media (max-width: 540px) {
    .ug-two-col {
        grid-template-columns: 1fr;
    }

    .ug-options-grid {
        grid-template-columns: 1fr;
    }

    .ug-btn-row {
        flex-direction: column;
    }

    .ug-result-actions {
        justify-content: center;
    }

    .ug-result-card,
    .tool-seo-section {
        padding: 1.4rem 1.2rem;
    }

    .ug-pill-text {
        font-size: .88rem;
    }
}
