/* ============ 网页自动刷新 - 工具专属样式 ============ */
/* 其余布局/卡片/按钮/说明样式均复用 common.css 公共样式 */

.refresh-container {
    color: #1e293b;
}

.refresh-container .settings-card {
    margin-bottom: 20px;
}

.settings-row {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
}

.settings-left {
    flex: 1;
    min-width: 300px;
    padding-right: 20px;
    border-right: 2px solid #f3e8ff;
}

.settings-right {
    flex: 2;
    min-width: 400px;
}

.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.form-row .setting-group {
    flex: 1;
    min-width: 140px;
}

.setting-group {
    margin-bottom: 16px;
}

.id-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    color: #374151;
    background: #fff;
    outline: none;
    box-sizing: border-box;
}

.id-input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.id-input::placeholder {
    letter-spacing: 0;
    font-size: 14px;
}

.input-hint {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 6px;
}

.select-with-input {
    display: flex;
    gap: 8px;
}

.select-with-input .custom-input {
    flex: 0 0 100px;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.checkbox-grid .setting-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
}

/* 勾选框样式复用 common.css 全局紫色勾选框 */

.button-group {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 2px solid #f3e8ff;
}

.button-group .btn {
    width: auto;
    min-width: 140px;
    margin-bottom: 0;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.running {
    background: #10b981;
    color: white;
}

.status-badge.stopped {
    background: #ef4444;
    color: white;
}

.status-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: #f3e8ff;
    border-bottom: 1px solid #e9d5ff;
    flex-wrap: wrap;
}

.status-info {
    font-size: 13px;
    color: #6b21a8;
}

.preview-content {
    padding: 14px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.preview-url {
    font-size: 11px;
    color: #9ca3af;
    font-weight: normal;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-iframe {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    height: 300px;
    overflow: hidden;
    position: relative;
}

.preview-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background: #f9fafb;
    font-size: 13px;
    color: #6b21a8;
}

.loading-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(139, 92, 246, 0.2);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.preview-error {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: #fef2f2;
    font-size: 13px;
    color: #ef4444;
    padding: 16px;
    text-align: center;
}

.background-hint {
    margin-top: 14px;
    padding: 12px 16px;
    background: #f3e8ff;
    border: 1px dashed #c4b5fd;
    border-radius: 8px;
    font-size: 13px;
    color: #6b21a8;
    text-align: center;
}

.preview-frame {
    width: 100%;
    height: 100%;
}

.preview-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #f9fafb;
}

.placeholder-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.preview-placeholder p {
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
}

.log-panel {
    border-top: 1px solid #e9d5ff;
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f8fafc;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
}

.log-actions {
    display: flex;
    gap: 8px;
}

.btn-clear-log {
    padding: 3px 8px;
    font-size: 11px;
    background: #e2e8f0;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    color: #64748b;
}

.btn-clear-log:hover {
    background: #cbd5e1;
}

.log-content {
    max-height: 150px;
    overflow-y: auto;
    padding: 10px;
}

.log-item {
    font-size: 12px;
    padding: 5px 0;
    border-bottom: 1px solid #e2e8f0;
}

.log-item:last-child {
    border-bottom: none;
}

.log-time {
    color: #94a3b8;
    margin-right: 8px;
}

.log-message {
    color: #374151;
}

.log-item.success .log-message {
    color: #10b981;
}

.log-item.warning .log-message {
    color: #f59e0b;
}

.log-item.error .log-message {
    color: #ef4444;
}

.log-empty {
    text-align: center;
    color: #9ca3af;
    font-size: 12px;
    padding: 20px;
}

/* ============ 响应式 ============ */
@media (max-width: 768px) {
    .settings-row {
        flex-direction: column;
    }
    .settings-left {
        padding-right: 0;
        border-right: none;
        border-bottom: 2px solid #f3e8ff;
        padding-bottom: 20px;
    }
}
