* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.mobile-container {
    background-color: #ffffff;
    width: 100%;
    max-width: 430px;
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    padding-bottom: 110px;
}

.main-content, .verification-screen, .success-screen {
    padding: 40px 24px 20px 24px;
    text-align: center;
    width: 100%;
    flex-grow: 1;
    animation: fadeIn 0.3s ease-in-out;
}

.logo-wrapper {
    width: 100%;
    max-width: 160px;
    margin: 0 auto 24px auto;
    display: flex;
    justify-content: center;
}

.banner-img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.banner-preview {
    width: 100%;
    margin-bottom: 24px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.banner-preview img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.main-heading {
    font-size: 22px;
    color: #1c1e21;
    font-weight: 700;
    margin-bottom: 12px;
}

.description {
    color: #65676b;
    font-size: 14px;
    line-height: 1.45;
    margin-bottom: 20px;
    padding: 0 4px;
}

.account-form {
    width: 100%;
}

.input-group {
    width: 100%;
    position: relative;
    margin-bottom: 18px; /* Tăng nhẹ để chứa dòng chữ lỗi bên dưới */
}

.input-group input {
    width: 100%;
    padding: 15px 16px;
    border: 1px solid #ccd0d5;
    border-radius: 8px;
    font-size: 15px;
    color: #1c1e21;
    outline: none;
    background-color: #f5f6f7;
    transition: all 0.2s ease;
}

.input-group input:focus {
    border-color: #1877f2;
    background-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.1);
}

/* KHI Ô NHẬP LIỆU BỊ LỖI -> ĐỔI VIỀN ĐỎ VÀ CHẠY HIỆU ỨNG RUNG LẮC */
.input-group input.input-error {
    border-color: #ee2222 !important;
    background-color: #fff8f8;
    animation: shake 0.4s ease-in-out;
}

/* DÒNG VĂN BẢN CHỮ LỖI MÀU ĐỎ DƯỚI Ô NHẬP LIỆU */
.error-message {
    color: #ee2222;
    font-size: 12px;
    text-align: left;
    margin-top: 5px;
    margin-left: 4px;
    font-weight: 500;
    min-height: 16px; /* Giữ khung cố định để không bị giật khung hình */
}

.verification-box input {
    text-align: center;
    font-size: 17px;
    letter-spacing: 1px;
    font-weight: 600;
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 25px; /* Điều chỉnh lại vị trí do có dòng text báo lỗi */
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 16px;
    user-select: none;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    width: 100%;
    margin-top: 12px;
    margin-bottom: 20px;
    color: #65676b;
    font-size: 13.5px;
    text-align: left;
    line-height: 1.4;
}

.checkbox-group input {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
}

.resend-text {
    font-size: 13.5px;
    color: #65676b;
    margin-top: 4px;
    margin-bottom: 24px;
}

.resend-link {
    color: #1877f2;
    font-weight: 600;
    cursor: pointer;
}

.resend-link:hover {
    text-decoration: underline;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background-color: #1877f2;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.submit-btn:hover {
    background-color: #166fe5;
}

.loading-screen {
    padding: 60px 24px 20px 24px;
    text-align: center;
    width: 100%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.3s ease-in-out;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #1877f2;
    border-radius: 50%;
    margin: 30px 0;
    animation: spin 1s linear infinite;
}

.loading-title {
    font-size: 20px;
    color: #1c1e21;
    font-weight: 700;
    margin-bottom: 12px;
}

.loading-text {
    color: #65676b;
    font-size: 14.5px;
    line-height: 1.5;
}

.countdown-wrapper {
    margin-top: 8px;
}

#countdownTimer {
    font-weight: 700;
    color: #1877f2;
}

.success-icon {
    width: 70px;
    height: 70px;
    background-color: #42b72a;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 35px;
    font-weight: bold;
    margin: 30px auto;
    box-shadow: 0 4px 12px rgba(66, 183, 42, 0.2);
}

/* ĐỊNH NGHĨA HIỆU ỨNG HOẠT HỌA RUNG LẮC (SHAKE CHUẨN) */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    15%, 45%, 75% { transform: translateX(-6px); }
    30%, 60%, 90% { transform: translateX(6px); }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.footer-area {
    margin-top: auto;        /* Tự động đẩy footer xuống cuối container */
    width: 100%;
    background-color: #ffffff;
    padding: 12px 20px 16px 20px;
    border-top: 1px solid #f0f2f5;
    position: relative;     /* Thay vì absolute, dùng relative để footer nằm đúng vị trí dòng chảy văn bản */
    z-index: 10;
}

.support-wrapper {
    width: 100%;
    margin-bottom: 10px;
}

.support-modal {
    width: 100%;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
    display: block;
    overflow: hidden;
    border: 1px solid #e4e6eb;
    transition: all 0.3s ease;
}

.support-modal.minimized {
    background-color: #f0f2f5;
    border: 1px dashed #bcc0c4;
    box-shadow: none;
}

.modal-header {
    background-color: #1877f2;
    color: #ffffff;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.support-modal.minimized .modal-header {
    background-color: transparent;
    color: #1877f2;
    padding: 11px 16px;
    justify-content: center;
}

.support-modal.minimized .modal-header .modal-close {
    display: none;
}

.modal-close {
    font-size: 14px;
    font-weight: bold;
    opacity: 0.7;
    cursor: pointer;
}

.modal-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: #f0f2f5;
    max-height: 200px;
    overflow-y: auto;
    transition: max-height 0.3s ease;
}

.support-modal.minimized .modal-body {
    max-height: 0;
    padding: 0;
    display: none;
}

.chat-bubble {
    background-color: #ffffff;
    color: #050505;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.4;
    max-width: 90%;
    text-align: left;
    align-self: flex-start;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chat-time {
    font-size: 11px;
    color: #8a8d91;
    text-align: center;
    margin-top: 4px;
}

.footer-text {
    color: #8a8d91;
    font-size: 11px;
    text-align: center;
}
/* --- PHẦN CUSTOM ALERT MODAL --- */
.custom-alert-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex; justify-content: center; align-items: center;
    z-index: 9999;
}

.custom-alert-box {
    background: white; padding: 20px 30px;
    border-radius: 12px; text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    width: 80%; max-width: 300px;
}

.custom-alert-box button {
    margin-top: 15px; padding: 8px 24px;
    background: #1877f2; color: white;
    border: none; border-radius: 6px; cursor: pointer;
}
/* --- HẾT PHẦN CUSTOM ALERT MODAL --- */
/* Thêm vào cuối file style.css */
@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

.shake-animation {
    animation: shake 0.3s ease-in-out;
    border: 1px solid #ee2222 !important; /* Đổi viền sang đỏ */
}
