/* Code Smell Detector Interface */
.smell-detector-interface {
    margin-bottom: 2rem;
}

.detector-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.detector-panel {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.detector-results-panel .panel-header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.panel-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.panel-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.panel-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: white;
}

.panel-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.language-selector {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.language-selector:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.language-selector option {
    background: #667eea;
    color: white;
}

.results-badge {
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.results-badge-empty {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.results-badge-success {
    background: #10b981;
    color: white;
}

.results-badge-warning {
    background: #f59e0b;
    color: white;
}

.results-badge-danger {
    background: #ef4444;
    color: white;
}

.panel-body {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.code-editor-container {
    flex: 1;
    min-height: 400px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.input-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

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

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

.action-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.action-btn-secondary:hover {
    background: #e5e7eb;
}

.action-btn-tertiary {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

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

.btn-icon {
    font-size: 1rem;
}

.results-container {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.results-container::-webkit-scrollbar {
    width: 6px;
}

.results-container::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.results-container::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.results-container::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1rem;
    height: 100%;
    color: #9ca3af;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: #6b7280;
}

.empty-description {
    font-size: 0.9375rem;
    margin: 0;
    max-width: 300px;
    line-height: 1.5;
}

/* Results Display */
.analysis-summary {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #667eea;
}

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

.summary-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.summary-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 8px;
    min-width: 80px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

.smells-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.smell-card {
    background: white;
    border-radius: 10px;
    padding: 1.25rem;
    border-left: 4px solid;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.smell-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.smell-card-high {
    border-left-color: #ef4444;
}

.smell-card-medium {
    border-left-color: #f59e0b;
}

.smell-card-low {
    border-left-color: #3b82f6;
}

.smell-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.smell-type {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.smell-severity-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.severity-high {
    background: #fee2e2;
    color: #991b1b;
}

.severity-medium {
    background: #fef3c7;
    color: #92400e;
}

.severity-low {
    background: #dbeafe;
    color: #1e40af;
}

.smell-description {
    color: #4b5563;
    margin: 0 0 0.75rem 0;
    line-height: 1.6;
}

.smell-fix {
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 6px;
    border-left: 3px solid #10b981;
}

.smell-fix-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #059669;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.smell-fix-text {
    font-size: 0.875rem;
    color: #374151;
    margin: 0;
    line-height: 1.5;
}

.recommendations-section {
    background: linear-gradient(135deg, #10b98115 0%, #05966915 100%);
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    border-left: 4px solid #10b981;
}

.recommendations-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recommendations-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.recommendation-item {
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    color: #374151;
    line-height: 1.6;
    position: relative;
    padding-left: 2rem;
}

.recommendation-item::before {
    content: "✓";
    position: absolute;
    left: 0.75rem;
    color: #10b981;
    font-weight: 700;
}

.success-message {
    background: linear-gradient(135deg, #10b98115 0%, #05966915 100%);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    border-left: 4px solid #10b981;
}

.success-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.success-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #059669;
    margin: 0 0 0.5rem 0;
}

.success-text {
    color: #374151;
    margin: 0;
    line-height: 1.6;
}

/* Info Section */
.smell-info-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.info-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 1rem 0;
}

.info-text {
    color: #4b5563;
    line-height: 1.7;
    margin: 0;
}

.smell-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.smell-item {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

.smell-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.smell-desc {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .detector-wrapper {
        grid-template-columns: 1fr;
    }

    .smell-info-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .detector-panel {
        min-height: 400px;
    }

    .panel-header {
        padding: 1rem;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .panel-title {
        font-size: 1.125rem;
    }

    .code-editor-container {
        min-height: 300px;
    }

    .input-actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }

    .summary-stats {
        justify-content: space-between;
    }

    .stat-item {
        flex: 1;
        min-width: calc(50% - 0.5rem);
    }
}

@media (max-width: 480px) {
    .panel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .panel-actions {
        width: 100%;
    }

    .language-selector {
        width: 100%;
    }

    .summary-stats {
        flex-direction: column;
    }

    .stat-item {
        width: 100%;
    }
}
