:root {
    --primary-color: #FF6900;
    --primary-hover: #E55A00;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --border-color: #e1e5e9;
    --error-color: #d73a49;
    --success-color: #28a745;
    --warning-color: #ffc107;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 0;
}

.header-content {
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0;
}

/* Main Content */
.main {
    padding: 3rem 0;
    min-height: calc(100vh - 200px);
}

/* Search Section */
.search-section {
    margin-bottom: 3rem;
}

.tab-container {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Search Form */
.search-form {
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 1rem;
}

.url-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.url-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

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

.search-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

.options {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Bulk Upload */
.bulk-section {
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
    transition: border-color 0.2s ease;
}

.bulk-section.dragover {
    border-color: var(--primary-color);
    background: #FFF5F0;
}

.upload-area svg {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.upload-area h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.upload-area p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.browse-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

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

.bulk-options {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.delay-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.delay-control input {
    width: 80px;
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
}

.process-btn {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin: 0 auto;
    display: block;
}

.process-btn:hover:not(:disabled) {
    background: #218838;
}

.process-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 3rem 0;
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results Section */
.results-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-header h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
}

.export-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

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

.result-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s ease;
}

.result-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.result-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.result-url {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 1rem;
    display: inline-block;
}

.result-url:hover {
    text-decoration: underline;
}

.result-meta {
    display: flex;
    gap: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.result-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.no-results {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-secondary);
}

.no-results svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* Error Section */
.error-section {
    background: #FFE5E5;
    border: 1px solid var(--error-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.error-content {
    text-align: center;
    color: var(--error-color);
}

.error-content svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}

.error-content h3 {
    margin-bottom: 0.5rem;
}

.error-content p {
    margin: 0;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .header {
        padding: 1.5rem 0;
    }
    
    .main {
        padding: 2rem 0;
    }
    
    .logo h1 {
        font-size: 1.75rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .options {
        flex-direction: column;
        gap: 1rem;
    }
    
    .bulk-options {
        flex-direction: column;
        gap: 1rem;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .result-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .bulk-section {
        padding: 2rem 1rem;
    }
    
    .results-section {
        padding: 1.5rem;
    }
    
    .result-item {
        padding: 1rem;
    }
}