/* Reset styles for cross-browser compatibility */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    margin: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
}

.error {
    color: #d63031;
    background-color: #ffeaa7;
    padding: 12px;
    border: 1px solid #fab1a0;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

input[type="number"],
input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

/* Remove arrows from number input */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #3498db;
}

input[type="submit"] {
    width: 100%;
    background: #3498db;
    color: white;
    padding: 14px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

input[type="submit"]:hover {
    background: #2980b9;
}

input[type="submit"]:active {
    transform: translateY(1px);
}

/* Responsive design */
@media (max-width: 480px) {
    .login-container {
        padding: 30px 20px;
        margin: 10px;
    }

    h1 {
        font-size: 20px;
    }

    input[type="number"],
    input[type="password"],
    input[type="submit"] {
        padding: 10px;
        font-size: 14px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .login-container {
        border: 2px solid #000;
    }

    input[type="number"],
    input[type="password"] {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

/* Focus styles for accessibility */
input:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Placeholder styles */
::placeholder {
    color: #999;
    opacity: 1; /* Firefox */
}

:-ms-input-placeholder {
    color: #999;
}

::-ms-input-placeholder {
    color: #999;
}