/* Dependency Analyzer Styles - One Full Card */
.dependency-analyzer {
    margin-bottom: 2rem;
}

.analyzer-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.analyzer-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.analyzer-card-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.analyzer-card-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

.analyzer-card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 400px;
}

.analyzer-left {
    padding: 24px;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.analyzer-right {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Left: Config + Input */
.config-section {
    display: flex;
    flex-direction: column;
    gap: 0;
}

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

.input-title {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    margin: 0;
    line-height: 1.2;
}

.input-actions {
    display: flex;
    gap: 8px;
}

.input-section {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.config-group {
    margin-bottom: 20px;
}

.config-group:last-child {
    margin-bottom: 0;
}

.config-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.config-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.config-select {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23374151' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.config-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.option-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.option-checkbox:hover {
    background-color: #f9fafb;
}

.option-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #6366f1;
}

.option-label {
    font-size: 14px;
    color: #374151;
    user-select: none;
}

/* Input Card */
.dependency-input {
    width: 100%;
    padding: 14px;
    font-size: 14px;
    
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
    resize: vertical;
    transition: border-color 0.2s ease;
    line-height: 1.6;
}

.dependency-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.dependency-input::placeholder {
    color: #9ca3af;
}

.input-footer {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

.char-indicator {
    font-size: 12px;
    color: #6b7280;
}

.input-footer-actions {
    margin-top: 12px;
}

.input-footer-actions .action-btn-primary {
    width: 100%;
}

/* Action Buttons */
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.action-btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    width: 100%;
    justify-content: center;
}

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

.action-btn-secondary {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.action-btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-icon {
    font-size: 16px;
    line-height: 1;
}

/* Right: Stats + Results + Insights */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-card {
    background: #f9fafb;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background-color 0.2s ease;
}

.stat-card:hover {
    background: #f3f4f6;
}

.stat-icon {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    color: #111827;
    margin-bottom: 4px;
}

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

.stat-primary {
    border-left: 4px solid #6366f1;
}

.stat-success {
    border-left: 4px solid #10b981;
}

.stat-warning {
    border-left: 4px solid #f59e0b;
}

.stat-info {
    border-left: 4px solid #3b82f6;
}

.stat-danger {
    border-left: 4px solid #ef4444;
}

.results-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.results-header {
    padding: 12px 16px;
    background: #f0fdf4;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.results-title {
    font-size: 15px;
    font-weight: 600;
    color: #166534;
    margin: 0;
    line-height: 1.2;
}

.results-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.results-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 280px;
}

.analysis-output {
    width: 100%;
    padding: 14px;
    font-size: 13px;
    
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    color: #111827;
    resize: vertical;
    line-height: 1.6;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    flex: 1;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px 0;
}

.empty-description {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    max-width: 400px;
}

/* Insights Section */
.insights-section {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.insights-section .insights-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e40af;
    margin: 0;
    padding: 12px 16px;
    background: #eff6ff;
    border-bottom: 1px solid #e5e7eb;
    line-height: 1.2;
}

.insights-body {
    padding: 16px;
}

.insight-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.insight-item:last-child {
    border-bottom: none;
}

.insight-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.insight-value {
    font-size: 14px;
    color: #111827;
    font-weight: 600;
}

.risk-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.risk-badge.risk-low {
    background: #d1fae5;
    color: #065f46;
}

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

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

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

    .analyzer-left {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .config-row {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 768px) {
    .dependency-analyzer {
        margin-bottom: 1.5rem;
    }

    .analyzer-card {
        border-radius: 12px;
    }

    .analyzer-card-header {
        padding: 16px 20px;
    }

    .analyzer-card-title {
        font-size: 18px;
    }

    .analyzer-left,
    .analyzer-right {
        padding: 20px;
    }

    .input-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .input-actions {
        width: 100%;
    }

    .input-actions .action-btn {
        flex: 1;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 14px;
    }

    .results-actions {
        width: 100%;
    }

    .results-actions .action-btn {
        flex: 1;
        justify-content: center;
    }

    .results-body {
        padding: 14px;
        min-height: 240px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-value {
        font-size: 24px;
    }

    .stat-icon {
        font-size: 28px;
    }

    .empty-state {
        padding: 40px 20px;
    }

    .empty-icon {
        font-size: 48px;
    }

    .empty-title {
        font-size: 18px;
    }

    .empty-description {
        font-size: 13px;
    }

    .insights-section .insights-title {
        padding: 10px 14px;
    }

    .insights-body {
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .analyzer-card-title {
        font-size: 16px;
    }

    .input-title,
    .results-title,
    .insights-section .insights-title {
        font-size: 14px;
    }

    .action-btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .btn-icon {
        font-size: 14px;
    }

    .dependency-input,
    .analysis-output {
        font-size: 13px;
        padding: 12px;
    }

    .stat-value {
        font-size: 20px;
    }

    .stat-label {
        font-size: 12px;
    }
}
