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

body {
    font-family: 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #e0e0e0;
}

.container {
    background: #1e2a3a;
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    max-width: 480px;
    width: 100%;
    border: 1px solid #2a3a4a;
}

.title {
    text-align: center;
    margin-bottom: 25px;
    font-size: 26px;
    color: #64b5f6;
    font-weight: 600;
}

.password-form {
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 15px;
    color: #b0bec5;
    margin-bottom: 8px;
    font-weight: 500;
}

.length-input {
    width: 100%;
    padding: 12px;
    background: #0d1b2a;
    border: 2px solid #2a3a4a;
    border-radius: 8px;
    color: #64ffda;
    font-size: 18px;
    font-family: 'Courier New', monospace;
    text-align: center;
    transition: border-color 0.2s;
}

.length-input:focus {
    outline: none;
    border-color: #64b5f6;
}

.length-hint {
    display: block;
    font-size: 12px;
    color: #607d8b;
    margin-top: 4px;
}

.checkbox-group {
    margin-bottom: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 15px;
    padding: 8px 0;
    color: #cfd8dc;
    user-select: none;
}

.checkbox-label input {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: #64b5f6;
    cursor: pointer;
    flex-shrink: 0;
}

.generate-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #1565c0, #0d47a1);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}

.generate-btn:hover {
    background: linear-gradient(135deg, #1976d2, #1565c0);
}

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

.error-box {
    background: #3a1a1a;
    border: 1px solid #6a2a2a;
    color: #ff8a80;
    padding: 14px;
    border-radius: 8px;
    text-align: center;
    margin-top: 20px;
    font-weight: 500;
    font-size: 14px;
}

.error-icon {
    margin-right: 8px;
}

.result-box {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #2a3a4a;
}

.password-section {
    margin-bottom: 15px;
}

.password-label {
    display: block;
    font-size: 13px;
    color: #90a4ae;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.password-display {
    background: #0d1b2a;
    border: 2px solid #2a3a4a;
    border-radius: 8px;
    padding: 16px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 20px;
    color: #64ffda;
    text-align: center;
    word-break: break-all;
    letter-spacing: 2px;
    user-select: all;
    -webkit-user-select: all;
    cursor: text;
}

.strength-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.strength-bar-bg {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: #2a3a4a;
    overflow: hidden;
}

.strength-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.strength-bar-fill[data-width="20"]  { width: 20%; }
.strength-bar-fill[data-width="40"]  { width: 40%; }
.strength-bar-fill[data-width="70"]  { width: 70%; }
.strength-bar-fill[data-width="100"] { width: 100%; }

.strength-excellent { background-color: #4CAF50; color: #4CAF50; }
.strength-good      { background-color: #FFA500; color: #FFA500; }
.strength-weak      { background-color: #FF7043; color: #FF7043; }
.strength-bad       { background-color: #F44336; color: #F44336; }
.strength-none      { background-color: #2a3a4a; color: #2a3a4a; }

.strength-label {
    font-weight: 600;
    font-size: 14px;
    min-width: 100px;
    text-transform: capitalize;
    text-align: right;
}

.warning-box {
    background: #2a1a1a;
    border: 1px solid #5a3a3a;
    color: #ffab91;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
    line-height: 1.5;
}

@media (max-width: 500px) {
    .container {
        padding: 20px;
    }
    
    .title {
        font-size: 22px;
    }
    
    .password-display {
        font-size: 16px;
        padding: 12px;
        letter-spacing: 1px;
    }
    
    .generate-btn {
        font-size: 15px;
        padding: 12px;
    }
}