/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

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

/* Header */
.header {
    background: white;
    border-radius: 16px;
    padding: 24px 32px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
}

.logo-text h1 {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

.tagline {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #e8f5e9;
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid #4caf50;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
}

.status-dot.active {
    background: #4caf50;
    animation: pulse 2s infinite;
}

.status-text {
    font-weight: 600;
    color: #2e7d32;
    font-size: 14px;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Contenido principal */
.main-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 24px;
}

.search-container {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.search-header h2 {
    font-size: 24px;
    margin-bottom: 8px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-header h2 i {
    color: #667eea;
}

.subtitle {
    color: #666;
    margin-bottom: 24px;
    font-size: 15px;
}

/* Formulario */
.search-form {
    margin-bottom: 32px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 16px;
    color: #667eea;
    font-size: 18px;
}

textarea {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    resize: vertical;
    min-height: 120px;
    transition: all 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 12px 0;
}

.language-selector label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #555;
}

select {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: #667eea;
}

.search-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-primary, .btn-secondary {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

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

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

.btn-secondary {
    background: #f5f5f5;
    color: #555;
    flex: 1;
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
    background: #e8e8e8;
}

.search-tips {
    background: #f0f7ff;
    padding: 16px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.search-tips p {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
    font-size: 14px;
}

.search-tips i {
    color: #667eea;
}

/* Barra de progreso */
.progress-container {
    background: #f8f9ff;
    border-radius: 16px;
    padding: 24px;
    border: 2px solid #e0e7ff;
    margin-bottom: 24px;
}

.progress-header h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    color: #333;
}

.progress-subtitle {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

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

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

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    position: relative;
}

.step::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    right: -50%;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.step:last-child::after {
    display: none;
}

.step.active::after {
    background: #667eea;
}

.step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.step.active .step-number {
    background: #667eea;
    color: white;
}

.step-text {
    font-size: 12px;
    color: #666;
    text-align: center;
}

.step.active .step-text {
    color: #667eea;
    font-weight: 500;
}

.progress-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#progressDetail {
    color: #555;
    font-size: 14px;
}

.browser-status {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #e8f5e9;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: #2e7d32;
}

.browser-status i {
    color: #4caf50;
}

/* Resultados */
.results-container {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.results-header h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #333;
}

.results-meta {
    display: flex;
    gap: 20px;
}

.timestamp, .claims-count {
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 6px;
}

.summary-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f7ff 100%);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 2px solid #e0e7ff;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.summary-header h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
}

.overall-status {
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.overall-status.supported {
    background: #e8f5e9;
    color: #2e7d32;
    border: 2px solid #4caf50;
}

.overall-status.partial {
    background: #fff3e0;
    color: #f57c00;
    border: 2px solid #ff9800;
}

.overall-status.insufficient {
    background: #f5f5f5;
    color: #757575;
    border: 2px solid #9e9e9e;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat {
    text-align: center;
    padding: 16px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.stat-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat:nth-child(1) .stat-value {
    color: #4caf50;
}

.stat:nth-child(2) .stat-value {
    color: #ff9800;
}

.stat:nth-child(3) .stat-value {
    color: #9e9e9e;
}

.stat:nth-child(4) .stat-value {
    color: #667eea;
}

.stat-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.summary-note {
    background: white;
    padding: 16px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    font-size: 14px;
    color: #555;
}

/* Lista de resultados */
.results-list {
    margin-bottom: 24px;
}

.result-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.result-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.1);
}

.result-item.supported {
    border-left: 4px solid #4caf50;
}

.result-item.partial {
    border-left: 4px solid #ff9800;
}

.result-item.insufficient {
    border-left: 4px solid #9e9e9e;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.result-claim {
    flex: 1;
    font-weight: 500;
    color: #333;
    line-height: 1.5;
}

.result-status {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 16px;
}

.result-status.supported {
    background: #e8f5e9;
    color: #2e7d32;
}

.result-status.partial {
    background: #fff3e0;
    color: #f57c00;
}

.result-status.insufficient {
    background: #f5f5f5;
    color: #757575;
}

.result-confidence {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #666;
}

.confidence-bar {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    border-radius: 3px;
}

.confidence-fill.high {
    background: #4caf50;
    width: 90%;
}

.confidence-fill.medium {
    background: #ff9800;
    width: 60%;
}

.confidence-fill.low {
    background: #9e9e9e;
    width: 30%;
}

.result-summary {
    color: #555;
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.result-sources {
    margin-top: 16px;
}

.sources-title {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.source-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.source-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8f9ff;
    border-radius: 8px;
    font-size: 13px;
}

.source-item i {
    color: #667eea;
}

.source-title {
    flex: 1;
    color: #333;
    font-weight: 500;
}

.source-url {
    color: #667eea;
    text-decoration: none;
    font-size: 12px;
}

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

.source-reliability {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.source-reliability.high {
    background: #e8f5e9;
    color: #2e7d32;
}

.source-reliability.medium {
    background: #fff3e0;
    color: #f57c00;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.info-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: #333;
}

.info-list {
    list-style: none;
}

.info-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.info-list li:last-child {
    margin-bottom: 0;
}

.info-list i {
    color: #667eea;
    margin-top: 2px;
}

.info-list span {
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

.verification-levels {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.level {
    padding: 12px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.level.supported {
    background: #e8f5e9;
    border: 2px solid #4caf50;
}

.level.partial {
    background: #fff3e0;
    border: 2px solid #ff9800;
}

.level.insufficient {
    background: #f5f5f5;
    border: 2px solid #9e9e9e;
}

.level.contradictory {
    background: #ffebee;
    border: 2px solid #f44336;
}

.level-name {
    font-weight: 600;
    font-size: 14px;
}

.level-desc {
    font-size: 12px;
    color: #666;
}

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

.history-item {
    padding: 12px;
    background: #f8f9ff;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.history-item:hover {
    background: #e0e7ff;
    transform: translateX(4px);
}

.history-claim {
    font-size: 13px;
    color: #333;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.history-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #666;
}

.empty-history {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
}

/* Footer */
.footer {
    background: white;
    border-radius: 16px;
    padding: 24px 32px;
    margin-top: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.footer-left, .footer-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer p {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
}

.footer i {
    color: #667eea;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
    color: #666;
    font-size: 13px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    color: #555;
    line-height: 1.6;
}

.share-options {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.share-option {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.share-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.share-option:nth-child(1) {
    color: #1da1f2;
    border-color: #1da1f2;
}

.share-option:nth-child(2) {
    color: #0077b5;
    border-color: #0077b5;
}

.share-option:nth-child(3) {
    color: #ea4335;
    border-color: #ea4335;
}

/* Utilidades */
.hidden {
    display: none !important;
}

.results-actions {
    display: flex;
    gap: 12px;
    padding-top: 24px;
    border-top: 2px solid #f0f0f0;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 12px;
    }
    
    .header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .logo-container {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .search-actions, .results-actions {
        flex-direction: column;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}
