:root {
    --primary-color: #4da6ff;
    --secondary-color: #e6f2ff;
    --text-color: #333;
    --background-color: #fff;
    --border-color: #ddd;
    --button-hover: #3385cc;
    --strength-weak: #ff4d4d;
    --strength-medium: #ffcc00;
    --strength-strong: #00cc44;
}

.dark-mode {
    --primary-color: #3385cc;
    --secondary-color: #1a1a1a;
    --text-color: #f0f0f0;
    --background-color: #121212;
    --border-color: #444;
    --button-hover: #4da6ff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 30px;
    background-color: var(--secondary-color);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header h1 {
    font-size: 24px;
    color: var(--primary-color);
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(30deg);
}

.password-display {
    position: relative;
    margin-bottom: 20px;
}

#password-output {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    background-color: var(--background-color);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    border-radius: 5px;
    outline: none;
}

.copy-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    color: var(--button-hover);
    transform: translateY(-50%) scale(1.1);
}

.settings {
    margin-bottom: 20px;
}

.setting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.length-control {
    display: flex;
    align-items: center;
    width: 60%;
}

#password-length {
    flex: 1;
    margin-right: 10px;
    accent-color: var(--primary-color);
}

#length-value {
    min-width: 30px;
    text-align: center;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.generate-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-bottom: 20px;
}

.generate-btn:hover {
    background-color: var(--button-hover);
}

.password-strength {
    margin-top: 10px;
}

.strength-label {
    margin-bottom: 5px;
    font-size: 14px;
}

.strength-meter {
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background-color 0.3s ease;
}