/* style.css - 密码生成器样式 (清新主题) */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #f8f9fa;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 1.5rem;
    margin: 0;
}
.navbar{
	height:80px !important;
}


.card {
    max-width: 1000px;
    width: 100%;
    background: #ffffff;
    border-radius: 2.5rem;
    padding: 2.5rem 2rem;
    box-shadow: 0 5px 15px 2px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.05);
    color: #1e293b;
    transition: all 0.2s ease;
	margin-top:70px;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
    color: #333;
    text-align: center;
}

h1 span {
    background: #eef3fc;
    padding: 0.2rem 0.8rem;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #0D6EFD;
    margin-left: 0.5rem;
}

/* 密码展示 & 复制 */
.password-display {
    background: #f1f4f9;
    border-radius: 2.5rem;
    padding: 0.2rem 0.2rem 0.2rem 1.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #dce2ec;
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.02);
    margin-bottom: 2rem;
    transition: border 0.2s, box-shadow 0.2s;
}
.password-display:focus-within {
    border-color: #0D6EFD;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

#passwordOutput {
    background: transparent;
    border: none;
    padding: 0.9rem 0.2rem;
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #0b1a33;
    width: 100%;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    outline: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#copyBtn {
    background: #0D6EFD;
    border: none;
    color: white;
    font-size: 1.1rem;
    padding: 0.8rem 1.5rem;
    border-radius: 3rem;
    cursor: pointer;
    transition: 0.15s;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
    border: 1px solid #0D6EFD;
    letter-spacing: 0.3px;
	
}


	

#copyBtn:hover {
    background: #0b5ed7;
    transform: scale(1.02);
    border-color: #0b5ed7;
}
#copyBtn:active {
    transform: scale(0.94);
}

/* 长度控制 */
.length-section {
    background: #f1f4f9;
    padding: 1.2rem 1.5rem;
    border-radius: 2.2rem;
    margin-bottom: 1.8rem;
    border: 1px solid #dce2ec;
}

.length-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.length-header label {
    color: #334155;
}

.length-input-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #ffffff;
    padding: 0.1rem 0.3rem 0.1rem 0.8rem;
    border-radius: 30px;
    border: 1px solid #d0d8e5;
}

.length-input-group input[type="number"] {
    background: transparent;
    border: none;
    color: #0b1a33;
    font-weight: 600;
    font-size: 1rem;
    width: 60px;
    padding: 0.2rem 0;
    outline: none;
    font-family: inherit;
}
.length-input-group input[type="number"]::-webkit-inner-spin-button,
.length-input-group input[type="number"]::-webkit-outer-spin-button {
    opacity: 0.6;
}
.length-input-group input[type="number"]:focus {
    color: #0D6EFD;
}

.length-value {
    background: #e9edf4;
    padding: 0.1rem 0.9rem;
    border-radius: 30px;
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
    min-width: 32px;
    text-align: center;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 10px;
    background: #d0d8e5;
    outline: none;
    transition: background 0.2s;
    margin: 0.5rem 0 0.2rem;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0D6EFD;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px rgba(13, 110, 253, 0.2);
    transition: 0.1s;
}
input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.12);
    background: #0b5ed7;
}
input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0D6EFD;
    cursor: pointer;
    border: 2px solid #ffffff;
}

/* 选项网格 */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.8rem 1rem;
    background: #f1f4f9;
    padding: 1.3rem 1.5rem;
    border-radius: 2.2rem;
    border: 1px solid #dce2ec;
    margin-bottom: 1.8rem;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-weight: 450;
    padding: 0.25rem 0.2rem;
    border-radius: 30px;
    transition: 0.1s;
    color: #1e293b;
}
.option-item:hover {
    color: #0D6EFD;
}

.option-item input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 6px;
    border: 1.5px solid #b8c4d6;
    cursor: pointer;
    transition: 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.option-item input[type="checkbox"]:checked {
    background: #0D6EFD;
    border-color: #0D6EFD;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.15);
}
.option-item input[type="checkbox"]:checked::after {
    content: "✓";
    font-size: 15px;
    font-weight: 700;
    color: white;
}

/* 生成按钮 & 安全等级 */
.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: center;  
    margin-top: 0.5rem;
    margin-bottom: 2rem;
}

#generateBtn {
    background: #0D6EFD;
    border: none;
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
    padding: 10px 0px;
    border-radius: 3rem;
    cursor: pointer;
    transition: 0.15s;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
    border: 1px solid #0D6EFD;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
	justify-content: center; 
	width:200px !important;
}
#generateBtn:hover {
    background: #0b5ed7;
    transform: scale(1.02);
    box-shadow: 0 6px 18px rgba(13, 110, 253, 0.35);
}
#generateBtn:active {
    transform: scale(0.95);
}

.security-badge {
    background: #f1f4f9;
    padding: 0.3rem 1.2rem 0.3rem 1.5rem;
    border-radius: 3rem;
    border: 1px solid #dce2ec;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 500;
    font-size: 1rem;
    backdrop-filter: blur(4px);
    white-space: nowrap;
    color: #1e293b;
}
.security-level {
    background: #e9edf4;
    padding: 0.2rem 1rem;
    border-radius: 30px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #1e293b;
}
.level-weak { background: #fde7e9; color: #b91c1c; }
.level-medium { background: #fef3d7; color: #92400e; }
.level-strong { background: #d1fae5; color: #065f46; }
.level-very-strong { background: #cffafe; color: #0e7490; }

/* 历史记录 */
.history-section {
    margin-top: 1.8rem;
    border-top: 1px solid #e9edf4;
    padding-top: 1.2rem;
}

.history-header {
    display: flex;
    justify-content: space-between;
    color: #475569;
    font-weight: 400;
    letter-spacing: 0.2px;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 0.2rem;
}
.history-list::-webkit-scrollbar {
    width: 4px;
}
.history-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 20px;
}

.history-item {
    background: #f1f4f9;
    padding: 0.45rem 1.2rem;
    border-radius: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #0b1a33;
}
.history-item .h-pw {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 70%;
}
.history-item .h-badge {
    background: #e2e8f0;
    padding: 0.1rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #334155;
}

.clear-history {
    background: transparent;
    border: 1px solid #d0d8e5;
    color: #475569;
    padding: 0.1rem 1rem;
    border-radius: 2rem;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.1s;
}
.clear-history:hover {
    background: #e9edf4;
    color: #0D6EFD;
    border-color: #0D6EFD;
}

.empty-history {
    color: #94a3b8;
    font-style: italic;
    padding: 0.5rem 1rem;
}

@media (max-width: 500px) {
    .card { padding: 1.5rem; }
    .action-row { flex-direction: column; align-items: stretch; }
    .security-badge { justify-content: center; }
    .password-display { flex-wrap: wrap; padding: 0.5rem; }
    #passwordOutput { font-size: 1.2rem; padding: 0.6rem 0.8rem; }
    #copyBtn { width: 100%; justify-content: center; margin-top: 0.3rem; }
    .length-input-group input[type="number"] { width: 50px; }
}