/**
 * authModal.css
 * 全局统一用户端登录模态框样式系统
 * 融合双态自适应（营销获客态 vs 常态极简态），兼容移动端 Bottom Sheet 与桌面端 Center Modal。
 */

.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 13500;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* 背景毛玻璃遮罩 */
.auth-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(8, 12, 20, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
}

/* 弹窗主体卡片 (移动端默认为底部抽屉 Bottom Sheet) */
.auth-modal-sheet {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 500px;
    background: linear-gradient(180deg, #182234 0%, #0d1522 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    padding: 16px 20px 28px;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    max-height: 90vh;
    overflow-y: auto;
}

.auth-modal-overlay.is-active .auth-modal-sheet {
    transform: translateY(0);
}

/* 顶部下拉手柄 (移动端适用) */
.auth-modal-drag-handle {
    width: 36px;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    margin: 0 auto 12px;
}

/* 关闭按钮 */
.auth-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.auth-modal-close:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

/* 头部视觉区 */
.auth-modal-header {
    text-align: center;
    margin-bottom: 16px;
}

.auth-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 20px;
    color: #f59e0b;
    font-size: 11.5px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.auth-badge-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.auth-brand-logo {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #94a3b8;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.auth-modal-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.35;
}

.auth-modal-subtitle {
    margin: 0;
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.45;
}

/* ========================================================
   状态 A：【营销获客态】拟物化优惠券卡片 (Ticket Chip)
   ======================================================== */
.auth-ticket-card {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(0, 136, 204, 0.12) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.08);
}

.auth-ticket-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.auth-ticket-left {
    flex: 0 0 auto;
    text-align: center;
    padding-right: 12px;
}

.auth-ticket-amount {
    color: #f59e0b;
    font-weight: 800;
    line-height: 1;
    display: flex;
    align-items: baseline;
    justify-content: center;
}

.auth-ticket-symbol {
    font-size: 14px;
    margin-right: 1px;
}

.auth-ticket-val {
    font-size: 26px;
}

.auth-ticket-rule {
    font-size: 11px;
    color: rgba(245, 158, 11, 0.85);
    margin-top: 4px;
    white-space: nowrap;
}

.auth-ticket-divider {
    width: 1px;
    height: 36px;
    background: dashed rgba(245, 158, 11, 0.35);
    border-left: 1px dashed rgba(245, 158, 11, 0.4);
    margin-right: 12px;
}

.auth-ticket-right {
    flex: 1;
    min-width: 0;
}

.auth-ticket-tag {
    font-size: 11px;
    font-weight: 600;
    color: #38bdf8;
    margin-bottom: 2px;
}

.auth-ticket-name {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-ticket-status {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

/* 双阶梯对比提示条 */
.auth-tiered-tip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.auth-tiered-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
}

.auth-tiered-row.is-google {
    color: #94a3b8;
}

.auth-tiered-row.is-telegram {
    color: #38bdf8;
    font-weight: 600;
}

.auth-tiered-badge {
    padding: 1px 5px;
    background: #0088cc;
    color: #fff;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    margin-right: 4px;
}

/* ========================================================
   状态 B：【常态极简态】核心价值提炼条
   ======================================================== */
.auth-value-props-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 12px 8px;
    margin-bottom: 18px;
    text-align: center;
}

.auth-prop-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.auth-prop-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 4px;
}

.auth-prop-svg {
    width: 18px;
    height: 18px;
    display: block;
}

.auth-prop-label {
    font-size: 11px;
    color: #cbd5e1;
    white-space: nowrap;
}

/* ========================================================
   登录渠道按钮区 (CTA Action Buttons)
   ======================================================== */
.auth-channel-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.auth-btn {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    text-align: left;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
    text-decoration: none;
}

.auth-btn:active {
    transform: scale(0.985);
}

/* Telegram 按钮（主推） */
.auth-btn-telegram {
    background: linear-gradient(135deg, #0088cc 0%, #0077b5 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 136, 204, 0.35);
}

.auth-btn-telegram:hover {
    background: linear-gradient(135deg, #0ba2ef 0%, #0088cc 100%);
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.45);
}

.auth-btn-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin-right: 12px;
}

.auth-btn-telegram .auth-btn-icon-wrap {
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.auth-btn-icon {
    width: 24px;
    height: 24px;
    display: block;
}

.auth-btn-content {
    flex: 1;
    min-width: 0;
}

.auth-btn-main {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
}

.auth-btn-sub {
    font-size: 11px;
    opacity: 0.85;
    margin-top: 2px;
}

.auth-btn-arrow {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.75;
    margin-left: 8px;
}

/* Google 按钮 */
.auth-btn-google {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.auth-btn-google:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.25);
}

.auth-btn-google .auth-btn-icon-wrap {
    background: rgba(255, 255, 255, 0.08);
}

/* Mini App 辅助按钮样式 */
.auth-btn-mini {
    margin-top: 4px;
    padding: 10px 14px;
    background: rgba(0, 136, 204, 0.08);
    border-color: rgba(0, 136, 204, 0.2);
    justify-content: center;
    text-align: center;
}

.auth-btn-mini:hover {
    background: rgba(0, 136, 204, 0.14);
}

.auth-btn-mini-text {
    font-size: 13px;
    color: #38bdf8;
    font-weight: 500;
}

/* 访客免登旁路 (Dismiss / Guest Bypass) 与安全提示 */
.auth-modal-footer,
.auth-dismiss-row {
    text-align: center;
    margin-top: 8px;
}

.auth-guest-link,
.auth-dismiss-btn {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 12px;
    cursor: pointer;
    padding: 6px 12px;
    transition: color 0.2s ease;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-guest-link:hover,
.auth-dismiss-btn:hover {
    color: #cbd5e1;
}

.auth-guest-note {
    font-size: 11.5px;
    color: #64748b;
    text-align: center;
    letter-spacing: 0.2px;
}

/* ========================================================
   桌面端适配 (Desktop Center Modal >= 768px)
   ======================================================== */
@media (min-width: 768px) {
    .auth-modal-overlay {
        align-items: center;
    }

    .auth-modal-sheet {
        border-radius: 18px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        max-width: 440px;
        padding: 24px 26px 28px;
        transform: scale(0.94) translateY(10px);
        transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    }

    .auth-modal-overlay.is-active .auth-modal-sheet {
        transform: scale(1) translateY(0);
    }

    .auth-modal-drag-handle {
        display: none;
    }
}
