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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

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

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.main-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.card h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #667eea;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.input-field {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

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

.input-field.small {
    width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    margin-top: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4);
}

.btn-outline {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.status-box {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    background: #f8f9fa;
    border-left: 4px solid #667eea;
}

.status-box.processing {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.status-box.completed {
    background: #d4edda;
    border-left-color: #28a745;
}

.status-box.failed {
    background: #f8d7da;
    border-left-color: #dc3545;
}

.status-box.queued {
    background: #d1ecf1;
    border-left-color: #17a2b8;
}

.hidden {
    display: none;
}

.pages-list {
    margin-top: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.pages-list h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #667eea;
}

.pages-list ul {
    list-style: none;
}

.pages-list li {
    padding: 8px;
    margin-bottom: 5px;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 0.9rem;
    word-break: break-all;
}

.answer-box {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.answer-box h3 {
    color: #28a745;
    margin-bottom: 15px;
}

.answer-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
    background: white;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.sources-box {
    margin-top: 15px;
}

.sources-box h4 {
    color: #667eea;
    margin-bottom: 10px;
}

.sources-box ul {
    list-style: none;
}

.sources-box li {
    padding: 10px;
    margin-bottom: 8px;
    background: white;
    border-radius: 5px;
    border-left: 3px solid #667eea;
}

.sources-box a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.sources-box a:hover {
    text-decoration: underline;
}

.websites-list {
    margin-top: 15px;
}

.website-item {
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.website-item .url {
    flex: 1;
    word-break: break-all;
    color: #667eea;
    font-weight: 600;
}

.website-item .delete-btn {
    padding: 5px 15px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
}

.website-item .delete-btn:hover {
    background: #c82333;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

