body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.verify-container {
    position: relative;
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: min(340px, 90vw);
    margin: 15px;
}

.verify-title {
    margin-top: 30px;
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-size: 15px;
    font-weight: 500;
}

.slider-container {
    position: relative;
    width: 100%;
    max-width: 300px;
    height: auto;
    aspect-ratio: 3/2;
    overflow: hidden;
    margin: 40px auto 0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.slider-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-block {
    position: absolute;
    width: 25%;
    height: 35%;
    cursor: pointer;
    z-index: 2;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    margin: -10px auto;
}

.slider-bar {
    position: relative;
    width: 100%;
    max-width: 300px;
    height: 40px;
    background: #f0f2f5;
    border-radius: 20px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
}

.slider-bar::before {
    content: '向右滑动验证';
    position: absolute;
    width: 100%;
    height: 100%;
    color: #999;
    text-align: center;
    line-height: 40px;
    font-size: 14px;
    user-select: none;
    z-index: 1;
}

.slider-button {
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    z-index: 3;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-button:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.slider-button::before {
    content: '';
    width: 12px;
    height: 12px;
    border: solid #666;
    border-width: 2px 2px 0 0;
    transform: rotate(45deg);
    margin-left: -4px;
}

.refresh-button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    transition: transform 0.3s;
}

.refresh-button:hover {
    transform: rotate(180deg);
}

@keyframes success-animation {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.success .slider-button {
    background: #52c41a;
    animation: success-animation 0.5s ease-out;
}

.success .slider-button::before {
    border-color: white;
}

.error .slider-button {
    background: #ff7875;
    transition: all 0.3s ease;
}

.error-tip, .success-tip {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 10px;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
}

.error-tip {
    background: rgba(255, 120, 117, 0.1);
    color: #ff4d4f;
    border: 1px solid rgba(255, 120, 117, 0.2);
}

.success-tip {
    background: rgba(82, 196, 26, 0.1);
    color: #52c41a;
    border: 1px solid rgba(82, 196, 26, 0.2);
}

.error .error-tip,
.success .success-tip {
    opacity: 1;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

.error .slider-button {
    animation: shake 0.4s ease-in-out;
}

@media (max-width: 480px) {
    .verify-container {
        width: 90%;
        padding: 4% 5%;
        margin: 4% auto;
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .slider-container {
        width: 90%;
        aspect-ratio: 2/1.5;
        margin: 5% auto;
    }

    .slider-block {
        width: 20%;  /* 相对于容器的宽度 */
        height: auto;
        aspect-ratio: 1/1;  /* 保持正方形 */
        margin: 0;
    }

    .slider-bar {
        width: 90%;
        height: 12%;  /* 相对于容器的高度 */
        margin: 5% auto;
    }

    .slider-button {
        width: 12%;  /* 相对于滑动条的宽度 */
        height: 100%;  /* 与滑动条等高 */
        aspect-ratio: 1/1;
    }

    .verify-title {
        font-size: 5vw;  /* 相对于视窗宽度 */
        margin: 4% 0;
    }

    .error-tip, .success-tip {
        font-size: 3.5vw;
        padding: 2% 4%;
    }
}

@media (max-width: 320px) {
    .slider-container {
        width: 280px;
    }

    .slider-button {
        width: 45px;
        height: 45px;
    }
}

.error-tip {
    transition: opacity 0.5s;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}