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

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-container {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 100%;
    max-width: 400px;
}

h2 {
    text-align: center;
    color: #333;
    margin-bottom: 24px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.login-btn {
    width: 100%;
    padding: 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-btn:hover {
    background-color: #45a049;
}

.login-btn:active {
    background-color: #3d8b40;
}

.guest-btn {
    background-color: #2196F3;
    margin-top: 10px;
}

.guest-btn:hover {
    background-color: #0b7dda;
}

.guest-btn:active {
    background-color: #0a6ebd;
}

.username-container {
    position: relative;
}

.username-container .username-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.username-container input {
    padding-right: 40px;
}

.username-container .history-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.username-container .history-btn svg {
    width: 20px;
    height: 20px;
}

.login-history {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.history-header {
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #eee;
    background-color: #f8f9fa;
}

.history-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.history-item:hover {
    background-color: #f0f0f0;
}

.history-username {
    flex: 1;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.history-time {
    font-size: 12px;
    color: #999;
    margin-right: 10px;
}

.history-delete {
    background: none;
    border: none;
    cursor: pointer;
    color: #ccc;
    padding: 4px;
    transition: color 0.2s;
}

.history-delete:hover {
    color: #dc3545;
}

.history-empty {
    padding: 20px;
    text-align: center;
    font-size: 14px;
    color: #999;
}

.history-clear {
    width: 100%;
    padding: 10px;
    background-color: #f8f9fa;
    border: none;
    border-top: 1px solid #eee;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    transition: background-color 0.2s;
}

.history-clear:hover {
    background-color: #e9ecef;
    color: #dc3545;
}

.password-container .password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-container .toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-container .toggle-password svg {
    width: 20px;
    height: 20px;
}

.remember-password {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.remember-password input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.remember-password label {
    margin-bottom: 0;
    font-weight: normal;
}

#login-message {
    margin-top: 20px;
    padding: 12px;
    text-align: center;
    border-radius: 4px;
}

#login-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#login-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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