:root {
    --primary-color: #4a6cf7;
    --primary-hover: #3a5ce5;
    --bg-color: #f5f7ff;
    --card-bg: #ffffff;
    --text-color: #333333;
    --border-color: #e1e5ee;
    --slider-bg: #d1d9f0;
    --weak-color: #ff4757;
    --medium-color: #ffa502;
    --strong-color: #2ed573;
    --very-strong-color: #1e90ff;
    --transition: all 0.3s ease;
}

.dark-theme {
    --bg-color: #1a1d2b;
    --card-bg: #1a1d2b;
    --text-color: #f5f7ff;
    --slider-bg: #3a3f55;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: var(--transition);
}

.container {
    width: 100%;
    max-width: 500px;
    border-radius: 16px;
    padding: 30px;
    transition: var(--transition);
}

h1 {
    text-align: center;
    margin-bottom: 25px;
    font-weight: 600;
    font-size: 28px;
    color: var(--primary-color);
}

.password-display {
    position: relative;
    background-color: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.password-text {
    font-size: 18px;
    font-family: monospace;
    word-break: break-all;
    max-width: calc(100% - 80px);
}

.password-actions {
    display: flex;
    gap: 10px;
}

.btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-color);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

.strength-meter {
    height: 8px;
    background-color: var(--slider-bg);
    border-radius: 4px;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.strength-progress {
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-label {
    text-align: right;
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 500;
}

.options {
    margin-bottom: 25px;
}

.option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.option-label {
    font-size: 16px;
    font-weight: 500;
}

.checkbox-container {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.checkbox-container input {
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--slider-bg);
    border-radius: 34px;
    transition: var(--transition);
}

.checkmark:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: var(--transition);
}

input:checked + .checkmark {
    background-color: var(--primary-color);
}

input:checked + .checkmark:before {
    transform: translateX(24px);
}

.length-container {
    margin-bottom: 25px;
}

.length-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.length-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    min-width: 30px;
    text-align: right;
}

.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--slider-bg);
    outline: none;
    transition: var(--transition);
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.slider::-webkit-slider-thumb:hover,
.slider::-moz-range-thumb:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

.generate-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    background-color: var(--primary-color);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.generate-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--primary-color);
    transform: rotate(30deg);
}

.copy-alert {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.copy-alert.show {
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 576px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 24px;
    }

    .password-text {
        font-size: 16px;
    }
}