body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #ffffff;
    margin: 0;
    min-height: 100vh;
    padding: 40px 20px;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    max-width: 66.66vw;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    height: auto;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

h1 {
    color: #ffffff;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 1.8rem;
    letter-spacing: -0.5px;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.password-length-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.password-length-container label {
    font-size: 1.1rem;
    font-weight: 500;
    min-width: 100px;
}

.length-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 44px;
}

.length-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 12px;
    font-size: 1.2rem;
    line-height: 36px;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    top: 2px;
}

.password-length-container input[type="number"] {
    width: 60px;
    padding: 10px 12px;
    font-size: 1rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transition: all 0.2s ease;
    -moz-appearance: textfield;
}

.password-length-container input[type="number"]::-webkit-inner-spin-button,
.password-length-container input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.password-length-container input[type="number"]:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.length-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 12px;
    font-size: 1.2rem;
    line-height: 1;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    top: 0;
}

.length-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.1));
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    color: #ffffff;
}

.length-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.options-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 1rem;
    width: 100%;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}

button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 10%, transparent 10.01%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s ease;
}

button:active::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
    transition: transform 0s, opacity 0.5s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.result {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

#password {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-family: 'Courier New', Courier, monospace;
    transition: all 0.3s ease;
    position: relative;
}

#password:focus {
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.15);
}

#password::placeholder {
    color: rgba(255, 255, 255, 0.5);
    transition: opacity 0.3s ease;
    margin-left: 8px;
}

#password:focus::placeholder {
    opacity: 0;
    margin-left: 8px;
}

.strength {
    margin-bottom: 15px;
}

.strength-meter {
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin: 12px 0;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.strength-meter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(255, 65, 108, 0.2) 0%,
        rgba(255, 75, 43, 0.2) 100%);
    z-index: 1;
}

.strength-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #ff416c, #ff4b2b);
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 12px;
}

.tips {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 15px;
}

.tips h2 {
    margin-top: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.tips ul {
    padding-left: 24px;
    list-style: none;
}

.tips li {
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    padding-left: 20px;
}

.tips li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #667eea;
    font-size: 1.2em;
    line-height: 1;
}

.history {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
}

.history h2 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    margin-bottom: 16px;
}

#history-list {
    list-style: none;
    padding-left: 0;
    max-height: 300px;
    overflow-y: auto;
}

#history-list li {
    padding: 12px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Courier New', Courier, monospace;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

#history-list li .timestamp {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

#history-list li .password-text {
    font-size: 1.1rem;
    word-break: break-all;
}

#history-list li .strength-indicator {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin: 8px 0;
    overflow: hidden;
}

#history-list li .strength-indicator::before {
    content: '';
    display: block;
    height: 100%;
    background: #e74c3c; /* 默认红色 */
    transition: width 0.3s ease, background-color 0.3s ease;
}

#history-list li[data-strength="strong"] .strength-indicator::before {
    background: #2ecc71; /* 绿色 */
}

#history-list li[data-strength="medium"] .strength-indicator::before {
    background: #f1c40f; /* 黄色 */
}

#history-list li .history-buttons {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

#history-list li .history-buttons button {
    flex: 1;
    padding: 6px 12px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

#history-list li .history-buttons button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

#history-list li button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-left: 8px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

#history-list li button:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

@media (max-width: 600px) {
    .container {
        padding: 15px;
        max-width: 90vw;
    }
    
    .controls {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    #password {
        font-size: 14px;
        padding: 10px 14px;
    }

    .strength-meter {
        height: 10px;
    }

    .tips {
        padding: 12px;
    }

    .tips h2 {
        font-size: 1.1rem;
    }

    .tips li {
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    body {
        padding: 20px 10px;
    }

    .container {
        padding: 12px;
        border-radius: 16px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .password-length-container label {
        font-size: 1rem;
    }

    .length-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .password-length-container input[type="number"] {
        width: 50px;
        padding: 8px 10px;
    }
}

.footer {
    padding: 40px 20px;
    margin-top: 60px;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1070px;
    margin: 0 auto;
}

.contact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.contact-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #fff;
}

.contact-info p {
    margin: 60px -555px;
    margin-bottom: 0px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.copyright {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
    .contact-section {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .contact-form {
        margin-top: 20px;
    }
}

.exclude-chars-container {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    margin-left: -40px;
}

.exclude-chars-container span {
    margin-right: 0px;
}

.excluded-chars-input {
    color: #1815159a;
    width: 120px;
    padding: 0 8px;
    border-radius: 0;
    border: 1px solid rgba(0, 0, 0, 0.3);
    background: #ffffff;
    transition: all 0.2s ease;
    margin-left: 8px;
    height: 1.5em;
    line-height: 1.5em;
}

.excluded-chars-input::placeholder {
    color: #999999;
    opacity: 1;
    margin-left: 8px;
}

.excluded-chars-input:focus::placeholder {
    opacity: 0;
    margin-left: 8px;
}

.excluded-chars-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
    background: #ffffff;
}

.excluded-chars-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
}
