* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.logo {
    width: 200px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    outline: none;
}

.form-group input:focus {
    border-color: #333;
}

.password-container {
    position: relative;
}

.show-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    width: 20px;
    height: 12px;
    border: 2px solid #666;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.show-password::before {
    content: '';
    width: 6px;
    height: 6px;
    background-color: #666;
    border-radius: 50%;
}

.show-password.hidden::before {
    display: none;
}

.show-password.hidden::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: #666;
    transform: rotate(45deg);
}

.login-btn {
    width: 100%;
    padding: 15px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-btn:hover {
    background-color: #555;
}

.login-btn:disabled {
    background-color: #999;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Error Styling - Only after user interaction */
.form-group input.error {
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

.form-group input.error:focus {
    border-color: #c0392b;
    box-shadow: 0 0 5px rgba(231, 76, 60, 0.3);
}

/* Custom Error Messages */
.error-message {
    background-color: #e74c3c;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    margin-top: 5px;
    position: relative;
    display: none;
}

.error-message::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 15px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid #e74c3c;
}

.error-message.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Browser validation tooltip styling */
input::-webkit-validation-bubble {
    display: none;
}

input:invalid::-webkit-validation-bubble-message {
    background: #e74c3c;
    color: white;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 12px;
}

/* Copyright Styling */
.copyright {
    margin-top: 20px;
    font-size: 12px;
    color: #666;
    text-align: center;
}

/* Form Options */
.form-options {
    text-align: center;
    margin-bottom: 20px;
}

.forgot-password {
    color: #666;
    text-decoration: underline;
    font-size: 12px;
    cursor: pointer;
}

.forgot-password:hover {
    color: #333;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 0;
    border: none;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 10px;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: #333;
    text-decoration: none;
}

.modal-step {
    padding: 20px;
    text-align: center;
}

.modal-step h2 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.modal-step p {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: #666;
}

.input-group {
    margin-bottom: 20px;
    position: relative;
}

.input-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    outline: none;
}

.input-group input:focus {
    border-color: #333;
}

.send-code-btn,
.verify-code-btn,
.change-password-btn {
    width: 100%;
    padding: 15px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.send-code-btn:hover,
.verify-code-btn:hover,
.change-password-btn:hover {
    background-color: #555;
}

.resend-code-btn {
    width: 100%;
    padding: 12px;
    background-color: transparent;
    color: #333;
    border: 1px solid #333;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.resend-code-btn:hover {
    background-color: #333;
    color: white;
}

.resend-code-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Verification Code Inputs */
.verification-code {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 8px;
}

.code-input {
    width: 45px !important;
    height: 45px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    border: 2px solid #ddd !important;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s;
}

.code-input:focus {
    border-color: #333 !important;
}

.timer {
    text-align: center;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

#countdown {
    font-weight: bold;
    color: #333;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

/* Modern Alert Modal */
.alert-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    animation: fadeIn 0.3s ease;
}

.alert-modal-content {
    background-color: #fff;
    margin: 20% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
    overflow: hidden;
}

.alert-modal-header {
    background: linear-gradient(135deg, #333 0%, #555 100%);
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 12px 12px 0 0;
}

.alert-modal-header.error {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.alert-modal-header.success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.alert-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.alert-modal-body {
    padding: 25px 20px;
    text-align: center;
}

.alert-modal-body p {
    margin: 0 0 20px 0;
    color: #555;
    font-size: 15px;
    line-height: 1.5;
}

.alert-modal-footer {
    padding: 0 20px 20px 20px;
    text-align: center;
}

.alert-ok-btn {
    background: linear-gradient(135deg, #333 0%, #555 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.alert-ok-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}