/* Art Trek Future · Trial Popup */

/* nav 顶部注入按钮（登录/注册旁） */
.atf-tp-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #E8FF3A;
    color: #0E1116;
    padding: 8px 16px;
    margin-right: 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .02em;
    cursor: pointer;
    border: none;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(232, 255, 58, 0.45);
    transition: all .2s;
    white-space: nowrap;
    user-select: none;
    font-family: inherit;
    text-decoration: none;
}
.atf-tp-nav-btn:hover,
.atf-tp-nav-btn:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(232, 255, 58, 0.65);
    color: #0E1116;
    background: #E8FF3A;
    outline: none;
}
@media (max-width: 768px) {
    .atf-tp-nav-btn {
        padding: 6px 12px;
        font-size: 12px;
        margin-right: 6px;
    }
}

/* 浮动按钮 */
.atf-tp-btn {
    position: fixed;
    bottom: 72px;
    z-index: 99990;
    background: #E8FF3A;
    color: #0E1116;
    padding: 12px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .02em;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 18px rgba(232, 255, 58, 0.55), 0 2px 6px rgba(0,0,0,0.18);
    transition: all .2s;
    user-select: none;
    line-height: 1.4;
}
.atf-tp-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(232, 255, 58, 0.7), 0 3px 10px rgba(0,0,0,0.22); }
.atf-tp-btn[data-pos="left"]  { left: 24px; }
.atf-tp-btn[data-pos="right"] { right: 24px; }
.atf-tp-btn-hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

@media (max-width: 768px) {
    .atf-tp-btn { bottom: 64px; padding: 10px 16px; font-size: 13px; }
    .atf-tp-btn[data-pos="left"]  { left: 14px; }
    .atf-tp-btn[data-pos="right"] { right: 14px; }
}

/* 遮罩 */
.atf-tp-mask {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 99991;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}
.atf-tp-mask.show { display: flex; }

/* 弹窗容器 */
.atf-tp-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 92vw;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 16px 60px rgba(0,0,0,0.18);
    position: relative;
}
.atf-tp-modal-qr   { width: 360px; padding: 24px; text-align: center; }
.atf-tp-modal-form { width: 540px; padding: 28px 28px 24px; }

@media (max-width: 600px) {
    .atf-tp-modal-qr   { width: 92vw; padding: 20px; }
    .atf-tp-modal-form { width: 92vw; padding: 22px 18px 18px; }
}

/* 关闭按钮 */
.atf-tp-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 28px; height: 28px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #888;
    font-size: 22px;
    line-height: 1;
    border-radius: 50%;
    transition: background .15s;
}
.atf-tp-close:hover { background: #f3f3f3; color: #333; }

/* 二维码弹窗 */
.atf-tp-qr-title    { font-size: 18px; font-weight: 600; color: #2C2C2C; margin: 4px 0 6px; }
.atf-tp-qr-subtitle { font-size: 13px; color: #666; margin: 0 0 16px; line-height: 1.55; }
.atf-tp-qr-img-wrap {
    position: relative;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 4px;
}
.atf-tp-qr-img      { max-width: 100%; max-height: 360px; height: auto; border-radius: 8px; display: block; margin: 0 auto; opacity: 0; transition: opacity .25s ease-in; }
.atf-tp-qr-img-wrap.loaded .atf-tp-qr-img { opacity: 1; }
.atf-tp-qr-spinner {
    position: absolute;
    top: 50%; left: 50%;
    width: 36px; height: 36px;
    margin: -18px 0 0 -18px;
    border: 3px solid #eee;
    border-top-color: #0E1116;
    border-radius: 50%;
    animation: atf-tp-spin 0.85s linear infinite;
    pointer-events: none;
    transition: opacity .2s;
}
.atf-tp-qr-img-wrap.loaded .atf-tp-qr-spinner { opacity: 0; }
@keyframes atf-tp-spin { to { transform: rotate(360deg); } }
.atf-tp-form-link   {
    display: inline-block;
    margin-top: 16px;
    padding: 8px 14px;
    color: #0E1116;
    font-size: 13px;
    text-decoration: none;
    border: 1.5px solid #0E1116;
    border-radius: 999px;
    transition: all .15s;
    cursor: pointer;
    font-weight: 600;
}
.atf-tp-form-link:hover { background: #E8FF3A; border-color: #0E1116; }

/* 表单弹窗 */
.atf-tp-form-title    { font-size: 18px; font-weight: 600; color: #2C2C2C; margin: 0 0 6px; }
.atf-tp-form-subtitle { font-size: 13px; color: #666; margin: 0 0 18px; line-height: 1.6; }

.atf-tp-field { margin-bottom: 14px; }
.atf-tp-field label.atf-tp-label {
    display: block;
    font-size: 13px;
    color: #444;
    margin-bottom: 5px;
    font-weight: 500;
}
.atf-tp-field label.atf-tp-label .req { color: #E1645B; margin-left: 2px; }

.atf-tp-input, .atf-tp-select {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 1px solid #DDD;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: #fff;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
}
.atf-tp-input:focus, .atf-tp-select:focus {
    border-color: #0E1116;
    box-shadow: 0 0 0 3px rgba(232, 255, 58, 0.45);
}

.atf-tp-checkboxes { display: flex; flex-wrap: wrap; gap: 8px; }
.atf-tp-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid #DDD;
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    background: #fff;
    transition: all .15s;
    user-select: none;
}
.atf-tp-chip input[type="checkbox"] { display: none; }
.atf-tp-chip:has(input:checked),
.atf-tp-chip.checked {
    background: #E8FF3A;
    border-color: #0E1116;
    color: #0E1116;
    font-weight: 600;
}

.atf-tp-error {
    color: #E1645B;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}
.atf-tp-field.has-error .atf-tp-input,
.atf-tp-field.has-error .atf-tp-select { border-color: #E1645B; }
.atf-tp-field.has-error .atf-tp-error { display: block; }

.atf-tp-submit {
    width: 100%;
    padding: 12px 18px;
    background: #0E1116;
    color: #E8FF3A;
    border: none;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
    margin-top: 8px;
    transition: all .2s;
}
.atf-tp-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(14, 17, 22, 0.32); background: #1a1d22; }
.atf-tp-submit:disabled { opacity: 0.6; cursor: wait; transform: none; box-shadow: none; }

.atf-tp-success {
    text-align: center;
    padding: 30px 16px;
}
.atf-tp-success-icon {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: #E8F5E9;
    color: #2E7D32;
    font-size: 32px;
    line-height: 56px;
    margin: 0 auto 12px;
}
.atf-tp-success-text { font-size: 15px; color: #333; line-height: 1.7; }
