* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea, #764ba2);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 30px;
    width: 100%;
    max-width: 500px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 28px;
}

.password-display {
    position: relative;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

#password {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 18px;
    letter-spacing: 1px;
    background-color: #f9f9f9;
    color: #333;
    outline: none;
    transition: all 0.3s;
}

#password:focus {
    border-color: #764ba2;
    box-shadow: 0 0 0 2px rgba(118, 75, 162, 0.2);
}

#copy-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

#copy-btn svg {
    fill: #666;
    transition: fill 0.3s;
}

#copy-btn:hover svg {
    fill: #764ba2;
}

.settings {
    margin-bottom: 25px;
}

.setting {
    margin-bottom: 15px;
}

.setting label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.setting input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

.setting input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.setting input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #764ba2;
    cursor: pointer;
}

.length-tip {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

#generate-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 6px;
    background-color: #764ba2;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

#generate-btn:hover {
    background-color: #663a91;
}

.strength-meter {
    margin-top: 20px;
    text-align: center;
}

.strength-meter p {
    margin-bottom: 8px;
    color: #555;
}

.strength-bars {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 8px;
}

.bar {
    height: 10px;
    width: 50px;
    background-color: #ddd;
    border-radius: 5px;
    transition: background-color 0.3s;
}

#strength-text {
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 500px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    #password {
        font-size: 16px;
    }
}