/* ===============================================
   帝国CMS点赞插件样式表 v2.0 - 极光美学版
   文件位置: e/extend/digg/css/digg.css
   新增: 居中显示 + 距离顶部20px
   =============================================== */

/* ========== 外层容器 - 用于居中定位 ========== */
.digg-plugin-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 20px;          /* 距离顶部20px */
    margin-bottom: 0;
}

/* 如果希望容器本身不占满整行，使用以下方式 */
.digg-plugin-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 20px;
}

/* 主容器 - 极光玻璃质感 (内层按钮容器) */
.digg-love-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(145deg, #ffffff 0%, #fff9f5 100%);
    padding: 6px 24px 6px 20px;
    border-radius: 100px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(249, 115, 22, 0.15);
    transition: all 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.2);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

/* 如果希望按钮容器本身居中且距离顶部20px，直接在外层设置即可 */
/* 上述 .digg-plugin-container 已实现该效果 */

.digg-love-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.2), 0 0 0 1px rgba(249, 115, 22, 0.4);
    background: linear-gradient(145deg, #ffffff, #fff5ed);
}

.digg-love-wrapper:active {
    transform: translateY(1px);
}

/* ========== 点赞按钮 ========== */
.digg-button-core {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px 0;
    font-family: inherit;
    transition: all 0.25s ease;
    position: relative;
}

/* 拇指图标容器 - 带渐变 */
.thumb-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #fff0e6, #ffe4d0);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.digg-love-wrapper:hover .thumb-icon-wrapper {
    background: linear-gradient(135deg, #ffedd5, #ffdec2);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
    transform: scale(1.05);
}

.thumb-up-icon {
    font-size: 1.35rem;
    display: inline-block;
    transition: transform 0.25s cubic-bezier(0.34, 1.2, 0.64, 1);
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1));
}

/* 按钮文字 */
.btn-label {
    font-weight: 650;
    font-size: 0.95rem;
    color: #c2410c;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #c2410c, #ea580c);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.25s;
}

.digg-love-wrapper:hover .btn-label {
    background: linear-gradient(135deg, #ea580c, #f97316);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transform: translateX(2px);
}

/* ========== 数量显示区域 ========== */
.digg-counter-area {
    display: flex;
    align-items: baseline;
    gap: 4px;
    padding-left: 12px;
    border-left: 1.5px solid rgba(249, 115, 22, 0.25);
}

.digg-number-value {
    font-size: 1.45rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ea580c, #f97316);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    transition: all 0.2s;
    font-feature-settings: "tnum";
    min-width: 2rem;
    text-align: center;
}

.digg-unit-text {
    font-size: 0.7rem;
    font-weight: 600;
    color: #b45309;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

/* ========== 动效区 ========== */
/* 点击时的爆炸效果 */
.thumb-click-animation .thumb-icon-wrapper {
    animation: thumbExplode 0.45s cubic-bezier(0.34, 1.2, 0.64, 1);
}

@keyframes thumbExplode {
    0% { transform: scale(1); background: #ffe4d0; }
    40% { transform: scale(1.25); background: #f97316; box-shadow: 0 0 0 6px rgba(249, 115, 22, 0.3); }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); background: #ffe4d0; }
}

.thumb-click-animation .thumb-up-icon {
    animation: iconPop 0.4s ease-out;
}

@keyframes iconPop {
    0% { transform: scale(1); }
    30% { transform: scale(1.4) rotate(10deg); }
    70% { transform: scale(1.1) rotate(-3deg); }
    100% { transform: scale(1) rotate(0); }
}

/* 数字跳动效果 */
.count-update-effect {
    animation: numberBounce 0.35s cubic-bezier(0.34, 1.2, 0.64, 1);
}

@keyframes numberBounce {
    0% { transform: scale(1); opacity: 0.8; }
    30% { transform: scale(1.5); background: linear-gradient(135deg, #f97316, #fdba74); background-clip: text; -webkit-background-clip: text; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* 加载状态 */
.digg-busy {
    pointer-events: none;
    opacity: 0.7;
}

.digg-busy .thumb-icon-wrapper {
    animation: loadingPulse 0.8s infinite;
}

@keyframes loadingPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 2px 6px rgba(0,0,0,0.05); }
    50% { transform: scale(1.08); box-shadow: 0 4px 14px rgba(249, 115, 22, 0.4); background: #ffdec2; }
}

/* ========== Toast 通知 - 更精美 ========== */
.digg-toast-message {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(40px);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.92), rgba(30, 20, 15, 0.95));
    backdrop-filter: blur(28px);
    color: #fff7ed;
    padding: 12px 32px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10086;
    font-family: system-ui, 'Segoe UI', sans-serif;
    white-space: nowrap;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 215, 170, 0.2);
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.2);
    opacity: 0;
    pointer-events: none;
    letter-spacing: 0.3px;
}

.digg-toast-message.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-emoji {
    font-size: 1.2rem;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

/* ========== 响应式 ========== */
@media (max-width: 640px) {
    .digg-love-wrapper {
        padding: 4px 16px 4px 12px;
        gap: 6px;
    }
    .thumb-icon-wrapper {
        width: 30px;
        height: 30px;
    }
    .thumb-up-icon {
        font-size: 1.1rem;
    }
    .btn-label {
        font-size: 0.85rem;
    }
    .digg-number-value {
        font-size: 1.2rem;
    }
    .digg-unit-text {
        font-size: 0.6rem;
    }
    .digg-counter-area {
        padding-left: 8px;
    }
    .digg-plugin-container {
        margin-top: 20px;
    }
}

/* ========== 暗色模式优雅适配 ========== */
@media (prefers-color-scheme: dark) {
    .digg-love-wrapper {
        background: linear-gradient(145deg, #2a241e, #1f1b16);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(249, 115, 22, 0.3);
    }
    .digg-love-wrapper:hover {
        background: linear-gradient(145deg, #3d3026, #2a241e);
        box-shadow: 0 12px 28px rgba(249, 115, 22, 0.25), 0 0 0 1px rgba(249, 115, 22, 0.5);
    }
    .thumb-icon-wrapper {
        background: linear-gradient(135deg, #3d2c1e, #33251a);
    }
    .digg-love-wrapper:hover .thumb-icon-wrapper {
        background: linear-gradient(135deg, #4f3824, #3d2c1e);
    }
    .btn-label {
        background: linear-gradient(135deg, #fdba74, #f97316);
        background-clip: text;
        -webkit-background-clip: text;
    }
    .digg-number-value {
        background: linear-gradient(135deg, #fdba74, #f97316);
        background-clip: text;
        -webkit-background-clip: text;
    }
    .digg-counter-area {
        border-left-color: rgba(253, 186, 116, 0.3);
    }
}