/*//////////////////////////////////////////////////////////////////
[ RESET ]
//////////////////////////////////////////////////////////////////*/

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

html,
body {
    height: 100%;
    font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
    color: #111;
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

ul,
li {
    margin: 0;
    list-style-type: none;
}

input,
textarea,
button {
    outline: none;
    border: none;
}

textarea:focus,
input:focus {
    border-color: transparent !important;
}

button {
    background: transparent;
}

button:hover {
    cursor: pointer;
}

iframe {
    border: none !important;
}

/*//////////////////////////////////////////////////////////////////
[ BASIC ]
//////////////////////////////////////////////////////////////////*/

.Invitation {
    width: 100%;
    min-height: 30px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    color: #555;
    font-family: Arial, Helvetica, sans-serif;
}

.Invitation span {
    cursor: pointer;
}

.Invitation a,
.Invitation .code {
    cursor: pointer;
    color: #124b7a;
    text-decoration: none;
}

.Invitation a:hover,
.Invitation .code:hover {
    color: #0b3558;
    text-decoration: underline;
}

.txt1 {
    font-size: 13px;
    line-height: 1.5;
    color: #666;
    font-family: Arial, Helvetica, sans-serif;
}

.txt2 {
    font-size: 12px;
    line-height: 1.5;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: Arial, Helvetica, sans-serif;
}

/*//////////////////////////////////////////////////////////////////
[ LOGIN CONTAINER ]
//////////////////////////////////////////////////////////////////*/

.limiter {
    width: 100%;
    margin: 0 auto;
}

.container-login100 {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 24px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.wrap-login100 {
    width: 500px;
    max-width: 100%;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #dddddd;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.08);
}

/*//////////////////////////////////////////////////////////////////
[ FORM ]
//////////////////////////////////////////////////////////////////*/

.login100-form {
    width: 100%;
}

.login100-form-title {
    display: block;
    font-size: 31px;
    font-weight: 700;
    color: #111;
    line-height: 1.2;
    text-align: center;
    letter-spacing: -0.02em;
    font-family: Arial, Helvetica, sans-serif;
}

/*//////////////////////////////////////////////////////////////////
[ INPUT ]
//////////////////////////////////////////////////////////////////*/

input[type="checkbox"] {
    margin-top: 4px;
}

.wrap-input100 {
    width: 100%;
    min-height: 78px;
    position: relative;
    margin-bottom: 2px;
}

.wrap-input50 {
    width: 50%;
    position: relative;
}

.label-input100 {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #555;
    line-height: 1.5;
    padding-left: 0;
    margin-bottom: 8px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: Arial, Helvetica, sans-serif;
}

.input100 {
    font-size: 15px;
    color: #111;
    line-height: 1.2;
    display: block;
    width: 100%;
    height: 48px;
    background: #fff;
    border: 1px solid #cfcfcf;
    border-radius: 2px;
    padding: 0 14px 0 42px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    font-family: Arial, Helvetica, sans-serif;
}

.input100::placeholder {
    color: #8a8a8a;
}

.input100:focus {
    border-color: #124b7a;
    box-shadow: 0 0 0 3px rgba(18, 75, 122, 0.10);
    background: #fff;
}

.focus-input100 {
    position: absolute;
    display: flex;
    align-items: center;
    width: 18px;
    height: 18px;
    top: 39px;
    left: 14px;
    pointer-events: none;
    color: #666;
    font-size: 15px;
}

.focus-input100::before {
    display: none;
}

.input100:focus + .focus-input100::before {
    width: 0;
}

/* CAPTCHA */
.captcha-row {
    padding-right: 98px;
}

.captcha-image {
    vertical-align: middle;
    width: 82px;
    height: 32px;
    cursor: pointer;
    position: absolute;
    right: 0;
    top: 30px;
    border-radius: 2px;
    border: 1px solid #d2d2d2;
    background: #fafafa;
}

.captcha-image:hover {
    border-color: #124b7a;
}

/*//////////////////////////////////////////////////////////////////
[ BUTTON ]
//////////////////////////////////////////////////////////////////*/

.container-login100-form-btn {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 18px;
}

.wrap-login100-form-btn {
    width: 100%;
    display: block;
    position: relative;
    z-index: 1;
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
    box-shadow: none;
}

.login100-form-bgbtn {
    display: none;
}

.login100-form-btn {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #fff;
    line-height: 1.2;
    text-transform: uppercase;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    width: 100%;
    height: 48px;
    border-radius: 2px;
    border: 1px solid #111;
    background: #111;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    font-family: Arial, Helvetica, sans-serif;
}

.login100-form-btn:hover {
    background: #2a2a2a;
    border-color: #2a2a2a;
}

.login100-form-btn:active {
    transform: translateY(1px);
}

.login100-form-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.bg1 { background-color: #3b5998; }
.bg2 { background-color: #2e7d32; }
.bg3 { background-color: #c62828; }
.bg4 { background-color: #000; }

/*//////////////////////////////////////////////////////////////////
[ VALIDATION ]
//////////////////////////////////////////////////////////////////*/

.validate-input {
    position: relative;
}

.alert-validate .input100 {
    border-color: #b42318 !important;
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.08) !important;
}

.alert-validate::before {
    content: attr(data-validate);
    position: absolute;
    max-width: 100%;
    background-color: #fff8f7;
    border: 1px solid #dfb0aa;
    border-radius: 2px;
    padding: 7px 10px;
    top: 100%;
    margin-top: 6px;
    right: 0;
    pointer-events: none;
    color: #b42318;
    font-size: 12px;
    line-height: 1.4;
    text-align: left;
    transition: opacity 0.2s ease;
    z-index: 2;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    font-family: Arial, Helvetica, sans-serif;
}

/*//////////////////////////////////////////////////////////////////
[ SOCIAL ]
//////////////////////////////////////////////////////////////////*/

.login100-social-item {
    font-size: 22px;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    margin: 5px;
}

.login100-social-item:hover {
    color: #fff;
    background-color: #333;
}

/*//////////////////////////////////////////////////////////////////
[ POPUP MODAL ]
//////////////////////////////////////////////////////////////////*/

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

.login-modal {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(17, 17, 17, 0.58);
    z-index: 9999;
    overflow-y: auto;
    padding: 24px;
    justify-content: center;
    align-items: center;
}

.login-modal[style*="display: block"],
.login-modal[style*="display:block"] {
    display: flex !important;
}

.login-modal-content {
    position: relative;
    background-color: #fff;
    width: 500px;
    max-width: 100%;
    border-radius: 4px;
    border: 1px solid #dddddd;
    box-shadow: 0 26px 72px rgba(0, 0, 0, 0.18);
    animation: modalShow 0.22s ease;
    margin: auto;
    left: auto;
    transform: none;
}

@keyframes modalShow {
    from {
        opacity: 0;
        transform: translateY(-14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    right: 14px;
    top: 12px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    z-index: 10;
    line-height: 1;
    width: 32px;
    height: 32px;
    text-align: center;
    border-radius: 50%;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.close-modal:hover {
    color: #111;
    background: #f3f3f3;
}

.modal-login-form {
    padding: 34px 32px 28px;
}

.modal-login-form::before {
    content: "The AITopic Times";
    display: block;
    text-align: center;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #111;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9e9e9;
}

.modal-tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 1px solid #e8e8e8;
    gap: 22px;
    justify-content: center;
}

.modal-tab {
    padding: 12px 2px 11px;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 15px;
    font-weight: 700;
    color: #6a6a6a;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
    font-family: Arial, Helvetica, sans-serif;
}

.modal-tab:hover {
    color: #111;
}

.modal-tab.active {
    color: #111;
    border-bottom-color: #111;
}

.modal-tab-content {
    display: none;
}

.modal-tab-content.active {
    display: block;
}

/* message modal */
#messageModal {
    z-index: 10001 !important;
}

.modal-backdrop {
    z-index: 10000 !important;
}

#messageModal .modal-content {
    border-radius: 4px;
    border: 1px solid #dddddd;
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.18);
}

#messageModal .modal-header {
    border-bottom: 1px solid #ececec;
    padding: 14px 18px;
    font-weight: 700;
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
}

#messageModal .modal-body {
    padding: 18px;
    font-size: 14px;
    line-height: 1.6;
    color: #222;
    font-family: Arial, Helvetica, sans-serif;
}

#messageModal .modal-footer {
    border-top: 1px solid #ececec;
    padding: 12px 18px 16px;
}

#messageModal .btn-primary {
    background: #111;
    border: 1px solid #111;
    border-radius: 2px;
    padding: 10px 18px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
}

#messageModal .btn-primary:hover {
    background: #2a2a2a;
    border-color: #2a2a2a;
}

/*//////////////////////////////////////////////////////////////////
[ LOGIN STATUS ]
//////////////////////////////////////////////////////////////////*/

.login-success {
    color: #28a745;
    font-weight: bold;
}

.user-welcome {
    color: #28a745;
    margin-right: 10px;
}

.logout-btn {
    text-decoration: none;
}

.logout-btn:hover {
    color: #c82333;
    text-decoration: underline;
}

.nav {
    display: flex !important;
    flex-wrap: wrap !important;
    padding-left: 15px !important;
    margin-bottom: 0 !important;
    list-style: none !important;
    margin-top: -4px !important;
}

.user-menu-container {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.username-link,
.favorites-link,
.logout-btn {
    transition: all 0.2s ease;
    border-radius: 4px;
    margin: 0 4px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #111 !important;
    text-decoration: none !important;
}

.username-link:hover,
.favorites-link:hover,
.logout-btn:hover {
    color: #124b7a !important;
    text-decoration: none !important;
}

/*//////////////////////////////////////////////////////////////////
[ FAVORITE BUTTON ]
//////////////////////////////////////////////////////////////////*/

.favorite-btn {
    transition: all 0.2s ease;
    border-radius: 2px !important;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
}

.favorite-btn:hover {
    transform: none;
    box-shadow: none;
}

.favorite-btn.favorited {
    background-color: #111;
    border-color: #111;
    color: #fff;
}

.favorite-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/*//////////////////////////////////////////////////////////////////
[ RESPONSIVE ]
//////////////////////////////////////////////////////////////////*/

@media (max-width: 768px) {
    .user-menu-container {
        display: flex;
        gap: 5px;
        flex-wrap: wrap;
    }

    .username-link,
    .favorites-link,
    .logout-btn {
        margin: 2px 0;
        text-align: center;
        padding: 8px 12px;
    }

    .modal-login-form {
        padding: 26px 20px 20px;
    }

    .modal-tabs {
        gap: 16px;
    }
}

@media (max-width: 576px) {
    .wrap-login100 {
        padding-left: 15px;
        padding-right: 15px;
    }

    .login-modal {
        padding: 14px;
        align-items: center;
        justify-content: center;
    }

    .login-modal-content {
        width: 100% !important;
        max-width: 100%;
    }

    .modal-login-form {
        padding: 22px 16px 18px;
    }

    .container-login100 {
        padding: 12px;
    }

    .captcha-row {
        padding-right: 0;
        padding-bottom: 46px;
    }

    .captcha-image {
        top: auto;
        bottom: 6px;
        right: 0;
    }

    .login100-form-title {
        font-size: 27px;
    }

    .input100 {
        font-size: 14px;
        height: 46px;
    }

    .focus-input100 {
        top: 38px;
    }
}
