* {
    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;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 500px;
}

.card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
}

.header p {
    color: #666;
    font-size: 0.95rem;
}

.password-display {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#passwordOutput {
    flex: 1;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    color: #333;
    transition: border-color 0.3s;
}

#passwordOutput:focus {
    outline: none;
    border-color: #667eea;
}

.icon-btn {
    padding: 15px;
    background: #667eea;
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.icon-btn:active {
    transform: translateY(0);
}

.strength-indicator {
    margin-bottom: 30px;
}

.strength-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 10px;
    transition: all 0.3s;
}

.strength-fill.weak {
    width: 33%;
    background: #ff6b6b;
}

.strength-fill.medium {
    width: 66%;
    background: #ffd93d;
}

.strength-fill.strong {
    width: 100%;
    background: #51cf66;
}

#strengthText {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.options {
    margin-bottom: 25px;
}

.option-group {
    margin-bottom: 20px;
}

.option-group label {
    display: block;
    margin-bottom: 10px;
    color: #333;
    font-weight: 500;
}

#lengthValue {
    color: #667eea;
    font-weight: bold;
}

#length {
    width: 100%;
    height: 8px;
    border-radius: 10px;
    outline: none;
    -webkit-appearance: none;
    background: #e0e0e0;
}

#length::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    transition: all 0.3s;
}

#length::-webkit-slider-thumb:hover {
    background: #5568d3;
    transform: scale(1.2);
}

#length::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #667eea;
}

.checkbox-label span {
    color: #333;
    font-size: 0.95rem;
}

.generate-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 30px;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.generate-btn:active {
    transform: translateY(0);
}

.history {
    border-top: 2px solid #e0e0e0;
    padding-top: 20px;
}

.history h3 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 15px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 150px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #333;
}

.history-item button {
    padding: 5px 10px;
    background: #667eea;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s;
}

.history-item button:hover {
    background: #5568d3;
}

.no-history {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
}

.copied-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #51cf66;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
    z-index: 1000;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .card {
        padding: 25px;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    #passwordOutput {
        font-size: 0.9rem;
        padding: 12px;
    }
}