body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 600px;
    padding: 30px;
    margin: 20px 0;
}

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

header h1 {
    margin: 0;
    color: #ff6b6b;
    font-size: 2.2em;
}

header p {
    margin: 10px 0 0;
    color: #666;
}

.generator-section {
    margin-bottom: 30px;
}

.password-display {
    display: flex;
    margin-bottom: 25px;
}

#password-output {
    flex: 1;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px 0 0 10px;
    font-size: 1.1em;
    outline: none;
    transition: border-color 0.3s;
}

#password-output:focus {
    border-color: #a8dadc;
}

.copy-button {
    background: #4cc9f0;
    color: white;
    border: none;
    border-radius: 0 10px 10px 0;
    padding: 0 20px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s;
}

.copy-button:hover {
    background: #3a9db3;
}

.controls {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input[type="range"] {
    width: 70%;
    vertical-align: middle;
}

#length-value {
    display: inline-block;
    width: 30px;
    text-align: center;
    font-weight: bold;
    color: #ff6b6b;
}

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

.checkbox-group label {
    margin: 0;
    display: flex;
    align-items: center;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

#exclude-characters, #password-count {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    box-sizing: border-box;
}

.generate-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(to right, #ff6b6b, #ff8e53);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.2em;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.generate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.generate-button:active {
    transform: translateY(0);
}

.history-section h2 {
    margin-top: 0;
    color: #4a4a4a;
    display: flex;
    align-items: center;
}

.history-section h2::before {
    content: "🔑";
    margin-right: 10px;
}

#history-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 15px;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 10px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px dashed #eee;
}

.history-item:last-child {
    border-bottom: none;
}

.history-password {
    font-family: monospace;
    word-break: break-all;
    flex: 1;
}

.history-actions {
    display: flex;
    gap: 5px;
}

.history-copy-btn, .history-delete-btn {
    background: #f0f0f0;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
    transition: background 0.3s;
}

.history-copy-btn:hover {
    background: #4cc9f0;
    color: white;
}

.history-delete-btn:hover {
    background: #ff6b6b;
    color: white;
}

.clear-button {
    background: #8d99ae;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1em;
    float: right;
    transition: background 0.3s;
}

.clear-button:hover {
    background: #6b778d;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    background: #4cc9f0;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateX(200%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
}

.notification.show {
    transform: translateX(0);
}

@media (max-width: 600px) {
    .container {
        width: 95%;
        padding: 20px;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .password-display {
        flex-direction: column;
    }
    
    #password-output {
        border-radius: 10px;
        margin-bottom: 10px;
    }
    
    .copy-button {
        border-radius: 10px;
        padding: 15px;
    }
}