/* ===== Password Generator Specific Styles ===== */
.password-generator-section {
    max-width: 520px;
    margin: 0 auto;
}

.password-generator-container {
    display: flex;
    flex-direction: column;
}

/* ===== Single Card Design ===== */
.password-card {
    background: white;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.password-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 1rem 0;
}

/* ===== Password Type Tabs ===== */
.password-type-tabs {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.tabs-container {
    display: flex;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #666;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.tab-btn:hover {
    color: #4a817b;
    background: rgba(74, 129, 123, 0.1);
}

.tab-btn.active {
    background: #4a817b;
    color: white;
    outline: none;
    box-shadow: 0 2px 8px rgba(74, 129, 123, 0.3);
}

.tab-icon {
    font-size: 1rem;
}

.tab-label {
    font-size: 0.9rem;
    font-weight: 500;
}

/* ===== Customization Section ===== */
.customization-section {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.option-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.option-row:last-child {
    margin-bottom: 0;
}

.option-label {
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
}

/* ===== Length Slider ===== */
.slider-control {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    max-width: 300px;
}

.range-slider {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: #e8e8e8;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4a817b;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.range-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4a817b;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.length-display {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    font-weight: 600;
    color: #4a817b;
    font-size: 0.9rem;
}

/* ===== Toggle Section ===== */
.toggle-section {
    margin-top: 0.5rem;
}

.random-only {
    display: none;
}

.random-only.show {
    display: flex;
}

/* ===== Toggle Switch ===== */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 12px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
    background-color: #4a817b;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* ===== Password Section ===== */
.password-section {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.password-display {
    background: #f8f9fa;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

.password-text {
    font-family: 'SF Mono', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    word-break: break-all;
    line-height: 1.4;
    min-height: 1.5rem;
}

/* ===== Action Buttons ===== */
.action-buttons {
    display: flex;
    gap: 0.75rem;
}

.action-buttons .btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #4a817b;
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: #3d6b65;
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: #4a817b;
    border: 1px solid #4a817b;
}

.btn-secondary:hover {
    background: #f0f7f6;
    transform: translateY(-1px);
}

/* ===== Strength Section ===== */
.strength-section {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
}

.strength-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.strength-label {
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
    min-width: 130px;
}

.strength-indicator {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.strength-bar {
    height: 6px;
    border-radius: 3px;
    flex: 1;
    background: #e8e8e8;
    position: relative;
    overflow: hidden;
}

.strength-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.strength-bar.weak::after {
    width: 25%;
    background: #ff4757;
}

.strength-bar.fair::after {
    width: 50%;
    background: #ffa502;
}

.strength-bar.good::after {
    width: 75%;
    background: #2ed573;
}

.strength-bar.strong::after {
    width: 100%;
    background: #4a817b;
}

.strength-text {
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 60px;
}

.strength-text.weak {
    color: #ff4757;
}

.strength-text.fair {
    color: #ffa502;
}

.strength-text.good {
    color: #2ed573;
}

.strength-text.strong {
    color: #4a817b;
}

/* ===== Copy Success Animation ===== */
.copy-success {
    animation: copySuccess 0.3s ease;
}

@keyframes copySuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* ===== Responsive Design ===== */
@media (max-width: 600px) {
    .password-generator-section {
        max-width: 100%;
        padding: 0 15px;
    }

    .password-card {
        border-radius: 12px;
    }

    .password-type-tabs,
    .customization-section,
    .password-section,
    .strength-section {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .tabs-container {
        gap: 2px;
        padding: 2px;
    }

    .tab-btn {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }

    .tab-icon {
        font-size: 0.9rem;
    }

    .option-row {
        margin-bottom: 1rem;
    }

    .slider-control {
        max-width: 200px;
    }

    .action-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .strength-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .strength-label {
        min-width: auto;
    }

    .strength-indicator {
        width: 100%;
    }

    .password-text {
        font-size: 1rem;
    }
}

@media (max-width: 400px) {
    .password-type-tabs,
    .customization-section,
    .password-section,
    .strength-section {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .length-display {
        min-width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .toggle-switch {
        width: 40px;
        height: 22px;
    }

    .toggle-slider:before {
        height: 16px;
        width: 16px;
    }

    input:checked + .toggle-slider:before {
        transform: translateX(18px);
    }
}

.btn-secondary, .btn-primary {
    outline: none !important;
}