:root {
    --primary-color: #4a90e2;
    --primary-hover: #357abd;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-color: #333;
    --text-secondary: #666;
    --border-color: #ddd;
    --success: #27ae60;
    --warning: #f1c40f;
    --danger: #e74c3c;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-color);
}

header p {
    color: var(--text-secondary);
}

.card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.result-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#password-display {
    flex-grow: 1;
    padding: 12px 15px;
    font-size: 1.2rem;
    font-family: monospace;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    background-color: #fafafa;
}

#copy-btn {
    padding: 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

#copy-btn:hover {
    background: var(--primary-hover);
}

.strength-meter {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#strength-bar {
    height: 6px;
    width: 100%;
    background: #eee;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

#strength-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    transition: width 0.3s, background 0.3s;
}

#strength-text {
    font-size: 0.9rem;
    font-weight: 600;
}

.settings {
    margin-bottom: 25px;
}

.setting-group {
    margin-bottom: 20px;
}

.setting-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

input[type="range"] {
    width: 100%;
    cursor: pointer;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Custom Checkbox */
.checkbox-container {
    display: block;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    font-size: 0.95rem;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #eee;
    border-radius: 4px;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: #ccc;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.primary-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

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

.primary-btn:active {
    transform: scale(0.98);
}

footer {
    text-align: center;
    margin-top: 30px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Strength levels */
.strength-weak #strength-bar::after { width: 33%; background: var(--danger); }
.strength-weak #strength-text { color: var(--danger); }

.strength-medium #strength-bar::after { width: 66%; background: var(--warning); }
.strength-medium #strength-text { color: var(--warning); }

.strength-strong #strength-bar::after { width: 100%; background: var(--success); }
.strength-strong #strength-text { color: var(--success); }

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