* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #ffd700;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.generator-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.password-display {
    position: relative;
    margin-bottom: 30px;
}

#passwordOutput {
    width: 100%;
    padding: 15px 50px 15px 15px;
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

#passwordOutput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.copy-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #667eea;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #5a6fd8;
    transform: translateY(-50%) scale(1.1);
}

.copy-btn.copied {
    background: #28a745;
}

.options {
    margin-bottom: 30px;
}

.option-group {
    margin-bottom: 20px;
}

.option-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

.length-control {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

#length {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
}

#length::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

#length::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

#lengthValue {
    background: #667eea;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    cursor: pointer;
    font-weight: normal !important;
    margin-bottom: 0 !important;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.checkbox-label:hover {
    background-color: #f8f9fa;
}

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

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background-color: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 12px;
}

.strength-meter {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.strength-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.strength-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

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

.strength-text {
    font-weight: 600;
    text-align: center;
}

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

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

.strength-good {
    background: #ffc107;
    width: 75%;
}

.strength-strong {
    background: #28a745;
    width: 100%;
}

.generate-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.generate-btn i {
    margin-right: 8px;
}

.batch-generator {
    border-top: 2px solid #e0e0e0;
    padding-top: 25px;
}

.batch-generator h3 {
    margin-bottom: 15px;
    color: #333;
}

.batch-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.batch-controls label {
    font-weight: 600;
}

#batchCount {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    width: 80px;
    text-align: center;
}

.batch-btn {
    padding: 8px 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.batch-btn:hover {
    background: #218838;
}

.batch-results {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 15px;
    background: #f8f9fa;
    display: none;
}

.batch-results.show {
    display: block;
}

.batch-password {
    font-family: 'Courier New', monospace;
    padding: 8px;
    margin: 5px 0;
    background: white;
    border-radius: 4px;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.batch-password:hover {
    background: #e9ecef;
}

.tips {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.tips h3 {
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tips h3 i {
    color: #ffc107;
}

.tips ul {
    list-style: none;
    padding-left: 0;
}

.tips li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    line-height: 1.5;
}

.tips li::before {
    content: "•";
    color: #667eea;
    font-weight: bold;
    position: absolute;
    left: 0;
}

footer {
    text-align: center;
    margin-top: 30px;
    color: white;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .generator-card {
        padding: 20px;
    }

    .batch-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .batch-controls label {
        text-align: center;
    }
}

/* Animation for password generation */
@keyframes generateAnimation {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.generating {
    animation: generateAnimation 0.3s ease;
}

/* Tooltip styles */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}
