/* ============================================
   Password Generator — Custom UI
   ============================================ */

/* Title */
.pg-title {
    font-size: 5.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3356A4, #99caff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
}

.pg-subtitle {
    color: #64748b;
    font-size: 1.8rem;
    letter-spacing: 0.3px;
}

/* col-4 description card */
.pg-description {
    color: #94a3b8;
    line-height: 1.9;
    font-size: 0.88rem;
    padding: 24px 20px;
    background: rgba(13, 17, 23, 0.5);
    border: 1px solid rgba(51, 86, 164, 0.2);
    border-left: 3px solid #3356A4;
    border-radius: 10px;
}

/* ============================================
   Row 1 — Type selector buttons
   ============================================ */
.pg-type-btn {
    background: transparent;
    border: 1px solid rgba(51, 86, 164, 0.35);
    color: #64748b;
    padding: 9px 26px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.22s ease;
}

.pg-type-btn:hover {
    border-color: #3356A4;
    color: #99caff;
    background: rgba(51, 86, 164, 0.08);
}

.pg-type-btn.active {
    background: linear-gradient(135deg, #3356A4, #1a3a7a);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 16px rgba(51, 86, 164, 0.4);
}

/* ============================================
   Row 2 — Length slider
   ============================================ */
.pg-label {
    color: #64748b;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
}

.pg-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    background: linear-gradient(to right, #3356A4 12%, rgba(30, 41, 59, 0.6) 12%);
    transition: background 0s;
}

.pg-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #3356A4;
    cursor: pointer;
    box-shadow: 0 0 0 3px rgba(51, 86, 164, 0.2), 0 2px 6px rgba(0,0,0,0.5);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pg-slider::-webkit-slider-thumb:hover {
    transform: scale(1.25);
    box-shadow: 0 0 0 6px rgba(51, 86, 164, 0.2);
}

.pg-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #3356A4;
    cursor: pointer;
    box-shadow: 0 0 0 3px rgba(51, 86, 164, 0.2);
}

.pg-number-input {
    background: rgba(13, 17, 23, 0.6) !important;
    border: 1px solid rgba(51, 86, 164, 0.3) !important;
    border-radius: 8px !important;
    color: #99caff !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-align: center;
    padding: 8px !important;
    outline: none;
    transition: all 0.2s ease;
    width: 100%;
}

.pg-number-input:focus {
    border-color: #3356A4 !important;
    box-shadow: 0 0 0 3px rgba(51, 86, 164, 0.15) !important;
}

.pg-number-input::-webkit-outer-spin-button,
.pg-number-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.pg-number-input[type=number] {
    -moz-appearance: textfield;
}

/* ============================================
   Row 3 — Character option pills
   ============================================ */
.pg-char-label {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
}

.pg-checkbox-pill {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 50px;
    border: 1px solid rgba(51, 86, 164, 0.25);
    background: rgba(13, 17, 23, 0.4);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.pg-checkbox-pill:hover {
    border-color: rgba(51, 86, 164, 0.6);
    background: rgba(51, 86, 164, 0.08);
}

.pg-checkbox-pill input[type="checkbox"] {
    accent-color: #3356A4;
    width: 14px;
    height: 14px;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}

.pg-checkbox-pill label {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin: 0;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* PIN mode: only numbers apply, so the rest are locked and greyed out */
.pg-checkbox-pill.pg-pill-disabled {
    opacity: 0.4;
}

.pg-checkbox-pill.pg-pill-disabled:hover {
    border-color: rgba(51, 86, 164, 0.25);
    background: rgba(13, 17, 23, 0.4);
}

.pg-checkbox-pill.pg-pill-disabled,
.pg-checkbox-pill.pg-pill-disabled label,
.pg-checkbox-pill.pg-pill-disabled input[type="checkbox"] {
    cursor: not-allowed;
}

/* Colored dot badge */
.pg-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(0,0,0,0.5);
    flex-shrink: 0;
}

/* ============================================
   Row 4 — Password output
   ============================================ */
.pg-output-label {
    display: block;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 8px;
}

.pg-password-display {
    background: rgba(13, 17, 23, 0.7);
    border: 1px solid rgba(51, 86, 164, 0.3);
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 2px;
    padding: 16px 20px;
    box-sizing: border-box;
    /* Fixed (not min-) height, sized for the worst case (100 chars wrapping
       onto multiple lines on narrow widths) so longer passwords never push
       the rest of the page down. Overflow is a safety net, not expected to
       trigger. */
    height: 112px;
    overflow-y: auto;
    display: flex;
    align-items: center;
    align-content: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.3);
    transition: border-color 0.25s ease;
    user-select: all;
}

/* individual character spans */
.pg-char {
    display: inline;
    transition: color 0.08s ease;
}

.pg-char.scrambling {
    color: #1e2d40;
}

.pg-placeholder {
    color: #2d3a4f;
    font-style: italic;
    letter-spacing: 0;
    font-weight: 400;
    font-size: 13px;
}

/* Strength indicator */
.pg-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.pg-strength-bar {
    flex: 1;
    height: 4px;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 2px;
    overflow: hidden;
}

.pg-strength-fill {
    height: 100%;
    border-radius: 2px;
    width: 0;
    transition: width 0.45s ease, background-color 0.45s ease;
}

.pg-strength-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    min-width: 72px;
    text-align: right;
    transition: color 0.3s ease;
}

/* ============================================
   Row 5 — Action buttons
   ============================================ */
.pg-btn-copy {
    padding: 11px 34px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #3356A4, #99caff);
    color: #0e0c15;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.22s ease;
    box-shadow: 0 4px 16px rgba(51, 86, 164, 0.35);
}

.pg-btn-copy:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(51, 86, 164, 0.5);
    filter: brightness(1.1);
}

.pg-btn-copy:active {
    transform: translateY(0);
}

.pg-btn-refresh {
    padding: 11px 34px;
    border-radius: 50px;
    background: transparent;
    border: 1px solid rgba(51, 86, 164, 0.45);
    color: #99caff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.22s ease;
}

.pg-btn-refresh:hover {
    border-color: #99caff;
    background: rgba(51, 86, 164, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(51, 86, 164, 0.2);
}

.pg-btn-refresh:active {
    transform: translateY(0);
}

/* ============================================
   Fortress visual wrapper
   ============================================ */
.pg-castle-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 380px;
}

/* ============================================
   SEO Sections
   ============================================ */
.pg-seo-section {
    border-top: 1px solid rgba(51, 86, 164, 0.15);
    padding-top: 60px;
}

.pg-seo-title {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3356A4, #99caff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    letter-spacing: -0.3px;
}

.pg-seo-text {
    color: #94a3b8;
    line-height: 1.85;
    font-size: 1,2rem;
    margin-bottom: 14px;
}

.pg-seo-text strong {
    color: #cbd5e1;
    font-weight: 600;
}

.pg-seo-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
}

.pg-seo-list li {
    color: #94a3b8;
    font-size: 1,2rem;
    padding: 6px 0 6px 22px;
    position: relative;
    border-bottom: 1px solid rgba(51, 86, 164, 0.08);
}

.pg-seo-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3356A4, #99caff);
}

.pg-seo-img {
    max-height: 320px;
    opacity: 0.9;
    filter: drop-shadow(0 0 40px rgba(51, 86, 164, 0.18));
}

/* ============================================
   FAQ Accordion
   ============================================ */
.pg-faq-section {
    border-top: 1px solid rgba(51, 86, 164, 0.15);
    padding-top: 60px;
}

.pg-accordion .pg-accordion-item {
    background: rgba(13, 17, 23, 0.5);
    border: 1px solid rgba(51, 86, 164, 0.18);
    border-radius: 10px !important;
    margin-bottom: 10px;
    overflow: hidden;
}

.pg-accordion .pg-accordion-item + .pg-accordion-item {
    border-top: 1px solid rgba(51, 86, 164, 0.18);
}

.pg-accordion-btn {
    background: transparent !important;
    color: #cbd5e1 !important;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 18px 22px;
    box-shadow: none !important;
    border: none;
    width: 100%;
    text-align: left;
    transition: color 0.2s ease;
}

.pg-accordion-btn:not(.collapsed) {
    color: #99caff !important;
    background: rgba(51, 86, 164, 0.08) !important;
}

.pg-accordion-btn::after {
    filter: invert(1) brightness(0.6);
}

.pg-accordion-btn:not(.collapsed)::after {
    filter: invert(0.6) sepia(1) saturate(3) hue-rotate(190deg);
}

.pg-accordion-collapse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.pg-accordion-body {
    background: rgba(13, 17, 23, 0.3);
    color: #94a3b8;
    font-size: 1,1rem;
    line-height: 1.8;
    padding: 16px 22px 20px;
    border-top: 1px solid rgba(51, 86, 164, 0.1);
}

.pg-accordion-body strong {
    color: #cbd5e1;
    font-weight: 600;
}
