/* CSS SOFT BRUTALISM - Password Generator */
.tool-container {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #ffffff;
    width: 100%;
    max-width: 600px; /* Nhỏ gọn hơn Outline Builder */
    margin: 20px auto;
    border: 3px solid #111111;
    border-radius: 12px;
    box-shadow: 6px 6px 0px #111111;
    padding: 30px;
    color: #111111;
    box-sizing: border-box;
}

.tool-container h1 {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-weight: 900;
    margin-top: 0;
}

.divider {
    border: none;
    border-top: 3px dashed #111111;
    margin: 20px 0;
}

/* Khu vực hiển thị kết quả */
.password-display {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.password-display input {
    flex-grow: 1;
    padding: 15px;
    font-size: 1.5rem;
    font-family: 'Consolas', 'Courier New', Courier, monospace;
    font-weight: bold;
    text-align: center;
    background-color: #f4f4f4;
    border: 3px solid #111111;
    border-radius: 8px;
    outline: none;
    letter-spacing: 2px;
}

.btn-copy-icon {
    width: 60px;
    font-size: 1.5rem;
    cursor: pointer;
    background-color: #ffdac1; /* Pastel Orange */
    border: 3px solid #111111;
    border-radius: 8px;
    box-shadow: 3px 3px 0px #111111;
    transition: transform 0.1s, box-shadow 0.1s;
}
.btn-copy-icon:active {
    transform: translate(3px, 3px);
    box-shadow: 0px 0px 0px #111111;
}

/* Thanh đo độ mạnh */
.strength-meter {
    height: 10px;
    width: 100%;
    background-color: #e0e0e0;
    border: 2px solid #111111;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 5px;
}
.strength-bar {
    height: 100%;
    width: 0%;
    background-color: #ffb7b2; /* Mặc định Yếu - Đỏ */
    transition: width 0.3s ease, background-color 0.3s ease;
}
.strength-text {
    font-size: 0.9rem;
    font-weight: bold;
    text-align: right;
    color: #555;
}

/* Input Keyword */
.input-group label {
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
}
.input-group input {
    width: 100%;
    padding: 12px;
    font-size: 1.05rem;
    border: 2px solid #111111;
    border-radius: 6px;
    outline: none;
    box-sizing: border-box;
    transition: box-shadow 0.2s;
}
.input-group input:focus {
    box-shadow: 3px 3px 0px #111111;
}

/* Slider Độ dài */
.length-group {
    margin: 20px 0;
}
.length-group label {
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}
.length-group input[type="range"] {
    width: 100%;
    cursor: pointer;
}

/* Checkbox Tùy chọn */
.options-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}
.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    user-select: none;
}
.checkbox-container input {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #111111;
}

/* Nút bấm chính */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.action-buttons button {
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 800;
    padding: 15px;
    border: 3px solid #111111;
    border-radius: 8px;
    box-shadow: 4px 4px 0px #111111;
    transition: transform 0.1s, box-shadow 0.1s;
    text-transform: uppercase;
    color: #111111;
}
.action-buttons button:active {
    transform: translate(4px, 4px);
    box-shadow: 0px 0px 0px #111111;
}
.btn-generate { background-color: #b5ead7; } /* Pastel Green */
.btn-copy { background-color: #cbaacb; } /* Pastel Purple */

/* Lịch sử */
.history-box {
    margin-top: 25px;
    padding: 15px;
    background-color: #f9f9f9;
    border: 2px dashed #111111;
    border-radius: 8px;
}
.history-box h4 {
    margin: 0 0 10px 0;
}
.history-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.history-box li {
    font-family: monospace;
    font-size: 1.1rem;
    padding: 5px 0;
    border-bottom: 1px solid #ccc;
    cursor: pointer;
    color: #333;
}
.history-box li:hover {
    color: #000;
    font-weight: bold;
}
.history-box li:last-child {
    border-bottom: none;
}

/* Toast */
#toastPass {
    visibility: hidden;
    min-width: 200px;
    background-color: #111111;
    color: #ffffff;
    text-align: center;
    border-radius: 8px;
    padding: 12px;
    position: fixed;
    z-index: 9999;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
}
#toastPass.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

@media (max-width: 500px) {
    .options-group { grid-template-columns: 1fr; gap: 10px;}
    .action-buttons { grid-template-columns: 1fr; }
}