:root {
    --ctc-primary: #2563eb;
    --ctc-primary-dark: #1d4ed8;
    --ctc-success: #10b981;
    --ctc-warning: #f59e0b;
    --ctc-error: #ef4444;
    --ctc-gray-50: #f9fafb;
    --ctc-gray-100: #f3f4f6;
    --ctc-gray-200: #e5e7eb;
    --ctc-gray-300: #d1d5db;
    --ctc-gray-700: #374151;
    --ctc-gray-900: #111827;
    --ctc-radius: 0.75rem;
    --ctc-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ctc-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ctc-header {
    text-align: center;
    margin-bottom: 2rem;
}

.ctc-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ctc-gray-900);
    margin-bottom: 0.5rem;
}

.ctc-badge {
    background: var(--ctc-primary);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    vertical-align: middle;
}

.ctc-mode-toggle {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.ctc-mode-btn {
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--ctc-gray-200);
    background: white;
    border-radius: 9999px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.ctc-mode-btn.active {
    background: var(--ctc-primary);
    border-color: var(--ctc-primary);
    color: white;
}

.ctc-card {
    background: white;
    border-radius: var(--ctc-radius);
    box-shadow: var(--ctc-shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--ctc-gray-200);
}

.ctc-input-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ctc-input-group input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--ctc-gray-300);
    border-radius: var(--ctc-radius);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.ctc-input-group input:focus {
    outline: none;
    border-color: var(--ctc-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.ctc-btn-primary {
    background: var(--ctc-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--ctc-radius);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.ctc-btn-primary:hover {
    background: var(--ctc-primary-dark);
}

.ctc-btn-secondary {
    background: var(--ctc-gray-100);
    color: var(--ctc-gray-700);
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--ctc-gray-300);
    border-radius: var(--ctc-radius);
    cursor: pointer;
}

.ctc-btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ctc-gray-700);
    padding: 0.25rem 0.5rem;
}

.ctc-loading {
    text-align: center;
    padding: 2rem;
}

.ctc-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--ctc-gray-200);
    border-top-color: var(--ctc-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

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

.ctc-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.ctc-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: var(--ctc-radius);
    background: var(--ctc-gray-50);
}

.ctc-status-badge {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.ctc-status-badge.success { background: var(--ctc-success); }
.ctc-status-badge.warning { background: var(--ctc-warning); }
.ctc-status-badge.error { background: var(--ctc-error); }

.ctc-detail-row {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: var(--ctc-gray-50);
    border-radius: var(--ctc-radius);
}

.ctc-warnings {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #fef3c7;
    border-left: 4px solid var(--ctc-warning);
    border-radius: var(--ctc-radius);
}

.ctc-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 0.75rem;
    border-radius: var(--ctc-radius);
    border-left: 4px solid var(--ctc-error);
}

.ctc-progress {
    margin: 1rem 0;
}

.ctc-progress-bar {
    height: 8px;
    background: var(--ctc-primary);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s;
}

.ctc-results-table {
    width: 100%;
    border-collapse: collapse;
    overflow-x: auto;
    display: block;
}

.ctc-results-table th,
.ctc-results-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--ctc-gray-200);
}

.ctc-history-list {
    max-height: 200px;
    overflow-y: auto;
}

.ctc-history-item {
    padding: 0.5rem;
    border-bottom: 1px solid var(--ctc-gray-200);
    cursor: pointer;
}

.ctc-history-item:hover {
    background: var(--ctc-gray-50);
}

.ctc-faq details {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    border-bottom: 1px solid var(--ctc-gray-200);
}

.ctc-faq summary {
    font-weight: 500;
    cursor: pointer;
}

@media (max-width: 768px) {
    .ctc-input-group {
        flex-direction: column;
    }
    .ctc-results-table {
        font-size: 0.75rem;
    }
}