/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #444444;
    color: #FAFAFA;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20px;
}

/* Main Container */
.login-container {
    width: 100%;
    max-width: 400px;
    background-color: #444444;
    border-radius: 16px;
    padding: 40px 32px;
    position: relative;
}

/* Logo Section */
.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-image {
    height: 75px;
    width: auto;
    object-fit: contain;
}

/* Main Content */
.main-content {
    margin-top: 60px;
    text-align: center;
}

.login-title {
    font-size: 32px;
    font-weight: 700;
    color: #FAFAFA;
    margin-bottom: 40px;
    letter-spacing: -0.5px;
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #FFCE2E;
    border-radius: 12px;
    background-color: #FAFAFA;
    color: #444444;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
    /* Prevent auto-focus on mobile */
    -webkit-user-select: text;
    user-select: text;
}

.form-input::placeholder {
    color: #444444;
    opacity: 0.7;
    font-weight: 500;
}

.form-input:focus {
    border-color: #FFCE2E;
    box-shadow: 0 0 0 3px rgba(255, 206, 46, 0.1);
    transform: translateY(-1px);
}

.form-input:hover {
    border-color: #FFCE2E;
    transform: translateY(-1px);
}

/* Login Button */
.login-button {
    width: 100%;
    padding: 16px 20px;
    background-color: #FFCE2E;
    color: #444444;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    letter-spacing: 0.5px;
}

.login-button:hover {
    background-color: #E6B800;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 206, 46, 0.3);
}

.login-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(255, 206, 46, 0.2);
}

.login-button:disabled {
    background-color: #666666;
    color: #999999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Error Message */
.error-message {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 20px;
    color: #FF6B6B;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    animation: slideIn 0.3s ease;
}

/* Loading State */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    color: #FAFAFA;
    font-size: 14px;
    font-weight: 500;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #FFCE2E;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 480px) {
    body {
        padding-top: 20px;
    }
    
    .login-container {
        padding: 30px 24px;
        margin: 10px;
    }
    
    .logo-section {
        top: 15px;
    }
    
    .logo-image {
        height: 75px;
    }
    
    .main-content {
        margin-top: 50px;
    }
    
    .login-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .form-input {
        padding: 14px 18px;
        font-size: 15px;
    }
    
    .login-button {
        padding: 14px 18px;
        font-size: 15px;
    }
}

@media (max-width: 360px) {
    .login-container {
        padding: 24px 20px;
    }
    
    .main-content {
        margin-top: 50px;
    }
    
    .login-title {
        font-size: 24px;
        margin-bottom: 24px;
    }
}

/* Focus and Accessibility */
.form-input:focus-visible,
.login-button:focus-visible {
    outline: 2px solid #FFCE2E;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .form-input {
        border-width: 3px;
    }
    
    .login-button {
        border: 2px solid #444444;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .form-input,
    .login-button,
    .error-message {
        transition: none;
    }
    
    .loading-spinner {
        animation: none;
    }
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
    .form-input {
        /* Prevent zoom on iOS when focusing input */
        font-size: 16px;
        /* Prevent auto-focus behavior */
        -webkit-appearance: none;
        appearance: none;
    }
    
    /* Prevent auto-focus on form load */
    .login-form {
        -webkit-user-select: none;
        user-select: none;
    }
    
    .login-form:focus-within {
        -webkit-user-select: text;
        user-select: text;
    }
}
