/* ================================================================
   UAM 活动完成奖励样式
   适用：弹窗（#uam-completion-modal）+ 独立证书页（.uam-completion-page）
   ================================================================ */

/* ── 弹窗遮罩 ───────────────────────────────────────────────── */
#uam-completion-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
}

#uam-completion-modal .uam-cm-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
}

/* ── 证书卡片（弹窗 & 独立页共用） ─────────────────────────── */
.uam-cm-box,
.uam-completion-page .uam-cert-card {
    position: relative;
    background: linear-gradient(155deg, #1a1a2e 0%, #16213e 55%, #0f3460 100%);
    color: #fff;
    border-radius: 20px;
    padding: 44px 32px 32px;
    max-width: 430px;
    width: 100%;
    text-align: center;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 215, 0, 0.22);
    box-sizing: border-box;
}

/* 弹窗限制最大高度，超出可滚动 */
#uam-completion-modal .uam-cm-box {
    max-height: 90vh;
    overflow-y: auto;
}

/* ── 关闭按钮 ────────────────────────────────────────────────── */
.uam-cm-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #bbb;
    font-size: 16px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 30px;
    padding: 0;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.uam-cm-close:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

/* ── 证书头部 ────────────────────────────────────────────────── */
.uam-cm-header {
    margin-bottom: 24px;
}

.uam-cm-trophy {
    display: block;
    font-size: 68px;
    margin-bottom: 10px;
    animation: uamTrophyIn 0.7s cubic-bezier(.22,1,.36,1) both;
}

@keyframes uamTrophyIn {
    from { transform: scale(0) rotate(-20deg); opacity: 0; }
    to   { transform: scale(1) rotate(0deg);   opacity: 1; }
}

.uam-cm-title {
    color: #ffd700;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px;
    letter-spacing: 1px;
}

.uam-cm-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

/* ── 证书主体 ────────────────────────────────────────────────── */
.uam-cm-body {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: 14px;
    padding: 22px 18px;
    margin-bottom: 22px;
}

.uam-cm-explorer-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.uam-cm-username {
    font-size: 26px;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 20px;
    word-break: break-word;
}

/* 统计数字组 */
.uam-cm-stats {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-bottom: 18px;
}

.uam-cm-stat .n {
    display: block;
    font-size: 34px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.uam-cm-stat .l {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 5px;
    letter-spacing: 0.5px;
}

.uam-cm-time {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 4px;
}

/* ── 按钮组 ──────────────────────────────────────────────────── */
.uam-cm-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.uam-cm-btn {
    display: block;
    width: 100%;
    padding: 13px 18px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: opacity 0.18s, transform 0.15s;
    box-sizing: border-box;
    line-height: 1.3;
}

.uam-cm-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
    text-decoration: none;
}

.uam-cm-btn-share {
    background: #07c160;
    color: #fff;
}

.uam-cm-btn-back {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* ================================================================
   独立完成页（[uam_activity_completion] 短代码渲染的容器）
   ================================================================ */
.uam-completion-page {
    max-width: 500px;
    margin: 40px auto;
    padding: 0 16px;
}

.uam-completion-page .uam-cert-card {
    max-width: 100%;
    margin: 0 auto;
}

/* 页面顶部标语 */
.uam-completion-page-intro {
    text-align: center;
    margin-bottom: 24px;
    color: #666;
    font-size: 15px;
}

/* 未完成状态提示 */
.uam-completion-pending {
    text-align: center;
    padding: 50px 20px;
    background: #f9f9f9;
    border-radius: 16px;
    border: 2px dashed #ddd;
}

.uam-completion-pending .uam-pending-icon {
    font-size: 56px;
    display: block;
    margin-bottom: 16px;
}

.uam-completion-pending h3 {
    color: #333;
    margin: 0 0 10px;
    font-size: 20px;
}

.uam-completion-pending p {
    color: #888;
    margin: 0 0 6px;
    font-size: 14px;
}

.uam-completion-pending .progress-bar-wrap {
    background: #e8e8e8;
    border-radius: 20px;
    height: 10px;
    margin: 16px auto 6px;
    max-width: 260px;
    overflow: hidden;
}

.uam-completion-pending .progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #07c160, #0073aa);
    border-radius: 20px;
    transition: width 0.4s;
}

.uam-completion-pending .progress-text {
    font-size: 13px;
    color: #999;
}

/* 未登录提示 */
.uam-completion-login-notice {
    text-align: center;
    padding: 50px 20px;
    background: #fff8e1;
    border-radius: 14px;
    border: 1px solid #ffe082;
    color: #7a5c00;
}

.uam-completion-login-notice a {
    display: inline-block;
    margin-top: 14px;
    padding: 10px 24px;
    background: #0073aa;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

/* ── 响应式 ──────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .uam-cm-box,
    .uam-completion-page .uam-cert-card {
        padding: 36px 20px 24px;
    }

    .uam-cm-trophy { font-size: 54px; }
    .uam-cm-title  { font-size: 18px; }
    .uam-cm-username { font-size: 22px; }
    .uam-cm-stat .n  { font-size: 28px; }
    .uam-cm-stats    { gap: 18px; }
    .uam-cm-btn      { font-size: 14px; padding: 11px 14px; }
}
