* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* 按钮容器 - 用于居中 */
.draw-btn-container {
    width: 100%;
    display: flex;
    justify-content: center;  /* 水平居中 */
    align-items: center;      /* 垂直居中 */
    margin-top: 20px;         /* 与上方内容的间距 */
    margin-bottom: 10px;      /* 与底部按钮的间距 */
}

/* 按钮容器 */
.attack-btn {
    --inner-radius: 50px;     /* 内圆半径 - 调小一点更适合手机 */
    --outer-radius: 62px;      /* 内圆半径 + 22px */
    --center-x: 50%;
    --center-y: 50%;

    position: relative;
    width: calc(2 * var(--outer-radius));  /* 164px */
    height: calc(2 * var(--outer-radius)); /* 164px */
    border: none;
    background: transparent;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;

    /* 让所有伪层都基于此定位 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 最外层的“光晕”装饰环 */
.attack-btn::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(
        circle at center,
        rgba(237, 203, 201, 0.65) 0%,
        rgba(237, 203, 201, 0.2) 75%,
        transparent 90%
    );
    filter: blur(3px);
    opacity: 0.7;
    z-index: 0;
    pointer-events: none;
}

/* 主体：同心圆两层 */
.btn-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #edcbc9;
    z-index: 1;
    transition: box-shadow 0.15s ease, transform 0.1s ease;
}

/* 内圆 */
.inner-core {
    position: absolute;
    width: calc(2 * var(--inner-radius));          /* 直径120px - 更适合手机 */
    height: calc(2 * var(--inner-radius));
    border-radius: 50%;
    background-color: #f5542d;
    z-index: 2;
    box-shadow: 0 0 40px rgba(245, 84, 45, 0.5);

    /* 文字居中 */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    /* 字体样式 */
    color: white;
    font-weight: 800;
    font-size: 28px;        /* 调小一点 */
    letter-spacing: 2px;
    text-shadow: 0 2px 8px #a82300, 0 0 20px #ffb577;
    text-transform: uppercase;

    /* 渐变效果 */
    background-image: radial-gradient(circle at 30% 30%, #ff7b50, #d43f1a);
    background-blend-mode: overlay;
}

/* 动态按压力度反馈 */
.attack-btn:active .btn-ring {
    transform: scale(0.96);
}

.attack-btn:active .inner-core {
    transform: scale(0.96);
    transition: transform 0.08s;
    background-image: radial-gradient(circle at 30% 30%, #ff9465, #c0320e);
}

/* 针对小屏幕再调整 */
@media (max-width: 380px) {
    .attack-btn {
        --inner-radius: 45px;
        --outer-radius: 57px;
    }

    .inner-core {
        width: calc(2 * var(--inner-radius));;
        height: calc(2 * var(--inner-radius));;
        font-size: 26px;
    }
}
/* 加载动画 - 科技感旋转环 */
.attack-btn .loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #00ffff, #ff00ff, #00ffff);
    mask: radial-gradient(circle, transparent 60%, black 61%);
    -webkit-mask: radial-gradient(circle, transparent 60%, black 61%);
    animation: spin 1s linear infinite;
    display: none;
    z-index: 10;
    pointer-events: none; /* 防止遮挡按钮点击 */
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 按钮禁用状态下显示动画 */
.attack-btn.disabled .loading-spinner {
    display: block;
}

/* 可选：让按钮文字半透明 */
.attack-btn.disabled .inner-core {
    opacity: 0.6;
}

.attack-btn .loading-spinner::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    border: 2px solid rgba(0, 255, 255, 0.3);
    animation: pulse 1.5s ease-out infinite;
    pointer-events: none;
}

@keyframes pulse {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}
/* 新增：抽奖加载容器样式 */
.draw-loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    backdrop-filter: blur(5px);
}

.draw-loading-content {
    position: relative;
    width: 280px;
    height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 科技光环效果 */
.tech-ring-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin-bottom: 20px;
}

.tech-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #00ffff;
    animation: ringRotate 2s linear infinite;
}

.tech-ring2 {
    border-top-color: transparent;
    border-right-color: #ff00ff;
    animation-delay: 0.3s;
}

.tech-ring3 {
    border-top-color: transparent;
    border-bottom-color: #00ff88;
    animation-delay: 0.6s;
}

@keyframes ringRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 加载文字 */
.loading-text {
    color: white;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* 进度条容器 */
.progress-bar-container {
    width: 80%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00ffff, #ff00ff, #00ff88);
    background-size: 200% 100%;
    animation: progressGlow 1.5s linear infinite;
    border-radius: 4px;
}

@keyframes progressGlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* 粒子效果容器 */
.particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* 粒子样式 */
.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
    animation: particleFloat 4s linear infinite;
    opacity: 0;
}

@keyframes particleFloat {
    0% {
        transform: translate(0, 0) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    50% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(1);
        opacity: 0;
    }
}
/* 悬浮分享按钮 - 右侧垂直居中 */
.float-share-btn {
    position: fixed;
    top: 73%;               /* 垂直居中 */
    right: 20px;            /* 距离右侧20像素 */
    transform: translateY(-50%); /* 精确垂直居中 */
    z-index: 200;         /* 确保在最上层 */

    background: linear-gradient(135deg, #ff6b35, #e63946);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(230, 57, 70, 0.3);
    transition: transform 0.2s, opacity 0.2s;
}

.float-share-btn:active {
    transform: translateY(-40%) scale(0.98); /* 保持垂直居中同时缩放 */
    opacity: 0.8;
}

/* 移动端适配：适当调整间距和大小 */
@media (max-width: 480px) {
    .float-share-btn {
        right: 10px;
        padding: 10px 16px;
        font-size: 14px;
    }
}