* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

header h1 {
    font-size: 2em;
    margin-bottom: 10px;
}

header p {
    opacity: 0.9;
    font-size: 0.95em;
}

.input-section {
    padding: 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.protocol-select {
    padding: 14px 10px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    font-size: 1em;
    background: #fff;
    cursor: pointer;
    outline: none;
    color: #333;
    min-width: 95px;
}

.protocol-select:focus {
    border-color: #667eea;
}

.input-group input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.input-group button {
    padding: 14px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.input-group button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.input-group button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.options label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.9em;
    color: #666;
}

.options input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.progress-section {
    padding: 25px 30px;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.progress-bar {
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 6px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-detail {
    font-size: 0.8em;
    color: #888;
    word-break: break-all;
}

.log-section, .stats-section, .iframe-container {
    padding: 25px 30px;
    border-bottom: 1px solid #e9ecef;
}

.log-section h3, .stats-section h3, .iframe-container h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1em;
}

.log-content {
    max-height: 300px;
    overflow-y: auto;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    font-size: 0.85em;
    font-family: 'Consolas', 'Monaco', monospace;
}

.log-item {
    padding: 4px 0;
    border-bottom: 1px solid #eee;
    word-break: break-all;
}

.log-item.success { color: #28a745; }
.log-item.error { color: #dc3545; }

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

.stat-card {
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    background: #f8f9fa;
}

.stat-card.success { border-top: 4px solid #28a745; }
.stat-card.fail { border-top: 4px solid #dc3545; }
.stat-card.total { border-top: 4px solid #667eea; }

.stat-number {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-card.success .stat-number { color: #28a745; }
.stat-card.fail .stat-number { color: #dc3545; }
.stat-card.total .stat-number { color: #667eea; }

.stat-label {
    color: #888;
    font-size: 0.9em;
}

iframe {
    width: 100%;
    height: 400px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
}

footer {
    padding: 20px 30px;
    background: #f8f9fa;
    text-align: center;
    color: #888;
    font-size: 0.85em;
    line-height: 1.8;
}

footer strong {
    color: #667eea;
}

@media (max-width: 600px) {
    .input-group {
        flex-direction: column;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    header h1 {
        font-size: 1.5em;
    }
}