/* Tianai Captcha (TAC) CSS */
.tac-container {
    width: 100%;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.tac-bg-img {
    position: relative;
    width: 250px;
    height: 200px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto 10px;
}

.tac-slider-block {
    position: absolute;
    left: 0;
    top: 0;
    width: 50px;
    height: 50px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 4px;
    box-shadow: 0 0 3px rgba(0,0,0,0.3), 0 0 6px rgba(255,255,255,0.6) inset;
    transition: left 0.1s ease;
    z-index: 10;
    cursor: move;
}

.tac-track {
    position: relative;
    width: 250px;
    height: 30px;
    background-color: #f0f0f0;
    border-radius: 15px;
    margin: 0 auto;
    overflow: hidden;
    box-shadow: 0 0 2px rgba(0,0,0,0.1) inset;
}

.tac-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    border-radius: 15px;
    width: 0;
    transition: width 0.1s ease;
}

.tac-button {
    position: absolute;
    left: 0;
    top: -5px;
    width: 40px;
    height: 40px;
    background: #fff;
    border: 2px solid #4CAF50;
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: left 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tac-button:active {
    cursor: grabbing;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.tac-button:before {
    content: '';
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #4CAF50;
    transform: rotate(90deg);
}

/* 验证成功状态 */
.tac-success .tac-progress {
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
}

.tac-success .tac-button {
    border-color: #4CAF50;
    background: #4CAF50;
}

.tac-success .tac-button:before {
    border-top-color: #fff;
}

/* 验证失败状态 */
.tac-fail .tac-progress {
    background: linear-gradient(90deg, #f44336, #e57373);
}

.tac-fail .tac-button {
    border-color: #f44336;
    background: #f44336;
}

.tac-fail .tac-button:before {
    border-top-color: #fff;
}

/* 加载状态 */
.tac-loading {
    position: relative;
}

.tac-loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #4CAF50;
    border-radius: 50%;
    animation: tac-spin 1s linear infinite;
}

@keyframes tac-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 320px) {
    .tac-bg-img,
    .tac-track {
        width: 200px;
    }
    
    .tac-bg-img {
        height: 160px;
    }
}
