/* 蜘蛛模拟器专用样式 */

/* ========== 表单区域 ========== */
.tool-page .form-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.tool-page .form-section .section-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0e0e0;
}

.tool-page .form-group {
    margin-bottom: 20px;
}

.tool-page .form-group:last-child {
    margin-bottom: 0;
}

.tool-page .form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 8px;
}

.tool-page .form-input,
.tool-page .form-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.tool-page .form-input:focus,
.tool-page .form-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.tool-page .form-input::placeholder {
    color: #95a5a6;
}

.tool-page .form-help {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 6px;
}

/* ========== 复选框组 ========== */
.tool-page .checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 0;
}

.tool-page .checkbox-group:last-child {
    margin-bottom: 0;
}

.tool-page .checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    flex-shrink: 0;
}

.tool-page .checkbox-group label {
    font-size: 14px;
    color: #34495e;
    cursor: pointer;
    margin: 0;
    user-select: none;
}

/* ========== 按钮样式 ========== */
.tool-page .button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tool-page .btn {
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tool-page .btn i {
    font-size: 14px;
}

.tool-page .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.tool-page .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.tool-page .btn-primary:active {
    transform: translateY(0);
}

.tool-page .btn-secondary {
    background: #ecf0f1;
    color: #34495e;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.tool-page .btn-secondary:hover {
    background: #d5dbdb;
}

/* ========== 进度条样式 ========== */
.tool-page .progress-bar {
    width: 100%;
    height: 24px;
    background-color: #ecf0f1;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin-bottom: 10px;
}

.tool-page .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db 0%, #2ecc71 100%);
    border-radius: 12px;
    transition: width 0.4s ease;
    width: 0;
    position: relative;
    overflow: hidden;
}

.tool-page .progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: progressShine 1.5s infinite;
}

@keyframes progressShine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.tool-page .progress-text {
    font-size: 14px;
    color: #34495e;
    text-align: center;
    font-weight: 500;
}

/* ========== 结果区域 ========== */
.tool-page .result-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    margin-top: 20px;
}

.tool-page .result-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #ecf0f1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tool-page .result-title i {
    color: #27ae60;
    font-size: 22px;
}

.tool-page .result-content {
    line-height: 1.8;
}

.tool-page .result-group {
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 16px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.tool-page .result-group:last-child {
    margin-bottom: 0;
}

.tool-page .result-group h4 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 12px 0;
}

.tool-page .result-group p {
    margin: 8px 0;
    font-size: 14px;
    color: #34495e;
}

.tool-page .result-group strong {
    color: #2c3e50;
    font-weight: 600;
}

.tool-page .result-group pre {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.6;
    margin: 12px 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.tool-page .result-group ul {
    margin: 12px 0;
    padding-left: 24px;
}

.tool-page .result-group li {
    margin: 6px 0;
    font-size: 14px;
    color: #34495e;
}

/* ========== 消息提示 ========== */
.tool-page .message {
    padding: 16px 20px;
    border-radius: 8px;
    margin: 16px 0;
    font-size: 14px;
    line-height: 1.6;
}

.tool-page .message.error {
    background: #fee;
    border-left: 4px solid #e74c3c;
    color: #c0392b;
}

.tool-page .message.success {
    background: #d4edda;
    border-left: 4px solid #27ae60;
    color: #155724;
}

.tool-page .message.info {
    background: #d1ecf1;
    border-left: 4px solid #3498db;
    color: #0c5460;
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .tool-page .form-section {
        padding: 16px;
    }

    .tool-page .button-group {
        flex-direction: column;
    }

    .tool-page .btn {
        width: 100%;
        justify-content: center;
    }

    .tool-page .result-section {
        padding: 16px;
    }

    .tool-page .result-title {
        font-size: 18px;
    }

    .tool-page .result-group {
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .tool-page .form-input,
    .tool-page .form-select {
        font-size: 16px; /* 防止 iOS 自动缩放 */
    }

    .tool-page .result-group pre {
        font-size: 12px;
        padding: 12px;
    }
}
