:root {
    --primary-color: #4a6fa5;
    --secondary-color: #166088;
    --accent-color: #4fc1e9;
    --bg-color: #f8f9fa;
    --text-color: #333;
    --border-color: #dee2e6;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* === Header styles === */
header {
    background-color: white;
    color: var(--text-color);
    text-align: center;
    padding: 1.5rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-bottom: 3px solid var(--accent-color);
}

header h1 {
    font-size: 1.6rem;
    margin-bottom: 0.3rem;
    color: var(--primary-color);
}

header p {
    font-size: 1.1rem;
    opacity: 1;
    color: var(--secondary-color);
}

main {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.container {
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

/* Settings grid: max 2 columns */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.setting-box {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--secondary-color);
}

input[type="number"], select {
    width: 100%;
    padding: 0.7rem;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    font-size: 1rem;
}

.checkbox-group {
    margin-top: 0.7rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    margin: 0.5rem 0;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
}

button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: block;
    margin: 1.5rem auto;
    font-weight: bold;
}

button:hover {
    background-color: var(--secondary-color);
}

.results {
    margin-top: 2rem;
}

.results h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

#password-list {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    min-height: 100px;
    max-height: 300px;
    overflow-y: auto;
}

.password-item {
    background-color: white;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    border-radius: 5px;
    border-left: 4px solid var(--accent-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: monospace;
    font-size: 1.1rem;
}

.copy-btn {
    background-color: transparent;
    color: var(--primary-color);
    font-size: 0.9rem;
    padding: 0.3rem 0.7rem;
    margin: 0;
    border: 1px solid var(--primary-color);
}

.copy-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.copy-success {
    animation: flash 1s;
}

@keyframes flash {
    0% { background-color: #d4edda; }
    100% { background-color: transparent; }
}

.tools {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

.tool-btn {
    background-color: #f1f1f1;
    color: var(--text-color);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    margin: 0;
}

footer {
    font-size: 12px;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
    background-color: #eaeaea;
    color: #666;
}

.copy-all-btn {
    background-color: var(--primary-color);
    color: white;
}

@media (max-width: 600px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }

    /* Adjust header font size on mobile */
    header h1 {
        font-size: 1.6rem;
    }
    header p {
        font-size: 1rem;
    }
}

.strength-meter {
    margin-top: 1rem;
}

.meter-bar {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.meter-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s;
}

.weak {
    background-color: #dc3545;
}

.medium {
    background-color: #ffc107;
}

.strong {
    background-color: #28a745;
}

.very-strong {
    background-color: #20c997;
}

#strength-text {
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

.faq-section {
    margin-top: 3rem;
}

.faq-item {
    margin-bottom: 1.5rem;
}

.faq-question {
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.faq-answer {
    color: var(--text-color);
}

.how-to-use {
    margin-top: 3rem;
}

.step {
    display: flex;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.step-number {
    background-color: var(--accent-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 1rem;
    flex-shrink: 0;
}

.step-content {
    flex-grow: 1;
}

.step-content h4 {
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.step-content p {
    color: var(--text-color);
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
}
footer .notice {
    font-style: italic;
    color: #555;
}