/* Complexity Analyzer Interface */
.complexity-analyzer-interface {
    margin-bottom: 2rem;
}

.analyzer-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Editor Panel */
.editor-panel {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

.panel-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
}

.panel-icon {
    font-size: 1.25rem;
}

.panel-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.action-btn:active {
    transform: translateY(0);
}

.editor-wrapper {
    position: relative;
    min-height: 400px;
    border-bottom: 1px solid #e5e7eb;
}

.code-editor {
    width: 100%;
    height: 400px;
}

.editor-stats {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.stat-label {
    color: #6b7280;
    font-weight: 500;
}

.stat-value {
    color: #111827;
    font-weight: 600;
}

/* Metrics Panel */
.metrics-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.metric-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.metric-card.primary {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
}

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

.metric-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.metric-icon {
    font-size: 1.25rem;
    opacity: 0.7;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.metric-status {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-subtext {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

.metric-status.success {
    color: #10b981;
}

.metric-status.warning {
    color: #f59e0b;
}

.metric-status.danger {
    color: #ef4444;
}

/* Quality Section */
.quality-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.quality-header {
    margin-bottom: 1rem;
}

.quality-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.quality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.quality-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quality-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.quality-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    background: #e5e7eb;
    color: #6b7280;
}

.quality-badge.success {
    background: #d1fae5;
    color: #065f46;
}

.quality-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.quality-badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

.quality-badge.unknown {
    background: #e5e7eb;
    color: #6b7280;
}

/* Report Panel */
.report-panel {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.report-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    color: #111827;
}

.report-icon {
    font-size: 1.25rem;
}

.report-content {
    padding: 1.5rem;
    min-height: 150px;
}

.report-placeholder {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
}

.report-content h6 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.75rem;
    margin-top: 0;
}

.report-content p {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.report-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.report-content li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #4b5563;
    line-height: 1.6;
    border-bottom: 1px solid #f3f4f6;
}

.report-content li:last-child {
    border-bottom: none;
}

.report-content li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: 600;
}

.report-content .text-success {
    color: #10b981;
    font-weight: 600;
}

.report-content .text-warning {
    color: #f59e0b;
    font-weight: 600;
}

.report-content .text-danger {
    color: #ef4444;
    font-weight: 600;
}

.report-content strong {
    color: #111827;
    font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .analyzer-layout {
        gap: 1rem;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .quality-grid {
        grid-template-columns: 1fr;
    }

    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .panel-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .editor-wrapper {
        min-height: 300px;
    }

    .code-editor {
        height: 300px;
    }

    .metric-value {
        font-size: 1.75rem;
    }

    .report-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

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

@media (max-width: 480px) {
    .complexity-analyzer-interface {
        margin-top: 1rem;
    }

    .editor-stats {
        flex-direction: column;
        gap: 0.5rem;
    }

    .metric-card {
        padding: 1rem;
    }

    .report-content {
        padding: 1rem;
    }
}

/* Tablet View */
@media (min-width: 769px) and (max-width: 1024px) {
    .analyzer-layout {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop View */
@media (min-width: 1025px) {
    .analyzer-layout {
        grid-template-columns: 1.2fr 1fr;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
