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

body {
    font-family: Arial, sans-serif;
    background-color: #e8e8e8;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #26282a;
    color: white;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content h1 {
    font-size: 2.5rem;
    font-weight: bold;
    display: flex;
    align-items: baseline;
    gap: 15px;
}

.header-content h1 .subtitle {
    font-size: 0.4em;
    font-weight: normal;
    opacity: 0.9;
}

.header-year {
    font-size: 1rem;
    font-weight: bold;
}

main {
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.main-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    justify-content: center;
}

.input-section {
    max-width: 800px;
    width: 100%;
}

.input-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
}

.text-input-container {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.textarea-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#text-input {
    padding: 15px;
    border: 2px solid #333;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    background-color: white;
    min-height: 300px;
    flex: 1;
}

#text-input::placeholder {
    color: #666;
}

.character-counter {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
    text-align: right;
    padding-right: 5px;
}

.file-upload-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.file-drop-area {
    border: 2px solid #333;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    background-color: white;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.file-drop-area:hover {
    background-color: #f5f5f5;
}

.file-drop-area p {
    color: #666;
    font-size: 14px;
}

.btn-secondary {
    background-color: #26282a;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.btn-secondary:hover {
    background-color: #555;
}

.btn-primary {
    background-color: #26282a;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    display: block;
    margin: 0 auto;
}

.btn-primary:hover {
    background-color: #555;
}

/* Sección de información del proyecto centrada */
.project-info-section {
    margin-top: 40px;
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    padding: 30px 20px;
}

.project-description {
    margin-bottom: 25px;
}

.project-description p {
    font-size: 16px;
    line-height: 1.7;
    color: #555;
    text-align: center;
}

.about-link {
    margin-top: 20px;
}

.about-link a {
    color: #26282a;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    padding: 10px 20px;
    border: 2px solid #26282a;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
}

.about-link a:hover {
    background-color: #26282a;
    color: white;
}

/* Pie de página */
footer {
    background-color: #26282a;
    color: white;
    margin-top: 50px;
    padding: 30px 20px 20px;
    text-align: center;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-content p {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.footer-content p:first-child {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
}

.footer-content p:nth-child(2) {
    font-size: 15px;
    margin-bottom: 10px;
}

.footer-links {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #444;
}

.footer-link {
    color: #ccc;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: white;
}

.separator {
    margin: 0 10px;
    color: #666;
}

/* Responsive design */
@media (max-width: 768px) {
    header {
        padding: 15px 20px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .header-content h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 5px;
    }
    
    .header-content h1 .subtitle {
        font-size: 0.5em;
    }
    
    main {
        padding: 20px;
    }
    
    .main-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .text-input-container {
        flex-direction: column;
    }
    
    .project-info-section {
        margin-top: 30px;
        padding: 20px 10px;
    }
    
    .project-description p {
        font-size: 14px;
    }
    
    footer {
        margin-top: 30px;
        padding: 20px 15px 15px;
    }
    
    .footer-content p {
        font-size: 13px;
    }
    
    .footer-content p:first-child {
        font-size: 14px;
    }
    
    .footer-links {
        margin-top: 15px;
        padding-top: 10px;
    }
    
    .footer-link {
        font-size: 12px;
    }
}

/* File drag and drop styling */
.file-drop-area.dragover {
    background-color: #f0f0f0;
    border-color: #666;
}

/* Focus states for accessibility */
#text-input:focus,
.file-drop-area:focus,
.btn-secondary:focus,
.btn-primary:focus {
    outline: 2px solid #666;
    outline-offset: 2px;
}

/* ========================= */
/* ESTILOS PÁGINA RESULTADOS */
/* ========================= */

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

/* Navegación de resultados */
.results-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ddd;
}

.btn-back {
    background-color: #26282a;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.btn-back:hover {
    background-color: #555;
}

.results-nav h2 {
    font-size: 1.8rem;
    color: #333;
    margin: 0;
}

/* Texto analizado */
.analyzed-text-section {
    margin-bottom: 40px;
}

.analyzed-text-section h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 15px;
}

.analyzed-text-box {
    border: 2px solid #333;
    border-radius: 4px;
    padding: 20px;
    background-color: white;
    margin-bottom: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.analyzed-text-box p {
    font-size: 14px;
    line-height: 1.6;
    color: #444;
    margin: 0;
}

.text-stats {
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: #666;
}

.stat-item strong {
    color: #333;
}

/* Resumen del análisis */
.analysis-results {
    margin-bottom: 40px;
}

.results-summary h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 20px;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.summary-card {
    background: white;
    border: 2px solid;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.summary-card.safe {
    border-color: #27ae60;
    background: linear-gradient(135deg, #ffffff 0%, #f8fff8 100%);
}

.summary-card.warning {
    border-color: #f39c12;
    background: linear-gradient(135deg, #ffffff 0%, #fffdf8 100%);
}

.summary-card.danger {
    border-color: #e74c3c;
    background: linear-gradient(135deg, #ffffff 0%, #fff8f8 100%);
}

.card-icon {
    font-size: 24px;
    font-weight: bold;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.safe .card-icon {
    background-color: #27ae60;
}

.warning .card-icon {
    background-color: #f39c12;
}

.danger .card-icon {
    background-color: #e74c3c;
}

.card-content h4 {
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
}

.percentage {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.safe .percentage {
    color: #27ae60;
}

.warning .percentage {
    color: #f39c12;
}

.danger .percentage {
    color: #e74c3c;
}

.card-content .description {
    font-size: 12px;
    color: #666;
    margin: 0;
}

/* Detalles de detección */
.detection-details {
    margin-bottom: 40px;
}

.detection-details h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Contenedor de texto resaltado */
.highlighted-text-container {
    background: white;
    border: 2px solid #e3e6f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.highlighted-text-container h4 {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.highlighted-text {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    font-size: 14px;
}

.highlighted-text p {
    margin: 0;
    color: #333;
}

/* Patrones resaltados */
.highlighted-pattern {
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
    border: 1px solid;
    cursor: help;
    transition: all 0.2s ease;
}

.highlighted-pattern:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.highlighted-pattern.low-risk {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.highlighted-pattern.medium-risk {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.highlighted-pattern.high-risk {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.highlighted-pattern.critical-risk {
    background-color: #f5c6cb;
    color: #721c24;
    border-color: #dc3545;
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Texto sin patrones */
.no-patterns-text {
    color: #28a745;
    font-style: italic;
}

.no-patterns-note {
    background: #d4edda;
    color: #155724;
    padding: 8px 12px;
    border-radius: 5px;
    margin-top: 10px;
    font-size: 13px;
    text-align: center;
}

/* Resumen de detección compacto */
.detection-summary {
    background-color: #26282a;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 10px;
}

.summary-item {
    text-align: center;
    min-width: 120px;
}

.summary-label {
    display: block;
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 3px;
}

.summary-value {
    display: block;
    font-size: 18px;
    font-weight: bold;
}

/* Toggle para detalles */
.patterns-details-toggle {
    text-align: center;
    margin-bottom: 15px;
}

.toggle-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.3s ease;
}

.toggle-btn:hover {
    background: #2980b9;
}

/* Lista de patrones (ahora colapsable) */
.patterns-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Estado de carga para patrones */
.loading-patterns, .loading-state {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #6c757d;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* Sin patrones detectados */
.no-patterns {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border-radius: 10px;
}

.no-patterns-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.no-patterns h4 {
    margin-bottom: 10px;
    font-size: 20px;
}

.no-patterns p {
    opacity: 0.9;
    font-size: 14px;
}

.detection-details h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 20px;
}

.patterns-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pattern-item {
    background: white;
    border: 2px solid;
    border-radius: 8px;
    padding: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.pattern-item.low-risk {
    border-color: #3498db;
    background: linear-gradient(135deg, #ffffff 0%, #f8fcff 100%);
}

.pattern-item.medium-risk {
    border-color: #f39c12;
    background: linear-gradient(135deg, #ffffff 0%, #fffdf8 100%);
}

.pattern-item.high-risk {
    border-color: #e74c3c;
    background: linear-gradient(135deg, #ffffff 0%, #fff8f8 100%);
}

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

.pattern-type {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.risk-level {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.low-risk .risk-level {
    background-color: #3498db;
}

.medium-risk .risk-level {
    background-color: #f39c12;
}

.high-risk .risk-level {
    background-color: #e74c3c;
}

.pattern-description p {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
}

.pattern-matches {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.match-highlight {
    background-color: #fff3cd;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    color: #856404;
}

.match-count {
    font-size: 12px;
    color: #6c757d;
    margin-left: 8px;
}

/* Detalles del patrón */
.pattern-details {
    background: rgba(0, 0, 0, 0.02);
    padding: 12px;
    border-radius: 6px;
    margin-top: 10px;
}

.detail-item {
    font-size: 12px;
    color: #555;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-item strong {
    min-width: 140px;
    color: #333;
}

/* Recomendaciones */
.recommendations {
    margin-bottom: 40px;
}

.recommendations h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 20px;
}

.recommendation-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recommendation-item {
    background: white;
    border: 2px solid #3498db;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.rec-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    background-color: #3498db;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rec-content h4 {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.rec-content p {
    font-size: 14px;
    color: #555;
    margin: 0;
    line-height: 1.5;
}

/* Acciones de resultados */
.results-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.results-actions .btn-secondary,
.results-actions .btn-primary {
    margin: 0;
    display: inline-block;
}

/* Responsive para resultados */
@media (max-width: 768px) {
    .results-nav {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .results-nav h2 {
        font-size: 1.5rem;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .text-stats {
        flex-direction: column;
        gap: 5px;
    }
    
    .pattern-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .recommendation-item {
        flex-direction: column;
        text-align: center;
    }
    
    .results-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .results-actions button {
        width: 100%;
        max-width: 300px;
    }
    
    /* Responsive para texto resaltado */
    .highlighted-text-container {
        padding: 15px;
    }
    
    .detection-summary {
        flex-direction: column;
        gap: 15px;
    }
    
    .summary-item {
        min-width: auto;
    }
    
    .highlighted-text {
        font-size: 13px;
        padding: 12px;
    }
}

/* ========================= */
/* ESTILOS PÁGINA CONFIG */
/* ========================= */

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

/* Navegación de configuración */
.config-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ddd;
}

.config-nav h2 {
    font-size: 1.8rem;
    color: #333;
    margin: 0;
}

/* Sección de patrones */
.patterns-section {
    margin-bottom: 40px;
}

.patterns-section h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.table-container {
    background: white;
    border: 2px solid #333;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.patterns-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.patterns-table thead {
    background-color: #26282a;
    color: white;
}

.patterns-table th,
.patterns-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.patterns-table th {
    font-weight: bold;
    text-align: center;
}

.patterns-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.patterns-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.patterns-table tbody tr:hover {
    background-color: #e9ecef;
}

.patterns-table td:first-child {
    text-align: center;
    font-weight: bold;
    color: #333;
}

.gravity-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
}

.gravity-badge.bajo {
    background-color: #28a745;
}

.gravity-badge.medio {
    background-color: #ffc107;
    color: #212529;
}

.gravity-badge.alto {
    background-color: #fd7e14;
}

.gravity-badge.muy-alto {
    background-color: #dc3545;
}

.btn-action {
    background: none;
    border: 1px solid #ddd;
    padding: 6px 12px;
    margin: 0 2px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
    color: #333;
}

.btn-action:hover {
    background-color: #f0f0f0;
    border-color: #999;
}

.edit-btn {
    color: #007bff;
    border-color: #007bff;
}

.edit-btn:hover {
    background-color: #007bff;
    color: white;
}

.delete-btn {
    color: #dc3545;
    border-color: #dc3545;
}

.delete-btn:hover {
    background-color: #dc3545;
    color: white;
}

/* Paginación */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 30px;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background-color: white;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background-color: #f0f0f0;
    border-color: #999;
}

.pagination-btn.active {
    background-color: #26282a;
    color: white;
    border-color: #26282a;
}

/* Sección añadir patrón */
.add-pattern-section {
    margin-bottom: 40px;
}

.add-pattern-section h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.add-pattern-form {
    background: white;
    border: 2px solid #333;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.add-pattern-table {
    width: 100%;
    border-collapse: collapse;
}

.add-pattern-table thead {
    background-color: #26282a;
    color: white;
}

.add-pattern-table th {
    padding: 12px 8px;
    text-align: center;
    font-weight: bold;
}

.add-pattern-table td {
    padding: 15px 8px;
    background-color: #f8f9fa;
}

.form-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    background-color: white;
}

.form-input:focus {
    outline: none;
    border-color: #26282a;
    box-shadow: 0 0 0 2px rgba(38, 40, 42, 0.1);
}

.form-input[readonly] {
    background-color: #e9ecef;
    color: #6c757d;
}

.form-actions {
    padding: 20px;
    text-align: center;
    background-color: #f8f9fa;
    border-top: 1px solid #ddd;
}

.btn-add {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.btn-add:hover {
    background-color: #218838;
}

/* Acciones de configuración */
.config-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.config-actions .btn-secondary,
.config-actions .btn-primary {
    margin: 0;
    display: inline-block;
    min-width: 120px;
}

/* Responsive para configuración */
@media (max-width: 768px) {
    .config-nav {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .config-nav h2 {
        font-size: 1.5rem;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .patterns-table {
        min-width: 600px;
    }
    
    .patterns-table th,
    .patterns-table td {
        padding: 8px 4px;
        font-size: 12px;
    }
    
    .add-pattern-table {
        min-width: 600px;
    }
    
    .form-input {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 3px;
    }
    
    .pagination-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .config-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .config-actions button {
        width: 100%;
        max-width: 250px;
    }
}

/* Estilos para estados de carga y nuevas clases */
.loading-state {
    text-align: center;
    padding: 40px;
    color: #666;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.no-patterns {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.no-patterns-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.no-patterns h4 {
    color: #28a745;
    margin-bottom: 10px;
}

.no-patterns p {
    color: #666;
}

/* Clases de riesgo actualizadas */
.pattern-item.critical-risk {
    border-left: 4px solid #dc3545;
    background: #fff5f5;
}

.pattern-item.critical-risk .risk-level {
    background: #dc3545;
    color: white;
}

.algorithm-used {
    background: #6f42c1;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: auto;
}

.match-count {
    background: #f8f9fa;
    color: #666;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 5px;
}

.match-positions {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #666;
}
