.checkbox-label input[type="checkbox"]:checked + .label-text {
    background: var(--primary-color);
    color: #fff;
    border-radius: 4px;
    padding: 2px 8px;
    transition: background 0.2s, color 0.2s;
}
/* Password Generator Specific Styles */

.password-generator {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-light) 0%, #f3f4f6 100%);
    padding: 40px 0;
}

.back-link {
    margin-bottom: 1rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 0.9rem;
}

.back-btn:hover {
    color: var(--primary-color);
    background: rgba(255, 107, 0, 0.1);
}

.password-tool {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.password-output {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.password-display {
    position: relative;
    margin-bottom: 1.5rem;
}

#passwordOutput {
    width: 100%;
    padding: 1rem 4rem 1rem 1rem;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-light);
    color: var(--text-dark);
    transition: var(--transition);
    word-break: break-all;
}

#passwordOutput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.password-actions {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: var(--primary-light);
    color: white;
    transform: translateY(-1px);
}

.action-btn.primary {
    background: var(--primary-color);
    color: white;
}

.action-btn.primary:hover {
    background: var(--primary-dark);
}

.password-strength {
    text-align: center;
}

.strength-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.strength-meter {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 4px;
}

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

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

.strength-bar.good {
    width: 75%;
    background: #10b981;
}

.strength-bar.strong {
    width: 100%;
    background: #059669;
}

.strength-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

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

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

.strength-text.good {
    color: #10b981;
}

.strength-text.strong {
    color: #059669;
}

.password-settings {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.password-settings h3 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    font-size: 1.25rem;
}

.setting-group {
    margin-bottom: 1.5rem;
}

.setting-group:last-child {
    margin-bottom: 0;
}

.setting-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.setting-title {
    margin-bottom: 0.75rem !important;
    font-weight: 600;
}

.length-slider {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    margin-bottom: 0.5rem;
}

.length-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.length-slider::-webkit-slider-thumb:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.length-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.length-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.character-options,
.options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Custom checkbox with label text beside */
.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    padding: 0.75rem;
    margin: 0 !important;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}

.checkbox-label:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 7px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    animation: checkSlide 0.3s ease-in-out;
}

/* Checkbox animation */
@keyframes checkSlide {
    0% {
        opacity: 0;
        transform: rotate(45deg) scale(0.5);
    }
    50% {
        opacity: 0.7;
        transform: rotate(45deg) scale(1.2);
    }
    100% {
        opacity: 1;
        transform: rotate(45deg) scale(1);
    }
}

.label-text {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-left: 0.25rem;
    font-weight: 500;
    user-select: none;
    display: inline-block;
    vertical-align: middle;
    white-space: nowrap;
}

.password-history {
    grid-column: 1 / -1;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-top: 1rem;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.history-header h3 {
    color: var(--text-dark);
    font-size: 1.25rem;
}

.clear-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.history-list {
    max-height: 200px;
    overflow-y: auto;
}

.history-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.history-empty i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    background: var(--bg-light);
    transition: var(--transition);
}

.history-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.history-password {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    word-break: break-all;
    flex: 1;
    margin-right: 1rem;
}

.history-actions {
    display: flex;
    gap: 0.5rem;
}

.history-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.history-btn:hover {
    background: var(--primary-color);
    color: white;
}

.security-tips {
    margin-top: 3rem;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.security-tips h3 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.security-tips h3 i {
    color: var(--primary-color);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.tip-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    background: var(--bg-light);
    transition: var(--transition);
}

.tip-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.tip-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 107, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
}

.tip-content h4 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.tip-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(0);
}

.toast i {
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .password-tool {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .password-output,
    .password-settings {
        padding: 1.5rem;
    }
    
    #passwordOutput {
        font-size: 1rem;
        padding-right: 3rem;
    }
    
    .password-actions {
        flex-direction: column;
        gap: 4px;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .history-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .history-actions {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .password-generator {
        padding: 20px 0;
    }
    
    .security-tips {
        margin-top: 2rem;
        padding: 1.5rem;
    }
    
    .character-options,
    .options {
        gap: 0.5rem;
    }
}
