/* Modern Dark Theme for CreatePasscode.com */

body {
    background-color: #0d1117;
    color: #c9d1d9;
    font-family: 'Open Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding-top: 40px;
}

.pgen-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 15px;
}

.pgen-form-container {
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    padding: 30px;
    margin-bottom: 30px;
}

.pgen-header {
    text-align: center;
    margin-bottom: 25px;
}

.pgen-logo {
    max-width: 250px;
}

.pgen-container h2 {
    color: #58a6ff;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pgen-options {
    background-color: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.pgen-password-option {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.pgen_pwdoption {
    cursor: pointer;
    user-select: none;
}

.pgen-password-option input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #58a6ff;
}

.pgen-password-option select {
    background-color: #21262d;
    color: #c9d1d9;
    border: 1px solid #30363d;
    border-radius: 4px;
    padding: 6px 10px;
    margin-right: 10px;
    font-family: 'Open Sans', sans-serif;
    outline: none;
}
.pgen-password-option select:focus {
    border-color: #58a6ff;
}

.pgen-label-title {
    font-size: 15px;
    color: #8b949e;
    transition: color 0.2s;
}

.pgen-label-selected {
    color: #c9d1d9;
    font-weight: 600;
}

.pgen-bracket, .pgen-character-list, .pgen-smilarcharacter-list {
    color: #484f58;
    font-size: 13px;
    margin-left: 5px;
}

/* Special Characters List Container */
#pgen-specialcharacterslist-container {
    background-color: #161b22;
    border: 1px dashed #30363d;
    border-radius: 6px;
    padding: 15px;
    margin-top: 10px;
    margin-bottom: 20px;
    margin-left: 25px;
}

.pgen-specialcharacter-container {
    display: inline-flex;
    align-items: center;
    width: 65px;
    margin-bottom: 10px;
}

.pgen-specialcharacter-container input[type="checkbox"] {
    accent-color: #58a6ff;
    margin-right: 5px;
    cursor: pointer;
}

.pgen-specialcharacter-container label {
    color: #8b949e;
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
}

.pgen-specialcharacter-selected {
    color: #58a6ff !important;
}

.pgen_ckeckuncheckspecialcharacters_container {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #30363d;
}

.pgen_checkallspecialcharacters {
    color: #58a6ff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.pgen_checkallspecialcharacters:hover {
    text-decoration: underline;
}

/* Generator Button */
.pgen-submit-container {
    text-align: center;
    margin-top: 30px;
}

.pgen-button {
    background: linear-gradient(180deg, #238636, #1ea04c);
    color: #ffffff;
    border: 1px solid rgba(240,246,252,0.1);
    border-radius: 6px;
    padding: 12px 32px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    text-shadow: 0 1px 0 rgba(0,0,0,0.2);
}

.pgen-button:hover {
    background: linear-gradient(180deg, #2ea043, #238636);
    box-shadow: 0 4px 12px rgba(46,160,67,0.3);
}

.pgen-button:active {
    background: #238636;
}

/* Generated Passwords */
.pgen-password-list {
    margin-top: 30px;
    text-align: center;
}

.pgen-password-input {
    background-color: #0d1117;
    color: #58a6ff;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 12px 15px;
    font-size: 24px;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 15px auto;
    text-align: center;
    display: block;
    letter-spacing: 2px;
}

.pgen-password-input:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 0 3px rgba(88,166,255,0.3);
}

.pgen-password-textarea {
    background-color: #0d1117;
    color: #58a6ff;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 15px;
    font-size: 16px;
    font-family: 'Courier New', Courier, monospace;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: block;
    resize: vertical;
}

.pgen-password-textarea:focus {
    outline: none;
    border-color: #58a6ff;
}

/* Loading & Error */
.pgen-loading {
    margin-top: 15px;
    display: none;
}

.pgen-error {
    background-color: rgba(248,81,73,0.1);
    color: #ff7b72;
    border: 1px solid rgba(248,81,73,0.4);
    border-radius: 6px;
    padding: 15px;
    margin-top: 20px;
    font-weight: 600;
    display: none;
}

/* Information List */
.pgen-ul-lock {
    list-style: none;
    padding: 0;
    margin-top: 30px;
}

.pgen-ul-lock li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    color: #8b949e;
    font-size: 14px;
}

.pgen-ul-lock li::before {
    content: "🔒";
    position: absolute;
    left: 0;
    top: -2px;
    font-size: 16px;
}

/* Footer */
.pgen-footer {
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid #30363d;
    margin-top: 40px;
}

.pgen-a {
    color: #58a6ff;
    text-decoration: none;
    font-weight: 600;
    margin: 0 10px;
}

.pgen-a:hover {
    text-decoration: underline;
}

.p {
    color: #484f58;
}

.pgen-clear {
    clear: both;
}

/* Intro Text */
.pgen-container > p {
    color: #8b949e;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* SPONSOR BANNER STYLES (Ported from freedigitalinvoice) */
.sponsor-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    margin-top: 20px;
}
.sponsor-banner {
    box-sizing: border-box;
    width: 100%;
    max-width: 900px;
    min-height: 100px;
    background-color: #1a1a2e;
    color: white;
    font-family: Arial, sans-serif;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    overflow: hidden;
    border-bottom: 3px solid #e94560;
    border-radius: 8px;
    gap: 15px;
}
.sponsor-left {
    display: flex;
    align-items: center;
}
.sponsor-logo {
    background: #e94560;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    margin-right: 10px;
}
.sponsor-text {
    text-align: left;
}
.sponsor-title {
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 1px;
    margin: 0;
}
.sponsor-tags {
    font-size: 11px;
    color: #bbb;
    display: flex;
    gap: 10px;
}
.sponsor-middle {
    text-align: center;
    border-left: 1px solid #444;
    border-right: 1px solid #444;
    padding: 0 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}
.sponsor-offer {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin: 0;
}
.sponsor-offer span {
    color: #e94560;
}
.sponsor-upsell {
    font-size: 13px;
    color: #ddd;
    margin: 0;
}
.sponsor-upsell span {
    color: #4caf50;
    font-weight: bold;
}
.sponsor-links {
    margin-top: 8px;
    display: flex;
    justify-content: center;
    gap: 15px;
}
.sponsor-links a {
    color: #4caf50;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
}
.sponsor-right {
    text-align: right;
}
.sponsor-cta {
    display: inline-block;
    background-color: #4caf50;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    font-weight: bold;
    border-radius: 4px;
    font-size: 16px;
    text-transform: uppercase;
    border: 2px solid #4caf50;
    transition: background-color 0.2s;
}
.sponsor-cta:hover {
    background-color: #45a049;
}
.sponsor-note {
    font-size: 10px;
    color: #aaa;
    margin-top: 5px;
    text-align: center;
}

@media (max-width: 768px) {
    .sponsor-banner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
        border-radius: 8px;
    }
    .sponsor-left {
        flex-direction: column;
        margin-bottom: 15px;
    }
    .sponsor-logo {
        margin-right: 0;
        margin-bottom: 10px;
    }
    .sponsor-text {
        text-align: center;
    }
    .sponsor-middle {
        border-left: none;
        border-right: none;
        border-top: 1px solid #444;
        border-bottom: 1px solid #444;
        padding: 15px 0;
        margin-bottom: 15px;
        width: 100%;
    }
    .sponsor-right {
        text-align: center;
    }
    .pgen-password-option {
        flex-direction: column;
        align-items: flex-start;
    }
    .pgen-password-option label {
        margin-top: 5px;
    }
}
.sponsor-ad-badge {
    background-color: #fff;
    color: #202124;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
}

/* ====== NEW UI COMPONENTS ====== */

/* Mode Toggle Switch */
.pgen-mode-toggle {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 15px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
}
.pgen-toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-right: 15px;
    margin-bottom: 0;
}
.pgen-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.pgen-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #30363d;
    transition: .4s;
    border-radius: 24px;
}
.pgen-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: #c9d1d9;
    transition: .4s;
    border-radius: 50%;
}
.pgen-toggle-switch input:checked + .pgen-slider {
    background-color: #238636;
}
.pgen-toggle-switch input:checked + .pgen-slider:before {
    transform: translateX(26px);
}
.pgen-mode-label {
    color: #c9d1d9;
    font-size: 16px;
    font-weight: 500;
}

/* Copy Button Container & Button */
.pgen-password-input-wrapper {
    position: relative;
    display: block;
    margin: 10px auto;
    width: 100%;
}
.pgen-copy-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #238636;
    border: none;
    color: #fff;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
}
.pgen-copy-btn:hover {
    background: #2ea043;
}
.pgen-copy-btn.copied {
    background: #1f6feb;
}

/* Strength Meter */
#pgen-strength-meter {
    margin-top: 25px;
    text-align: center;
}
.pgen-strength-bar-container {
    width: 100%;
    height: 8px;
    background-color: #30363d;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}
.pgen-strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
}
.pgen-strength-label {
    font-size: 14px;
    font-weight: bold;
}
